Clon1998 / mobileraker

A Flutter mobile app for Klipper/Moonraker
Other
488 stars 55 forks source link

Error if Powerstate is off #308

Closed sdoe0 closed 10 months ago

sdoe0 commented 10 months ago

Bug Report

Since approx two weeks ago I can't Power on my printer via Mobileraker. The powerbutton is missing if the Printer is powered off and the option "bound_services: Klipper" is set

Steps to Reproduce

Printer is powercontrolled via Tasmota-Socket. Klipper Service is bound to Powerstate

#moonraker.conf

[power printer]
type: tasmota
address: 192.168.5.43
bound_services: klipper #<----

Expected Behavior

The Powerbutton is visible as before.

Screenshots

image

image

Version Information

Clon1998 commented 10 months ago

Hey, Did this behavior occur after updating mobileraker or after changing something in the [power] config (Setting bound_services: klipper)?

Clon1998 commented 10 months ago

So I had a quick look and to me it seems like this is caused by moonraker. I tried different [power] types (gpio, tasmota, klipper_device....) but for nearly all of them I get this error. Also, Fluidd and Mainsail stopped working (Given that all of these configured devices are dummies and do not control any actual power device).

I will investigate this further and get back to you.

sdoe0 commented 10 months ago

I didn't change the config.

I'm not 100% sure but I think the error occurred after an specific update of Klipper, moonraker, etc.. Since then there were like 3 or 4 more updates

Clon1998 commented 10 months ago

I didn't change the config.

I'm not 100% sure but I think the error occurred after an specific update of Klipper, moonraker, etc.. Since then there were like 3 or 4 more updates

Alright. Does Fluidd/Mainsail behave normally?

sdoe0 commented 10 months ago

Yes Mainsail works as usual and as soon as the printer is powered on Mobileraker works also flawless. I already reinstalled the app but it didn't change its behavior.

Clon1998 commented 10 months ago

Yes Mainsail works as usual and as soon as the printer is powered on Mobileraker works also flawless. I already reinstalled the app but it didn't change its behavior.

Alright, could you upload the log files of mobileraker while the app is in that weird state. They are located at the very bottom of the app settings page.

sdoe0 commented 10 months ago

Yes Mainsail works as usual and as soon as the printer is powered on Mobileraker works also flawless. I already reinstalled the app but it didn't change its behavior.

Alright, could you upload the log files of mobileraker while the app is in that weird state. They are located at the very bottom of the app settings page.

Of course. Here is the newest file:


12:25:39.920 (+0:00:00.003353)
πŸ’‘ AppLifecycleState changed from null to AppLifecycleState.resumed
12:25:39.984 (+0:00:00.067405)
πŸ’‘ Completed FirebaseRemote init
12:25:40.008 (+0:00:00.090712)
πŸ’‘ Machine in box is printi (d7dce3d9-0289-46b6-8b39-570adafbb4d5)#330722490
12:25:40.008 (+0:00:00.090769)
πŸ’‘ Completed Hive init
12:25:40.050 (+0:00:00.132430)
πŸ’‘ Completed PaymentService init
12:25:40.050 (+0:00:00.132660)
πŸ’‘ Selecting machine printi
12:25:40.050 (+0:00:00.132689)
πŸ’‘ Received fetchAll
12:25:40.056 (+0:00:00.138597)
πŸ’‘ Theme selected: 5, available theme len: 6
12:25:40.056 (+0:00:00.138634)
πŸ’‘ Theme selected: 5, available theme len: 6
12:25:40.057 (+0:00:00.140261)
πŸ’‘ Got customerInfo: CustomerInfo(entitlements: EntitlementInfos(all: {Supporter: EntitlementInfo(identifier: Supporter, isActive: true, willRenew: false, latestPurchaseDate: 2023-09-11T16:17:08Z, originalPurchaseDate: 2023-09-11T16:17:08Z, productIdentifier: mobileraker_3299_lifetime, isSandbox: false, ownershipType: OwnershipType.purchased, store: Store.appStore, periodType: PeriodType.normal, expirationDate: null, unsubscribeDetectedAt: null, billingIssueDetectedAt: null), supporter_subscription: EntitlementInfo(identifier: supporter_subscription, isActive: false, willRenew: false, latestPurchaseDate: 2023-07-03T13:59:16Z, originalPurchaseDate: 2023-07-03T13:59:20Z, productIdentifier: mobileraker_500_1m, isSandbox: false, ownershipType: OwnershipType.purchased, store: Store.appStore, periodType: PeriodType.normal, expirationDate: 2023-08-03T13:59:16Z, unsubscribeDetectedAt: 2023-07-04T00:15:46Z, billingIssueDetectedAt: null)}, active: {Supporter: EntitlementInfo(identifier: Supporter, isActive: true, willRenew: false, latestPurchaseDate: 2023-09-11T16:17:08Z, originalPurchaseDate: 2023-09-11T16:17:08Z, productIdentifier: mobileraker_3299_lifetime, isSandbox: false, ownershipType: OwnershipType.purchased, store: Store.appStore, periodType: PeriodType.normal, expirationDate: null, unsubscribeDetectedAt: null, billingIssueDetectedAt: null)}), allPurchaseDates: {mobileraker_500_1m: 2023-07-03T13:59:16Z, mobileraker_3299_lifetime: 2023-09-11T16:17:08Z}, activeSubscriptions: [], allPurchasedProductIdentifiers: [mobileraker_3299_lifetime, mobileraker_500_1m], nonSubscriptionTransactions: [StoreTransaction.create(transactionIdentifier: aa9a193619, revenueCatIdentifier: aa9a193619, productIdentifier: mobileraker_3299_lifetime, purchaseDate: 2023-09-11T16:17:08Z)], firstSeen: 2023-06-19T19:43:12Z, originalAppUserId: $RCAnonymousID:2698915d79c14b6398f1590e9fb8f831, allExpirationDates: {mobileraker_3299_lifetime: null, mobileraker_500_1m: 2023-08-03T13:59:16Z}, requestDate: 2023-12-29T23:48:17Z, latestExpirationDate: 2023-08-03T13:59:16Z, originalPurchaseDate: 2023-07-03T13:59:20Z, originalApplicationVersion: null, managementURL: null)
12:25:40.057 (+0:00:00.140336)
πŸ’‘ RCat ID: $RCAnonymousID:2698915d79c14b6398f1590e9fb8f831
12:25:40.057 (+0:00:00.140377)
πŸ’‘ Received isSupporter true
12:25:40.057 (+0:00:00.140394)
πŸ’‘ Max allowed machines for non Supporters is -1
12:25:40.057 (+0:00:00.140411)
πŸ’‘ Updated allMachinesProvider: printi (d7dce3d9-0289-46b6-8b39-570adafbb4d5)
12:25:40.058 (+0:00:00.140434)
πŸ’‘ Completed initialRoute init
12:25:40.058 (+0:00:00.140449)
πŸ’‘ Started initializeAvailableMachines
12:25:40.058 (+0:00:00.140460)
πŸ’‘ Received all machines
12:25:40.058 (+0:00:00.140499)
πŸ’‘ machineProvider creation STARTED d7dce3d9-0289-46b6-8b39-570adafbb4d5
12:25:40.058 (+0:00:00.140546)
πŸ’‘ machineProvider creation DONE d7dce3d9-0289-46b6-8b39-570adafbb4d5 - returns null: false
12:25:40.058 (+0:00:00.140576)
πŸ’‘ initialized all machineProviders
12:25:40.058 (+0:00:00.140586)
πŸ’‘ Completed initializeAvailableMachines
12:25:40.064 (+0:00:00.146573)
πŸ’‘ Notifications are permitted: true
12:25:40.064 (+0:00:00.146628)
πŸ’‘ Successfully initialized ports!
12:25:40.064 (+0:00:00.146689)
πŸ’‘ Updated hiddenMachinesProvider: 
12:25:40.075 (+0:00:00.157871)
πŸ’‘ Successfully initialized AwesomeNotifications and created channels and groups!
12:25:40.075 (+0:00:00.157924)
πŸ’‘ Initializing notification listeners
12:25:40.075 (+0:00:00.157969)
πŸ’‘ Initializing remote messaging
12:25:40.079 (+0:00:00.162409)
πŸ’‘ Restored 1 LiveActivities from storage: {d7dce3d9-0289-46b6-8b39-570adafbb4d5: 2F579694-BD53-4639-8E7D-6525CF69AA04}
12:25:40.080 (+0:00:00.162455)
πŸ’‘ Started to listen for LiveActivity updates
12:25:40.080 (+0:00:00.162515)
πŸ’‘ Completed LiveActivityService init
12:25:40.080 (+0:00:00.162527)
πŸ’‘ Initializing machineRepoListener
12:25:40.080 (+0:00:00.162536)
πŸ’‘ Completed NotificationService init
12:25:40.083 (+0:00:00.166271)
πŸ’‘ Setting up FCM updater for printi (d7dce3d9-0289-46b6-8b39-570adafbb4d5)@ws://192.168.5.31/websocket
12:25:40.083 (+0:00:00.166424)
πŸ’‘ [JrpcClientManager@printi] Returning LocalClient
12:25:40.084 (+0:00:00.166700)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] JsonRpcClient CREATED!!
12:25:40.084 (+0:00:00.166715)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] Trying to connect
12:25:40.084 (+0:00:00.166726)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] ClientState.disconnected ➝ ClientState.connecting
12:25:40.084 (+0:00:00.166744)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] Using headers {}
12:25:40.084 (+0:00:00.166756)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] Using timeout 0:00:05.000000
12:25:40.089 (+0:00:00.171692)
πŸ’‘ Completed init for workManager
12:25:40.095 (+0:00:00.177547)
πŸ’‘ Theme selected: 5, available theme len: 6
12:25:40.137 (+0:00:00.220237)
πŸ’‘ Printer Service received klippyState: null
12:25:40.190 (+0:00:00.273408)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] ClientState.connecting ➝ ClientState.connected
12:25:40.191 (+0:00:00.273466)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] IOWebSocketChannel reported READY!
12:25:40.191 (+0:00:00.273536)
πŸ’‘ >>>Fetching Server.Info
12:25:40.191 (+0:00:00.273793)
πŸ’‘ >>>Fetching Printer.Info
12:25:40.191 (+0:00:00.273916)
πŸ’‘ INIT QUEUE STATUS...
12:25:40.191 (+0:00:00.273929)
πŸ’‘ Queue status request...
12:25:40.191 (+0:00:00.274150)
πŸ’‘ [ClientType.local@ws://192.168.5.31/websocket? #672656680] Identifying connection
12:25:40.214 (+0:00:00.296844)
πŸ’‘ <<<Received Server.Info
12:25:40.214 (+0:00:00.297081)
πŸ’‘ NExt status is :JobQueueStatus(queuedJobs: [], queueState: QueueState.paused)
12:25:40.214 (+0:00:00.297138)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:40.216 (+0:00:00.299275)
⚠️ Jrpc Error while refreshing KlippyObject: Klippy Host not connected
12:25:40.216 (+0:00:00.299326)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:40.457 (+0:00:00.540328)
πŸ’‘ FirebaseRemote values are fetched and activated!
12:25:40.650 (+0:00:00.732869)
πŸ’‘ Read Supporter storage local: 2024-01-28 22:41:20.569502, c_I6hw5oeUdltLFAKhFezm:APA91bG9axqa_yTMNgC0__8vUtEfVOymgmRJrBSGpGSL-oVn77asd2Mva7MgwkN9gzoDUlJBYr4-eKtoraOMvP1tQdtOlN_LHl7027DDxSpP3XplrPr0AOA3TqpuLv05xx8i3WDVDB3n. Customer.expirationDate: null, FcmToken: c_I6hw5oeUdltLFAKhFezm:APA91bG9axqa_yTMNgC0__8vUtEfVOymgmRJrBSGpGSL-oVn77asd2Mva7MgwkN9gzoDUlJBYr4-eKtoraOMvP1tQdtOlN_LHl7027DDxSpP3XplrPr0AOA3TqpuLv05xx8i3WDVDB3n
12:25:40.650 (+0:00:00.733035)
πŸ’‘ No need to write to firebase, its expected to still have a valid sub!
12:25:40.650 (+0:00:00.733119)
πŸ’‘ Token from FCM updated c_I6hw5oeUdltLFAKhFezm:APA91bG9axqa_yTMNgC0__8vUtEfVOymgmRJrBSGpGSL-oVn77asd2Mva7MgwkN9gzoDUlJBYr4-eKtoraOMvP1tQdtOlN_LHl7027DDxSpP3XplrPr0AOA3TqpuLv05xx8i3WDVDB3n
12:25:42.112 (+0:00:02.195131)
πŸ’‘ Ending all unknown LiveActivities
12:25:42.112 (+0:00:02.195301)
πŸ’‘ Found 1 locally tracked LiveActivities
12:25:42.135 (+0:00:02.217720)
πŸ’‘ Found 0 LiveActivities
12:25:42.135 (+0:00:02.217858)
πŸ’‘ Cleared unknown LiveActivities, total ended: 0
12:25:42.135 (+0:00:02.217919)
πŸ’‘ The app has currently 1 machines
12:25:42.135 (+0:00:02.217941)
πŸ’‘ Force a LiveActivity update for printi after app was resumed
12:25:48.744 (+0:00:08.826698)
πŸ’‘ Invalidating klipper service provider, to retry klippy fetching
12:25:48.748 (+0:00:08.831221)
πŸ’‘ >>>Fetching Server.Info
12:25:48.749 (+0:00:08.832395)
πŸ’‘ >>>Fetching Printer.Info
12:25:48.750 (+0:00:08.833041)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:48.774 (+0:00:08.856520)
πŸ’‘ <<<Received Server.Info
12:25:48.774 (+0:00:08.857033)
⚠️ Jrpc Error while refreshing KlippyObject: Klippy Host not connected
12:25:48.774 (+0:00:08.857212)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:48.774 (+0:00:08.857339)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:48.782 (+0:00:08.864697)
β›” isRefreshing SKIPPED
12:25:49.287 (+0:00:09.369689)
πŸ’‘ Invalidating klipper service provider, to retry klippy fetching
12:25:49.299 (+0:00:09.381715)
πŸ’‘ >>>Fetching Server.Info
12:25:49.300 (+0:00:09.382821)
πŸ’‘ >>>Fetching Printer.Info
12:25:49.301 (+0:00:09.383645)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:49.351 (+0:00:09.433491)
πŸ’‘ <<<Received Server.Info
12:25:49.351 (+0:00:09.434181)
⚠️ Jrpc Error while refreshing KlippyObject: Klippy Host not connected
12:25:49.351 (+0:00:09.434374)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:49.352 (+0:00:09.434580)
πŸ’‘ Printer Service received klippyState: KlipperState.disconnected
12:25:49.365 (+0:00:09.448345)
β›” isRefreshing SKIPPED
12:25:51.989 (+0:00:12.072248)
πŸ’‘ Getting fcm.client
12:25:54.896 (+0:00:14.979267)
πŸ’‘ Show Dialog request for DialogType.logging
Clon1998 commented 10 months ago

Thanks, I think I found the problematic code section. I will get back to you once I resolved the issue.

sdoe0 commented 10 months ago

Thanks, I think I found the problematic code section. I will get back to you once I resolved the issue.

Danke fΓΌr deinen Einsatz und die schΓΆne App! WΓΌnsche dir einen Guten Rutsch ins neue Jahr.

iitsalex commented 10 months ago

Also running into this issue, hoping to see it fixed soon. Love the work :)

Clon1998 commented 10 months ago

Also running into this issue, hoping to see it fixed soon. Love the work :)

Well, it is fixed 🦾 I am currently preparing the next build/release.

iitsalex commented 10 months ago

Just got the newest build, works great!