Closed Clon1998 closed 1 year ago
@busheezy thanks for bringing that up. Seems like I missed to correctly test that after refactoring it.
I will have a look and fix it as soon as I can.
Sorry, I wasn't sure if I should make a new issue or not. Let me know if I can help in any way.
No worries at all, I can always just create a new issue based of an comment, just like it did.
However, I am unable to reproduce that issue and parsing of the JSON works just fine.
Could you send me the latest log file of the app (App Settings -> Scroll to The Btoom -> Debug logs)
💡 Completed FirebaseRemote init
💡 Machine in box is SV01 (49eab63f-8e94-4e41-ad2c-b23212c2b38f)#844025974
💡 Machine in box is Ender 5 (ded88165-3557-4da0-88e5-8e2e9d82f892)#61376534
💡 Completed Hive init
💡 Completed PaymentService init
💡 Selecting machine SV01
💡 Received fetchAll
💡 Got customerInfo: CustomerInfo(entitlements: EntitlementInfos(all: {Supporter: EntitlementInfo(identifier: Supporter, isActive: true, willRenew: true, latestPurchaseDate: 2023-08-13T03:50:45.000Z, originalPurchaseDate: 2023-08-13T03:50:45.000Z, productIdentifier: mobileraker_supporter_v2, isSandbox: false, ownershipType: OwnershipType.unknown, store: Store.playStore, periodType: PeriodType.normal, expirationDate: 2023-09-13T03:43:57.000Z, unsubscribeDetectedAt: null, billingIssueDetectedAt: null), supporter_subscription: EntitlementInfo(identifier: supporter_subscription, isActive: true, willRenew: true, latestPurchaseDate: 2023-08-13T03:50:45.000Z, originalPurchaseDate: 2023-08-13T03:50:45.000Z, productIdentifier: mobileraker_supporter_v2, isSandbox: false, ownershipType: OwnershipType.unknown, store: Store.playStore, periodType: PeriodType.normal, expirationDate: 2023-09-13T03:43:57.000Z, unsubscribeDetectedAt: null, billingIssueDetectedAt: null)}, active: {Supporter: EntitlementInfo(identifier: Supporter, isActive: true, willRenew: true, latestPurchaseDate: 2023-08-13T03:50:45.000Z, originalPurchaseDate: 2023-08-13T03:50:45.000Z, productIdentifier: mobileraker_supporter_v2, isSandbox: false, ownershipType: OwnershipType.unknown, store: Store.playStore, periodType: PeriodType.normal, expirationDate: 2023-09-13T03:43:57.000Z, unsubscribeDetectedAt: null, billingIssueDetectedAt: null), supporter_subscription: EntitlementInfo(identifier: supporter_subscription, isActive: true, willRenew: true, latestPurchaseDate: 2023-08-13T03:50:45.000Z, originalPurchaseDate: 2023-08-13T03:50:45.000Z, productIdentifier: mobileraker_supporter_v2, isSandbox: false, ownershipType: OwnershipType.unknown, store: Store.playStore, periodType: PeriodType.normal, expirationDate: 2023-09-13T03:43:57.000Z, unsubscribeDetectedAt: null, billingIssueDetectedAt: null)}), allPurchaseDates: {mobileraker_supporter_v2:199-1m: 2023-08-13T03:50:45.000Z}, activeSubscriptions: [mobileraker_supporter_v2:199-1m], allPurchasedProductIdentifiers: [mobileraker_supporter_v2:199-1m], nonSubscriptionTransactions: [], firstSeen: 2023-06-04T01:22:03.000Z, originalAppUserId: $RCAnonymousID:e35cfa24e231464cbd0a237f93ba0c65, allExpirationDates: {mobileraker_supporter_v2:199-1m: 2023-09-13T03:43:57.000Z}, requestDate: 2023-08-31T12:11:46.337Z, latestExpirationDate: 2023-09-13T03:43:57.000Z, originalPurchaseDate: null, originalApplicationVersion: null, managementURL: https://play.google.com/store/account/subscriptions)
💡 RCat ID: $RCAnonymousID:e35cfa24e231464cbd0a237f93ba0c65
💡 Received isSupporter true
💡 Max allowed machines for non Supporters is -1
💡 Completed initialRoute init
💡 Started initializeAvailableMachines
💡 Received all machines
💡 machineProvider creation STARTED 49eab63f-8e94-4e41-ad2c-b23212c2b38f
💡 machineProvider creation STARTED ded88165-3557-4da0-88e5-8e2e9d82f892
💡 machineProvider creation DONE 49eab63f-8e94-4e41-ad2c-b23212c2b38f
💡 machineProvider creation DONE ded88165-3557-4da0-88e5-8e2e9d82f892
💡 initialized all machineProviders
💡 Completed initializeAvailableMachines
💡 Notifications are permitted: true
PlatformException(INVALID_ARGUMENTS, Firebase service is not available (check if you have google-services.json file), arguments.invalid.fcm.assertFirebaseServiceEnabled, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310)
#2 <asynchronous suspension>
#3 AwesomeNotificationsFcm.requestFirebaseAppToken (package:awesome_notifications_fcm/src/awesome_notifications_fcm_core.dart:127)
#4 <asynchronous suspension>
#5 FutureHandlerProviderElementMixin.handleFuture.<anonymous closure>.<anonymous closure> (package:riverpod/src/async_notifier/base.dart:337)
#6 <asynchronous suspension>
⛔ Error while trying to register supporter status/fcm token in firebase:
💡 Setup notification channels
💡 Setup ReceiverPort!
💡 Completed NotificationService init
💡 Theme selected: 4, available theme len: 5
💡 SV01(ws://192.168.1.225:7126/websocket) Device's FCM token: f4C6-RFxRmyHfKDRsPQfih:APA91bGIWjEff8i0zHLBrRsg1V6idj7TQJX-M9rD-ytFWXcaXzrQpa33W1nm1WLI8pFC5ODe-P9vQIR1XsifKz-LVThvtlZcnxN-4DR21b-0vpKq0LunJeQTgIFi-pIcujra-vYS4px2
💡 No OE config was found! Will only rely on local client. ref:766235877
💡 JsonRpcClient (ws://192.168.1.225:7126/websocket , ClientType.local) CREATED!!
💡 [523093308]Trying to connect to ws://192.168.1.225:7126/websocket
💡 [523093308-ws://192.168.1.225:7126/websocket] ClientState.disconnected ➝ ClientState.connecting
💡 Using headers {}
💡 Ender 5(ws://192.168.1.225:7125/websocket) Device's FCM token: f4C6-RFxRmyHfKDRsPQfih:APA91bGIWjEff8i0zHLBrRsg1V6idj7TQJX-M9rD-ytFWXcaXzrQpa33W1nm1WLI8pFC5ODe-P9vQIR1XsifKz-LVThvtlZcnxN-4DR21b-0vpKq0LunJeQTgIFi-pIcujra-vYS4px2
💡 No OE config was found! Will only rely on local client. ref:989472977
💡 JsonRpcClient (ws://192.168.1.225:7125/websocket , ClientType.local) CREATED!!
💡 [46904453]Trying to connect to ws://192.168.1.225:7125/websocket
💡 [46904453-ws://192.168.1.225:7125/websocket] ClientState.disconnected ➝ ClientState.connecting
💡 Using headers {}
💡 Token from FCM f4C6-RFxRmyHfKDRsPQfih:APA91bGIWjEff8i0zHLBrRsg1V6idj7TQJX-M9rD-ytFWXcaXzrQpa33W1nm1WLI8pFC5ODe-P9vQIR1XsifKz-LVThvtlZcnxN-4DR21b-0vpKq0LunJeQTgIFi-pIcujra-vYS4px2
💡 [523093308-ws://192.168.1.225:7126/websocket] ClientState.connecting ➝ ClientState.connected
💡 >>>Fetching Server.Info
💡 >>>Fetching Printer.Info
💡 Printer Service received klippyState: null
💡 Printer Service received klippyState: null
💡 [46904453-ws://192.168.1.225:7125/websocket] ClientState.connecting ➝ ClientState.connected
💡 >>>Fetching Server.Info
💡 >>>Fetching Printer.Info
💡 <<<Received Server.Info
💡 <<<Received Printer.Info
💡 Partial Update STARTED KlipperInstance(klippyConnected: true, klippyState: KlipperState.ready, components: [klippy_connection, application, websockets, internal_transport, dbus_manager, database, file_manager, klippy_apis, secrets, template, shell_command, machine, data_store, proc_stats, job_state, job_queue, http_client, announcements, webcam, extensions, authorization, octoprint_compat, power, update_manager, history], warnings: [], klippyStateMessage: null)
💡 Partial Update Done KlipperInstance(klippyConnected: true, klippyState: KlipperState.ready, components: [klippy_connection, application, websockets, internal_transport, dbus_manager, database, file_manager, klippy_apis, secrets, template, shell_command, machine, data_store, proc_stats, job_state, job_queue, http_client, announcements, webcam, extensions, authorization, octoprint_compat, power, update_manager, history], warnings: [], klippyStateMessage: Printer is ready)
💡 Printer Service received klippyState: KlipperState.ready
💡 Refreshing printer for uuid: 49eab63f-8e94-4e41-ad2c-b23212c2b38f
💡 >>>Querying printers object list
💡 Jrpc Client of SV01(ws://192.168.1.225:7126/websocket) is connected, can Setup FCM on printer now!
💡 Getting fcm
⚠️ watchWhere just forces owner to invalidate! Ref:AutoDisposeAsyncNotifierProviderElement<PrinterCardController, WebcamInfo?>(provider: printerCardControllerProvider:AutoDisposeAsyncNotifierProviderImpl<PrinterCardController, WebcamInfo?>#d94ac, origin: printerCardControllerProvider:AutoDisposeAsyncNotifierProviderImpl<PrinterCardController, WebcamInfo?>#d94ac)
💡 List Webcams request...
💡 Trying to fetch all webcams from moonraker.
💡 <<<Received Server.Info
💡 Printer Service received klippyState: KlipperState.error
💡 <<<Received Printer.Info
💡 Partial Update STARTED KlipperInstance(klippyConnected: true, klippyState: KlipperState.error, components: [klippy_connection, application, websockets, internal_transport, dbus_manager, database, file_manager, klippy_apis, secrets, template, shell_command, machine, data_store, proc_stats, job_state, job_queue, http_client, announcements, webcam, extensions, authorization, octoprint_compat, history, update_manager, power], warnings: [], klippyStateMessage: null)
💡 Partial Update Done KlipperInstance(klippyConnected: true, klippyState: KlipperState.error, components: [klippy_connection, application, websockets, internal_transport, dbus_manager, database, file_manager, klippy_apis, secrets, template, shell_command, machine, data_store, proc_stats, job_state, job_queue, http_client, announcements, webcam, extensions, authorization, octoprint_compat, history, update_manager, power], warnings: [], klippyStateMessage: mcu 'mcu': Unable to connect
💡 Once the underlying issue is corrected, use the
💡 "FIRMWARE_RESTART" command to reset the firmware, reload the
💡 config, and restart the host software.
💡 Error configuring printer
💡 )
💡 Getting fcm.49eab63f-8e94-4e41-ad2c-b23212c2b38f
💡 List Webcams request...
💡 Trying to fetch all webcams from moonraker.
💡 Received 1 webcams from moonraker.
💡 Got 1 webcams
💡 <<<Received printer objects list!
💡 >>>Querying Printer Objects!
💡 Received 1 webcams from moonraker.
💡 Got 1 webcams
💡 Current FCMConfig in MoonrakerDB: DeviceFcmSettings{machineId: f4C6-RFxRmyHfKDRsPQfih:APA91bGIWjEff8i0zHLBrRsg1V6idj7TQJX-M9rD-ytFWXcaXzrQpa33W1nm1WLI8pFC5ODe-P9vQIR1XsifKz-LVThvtlZcnxN-4DR21b-0vpKq0LunJeQTgIFi-pIcujra-vYS4px2, machineName: SV01, language: en, settings: NotificationSettings{progress: 0.25, states: {standby, printing, paused, complete, error, cancelled}}}
💡 Start MJPEG - targFps: 30 - http://192.168.1.225/webcam2?action=snapshot
💡 <<<Received queried printer objects
type 'Null' is not a subtype of type 'String' in type cast
#0 _$$_ConfigHeaterGenericFromJson (package:mobileraker/data/dto/config/config_heater_generic.g.dart:14)
#1 new _$_ConfigHeaterGeneric.fromJson (package:mobileraker/data/dto/config/config_heater_generic.freezed.dart:196)
#2 _$ConfigHeaterGenericFromJson (package:mobileraker/data/dto/config/config_heater_generic.freezed.dart:18)
#3 new ConfigHeaterGeneric.fromJson (package:mobileraker/data/dto/config/config_heater_generic.dart:45)
#4 new ConfigFile.parse (package:mobileraker/data/dto/config/config_file.dart:102)
#5 PrinterService._updateConfigFile (package:mobileraker/service/moonraker/printer_service.dart:697)
#6 PrinterService._parseObjectType (package:mobileraker/service/moonraker/printer_service.dart:529)
#7 PrinterService._temperatureStore.<anonymous closure> (package:mobileraker/service/moonraker/printer_service.dart:478)
#8 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625)
#9 PrinterService._parseQueriedObjects (package:mobileraker/service/moonraker/printer_service.dart:614)
#10 PrinterService._printerObjectsQuery (package:mobileraker/service/moonraker/printer_service.dart:773)
#11 <asynchronous suspension>
#12 PrinterService.refreshPrinter (package:mobileraker/service/moonraker/printer_service.dart:203)
#13 <asynchronous suspension>
⛔ Error while parsing configfile object
💡 Fetching cached temperature store data
💡 Received cached temperature store for [heater_bed, heater_generic my_heater, extruder]
MobilerakerException{Missing field: configFile, parentException: null, parentStack: null}
#0 PrinterBuilder.build (package:mobileraker/data/dto/machine/printer.dart:94)
#1 PrinterService.refreshPrinter (package:mobileraker/service/moonraker/printer_service.dart:208)
#2 <asynchronous suspension>
⛔ Unexpected exception thrown during refresh 49eab63f-8e94-4e41-ad2c-b23212c2b38f...
💡 Show Dialog request for DialogType.stacktrace
💡 Stop MJPEG
💡 Start MJPEG - targFps: 30 - http://192.168.1.225/webcam2?action=snapshot
💡 Stop MJPEG
💡 [ws://192.168.1.225:7125/websocket46904453] WS-Stream closed normal! Code: 1002, Reason: null
💡 [46904453-ws://192.168.1.225:7125/websocket] ClientState.connected ➝ ClientState.disconnected
💡 [46904453]Trying to connect to ws://192.168.1.225:7125/websocket
💡 [46904453-ws://192.168.1.225:7125/websocket] ClientState.disconnected ➝ ClientState.connecting
💡 Using headers {}
💡 Printer Service received klippyState: KlipperState.disconnected
💡 [ws://192.168.1.225:7126/websocket523093308] WS-Stream closed normal! Code: 1002, Reason: null
💡 [523093308-ws://192.168.1.225:7126/websocket] ClientState.connected ➝ ClientState.disconnected
💡 [523093308]Trying to connect to ws://192.168.1.225:7126/websocket
💡 [523093308-ws://192.168.1.225:7126/websocket] ClientState.disconnected ➝ ClientState.connecting
💡 Using headers {}
💡 Printer Service received klippyState: KlipperState.disconnected
⚠️ Got channel error SocketException: HTTP connection timed out after 0:00:03.000000, host: 192.168.1.225, port: 7125
⛔ [ws://192.168.1.225:7125/websocket46904453] WS-Stream error: SocketException: HTTP connection timed out after 0:00:03.000000, host: 192.168.1.225, port: 7125
💡 [46904453-ws://192.168.1.225:7125/websocket] ClientState.connecting ➝ ClientState.error
⚠️ Got channel error SocketException: HTTP connection timed out after 0:00:03.000000, host: 192.168.1.225, port: 7126
⛔ [ws://192.168.1.225:7126/websocket523093308] WS-Stream error: SocketException: HTTP connection timed out after 0:00:03.000000, host: 192.168.1.225, port: 7126
💡 [523093308-ws://192.168.1.225:7126/websocket] ClientState.connecting ➝ ClientState.error
💡 Printer Service received klippyState: KlipperState.error
💡 Printer Service received klippyState: KlipperState.error
💡 Start MJPEG - targFps: 30 - http://192.168.1.225/webcam2?action=snapshot
💡 Stop MJPEG
💡 _AdaptiveStreamManager DISPOSED
⚠️ [SV01@ws://192.168.1.225:7126/websocket]Unable to propagate new notification settings because JRPC was not connected!
MobilerakerException{Machine not connected, parentException: null, parentStack: null}
⚠️ Error while trying to fetch CompanionMeta for machine SV01 (49eab63f-8e94-4e41-ad2c-b23212c2b38f)
⚠️ [Ender 5@ws://192.168.1.225:7125/websocket]Unable to propagate new notification settings because JRPC was not connected!
MobilerakerException{Machine not connected, parentException: null, parentStack: null}
⚠️ Error while trying to fetch CompanionMeta for machine Ender 5 (ded88165-3557-4da0-88e5-8e2e9d82f892)
💡 Show Dialog request for DialogType.logging
Sorry I input your JSON into the wrong file I am using for testing <.<
The App is complaining because your heater heater_generic
does not use a sensor_pin?
Is that expected? As far as I understand the klipper docs the sensor_pin should always be present?
Oh, I am probably a fun edge-case.
[mcu pico]
serial: /dev/serial/by-id/usb-Klipper_rp2040_E6605838836F9A30-if00
[multi_pin heater_pin]
pins: pico:gpio9,pico:gpio26
[multi_pin fan_pin]
pins: pico:gpio5,pico:gpio27
[heater_generic my_heater]
sensor_type: BME280
gcode_id: ENC
i2c_mcu: pico
i2c_speed: 400000
heater_pin: multi_pin:heater_pin
max_power: 1
control: watermark
min_temp: 0
max_temp: 55
[verify_heater my_heater]
check_gain_time: 120
[heater_fan my_heater_fan]
pin: multi_pin:fan_pin
max_power: 1
heater: my_heater
heater_temp: 30.0
fan_speed: 1.0
Since you are using the BME280
that uses i2c you can not define a sensor_pin (lol)...
I will adapt my implementation since I don't really care about most of the config entries I parse. I just used the Klipper config for reference and sometimes it simply is outdated.
Thanks!
However, I won't trigger a new patch release since going by my reporting, you are the only users affected by that issue.
However, if you are on IOS I can trigger a TestFlight version that resolves the issue.
Or provide an Android APK :)
I'm an android user. An APK would be perfect. Thanks.
I added you on Discord.
This is still happening to me with 2.5.3-249.
I've added a heater_generic and now I can no longer use the app to control my printer.
Exception:
Failed-Key: configfile Raw Json:
Originally posted by @busheezy in https://github.com/Clon1998/mobileraker/issues/205#issuecomment-1699846159