Clon1998 / mobileraker

A Flutter mobile app for Klipper/Moonraker
Other
473 stars 52 forks source link

App Crashes and then is reset #321

Closed DelusionalAI closed 8 months ago

DelusionalAI commented 8 months ago

Bug Report

Description

Rarely when clicking on a live notification to open the app, the crashes with the below error screen. If you close and then reopen the app, it launches with all app settings reset, so I need to re add the printers and so on.

Expected Behavior

Just expected the app to open to the printer whose notification I click on.

Screenshots

6EBDA032-5EC2-4ECA-B1CC-00B44DFEC81D_4_5005_c

Version Information

Debug Logs

mobileraker_2024-01-19T07-40-35.log mobileraker_2024-01-19T07-40-26.log mobileraker_2024-01-19T00-41-41.log companion-logs.txt

Additional Context

Add any other relevant context about the problem here.


Checklist

To help us diagnose the issue, please ensure you've completed the following steps:

Clon1998 commented 8 months ago

Hey, I am sorry to hear about that behavior. I will have a look at that ASAP.

Clon1998 commented 8 months ago

I looked into the issue and couldn't find the root cause of the problem with the live_activity feature. However, I did come across a few issues that could cause the app to fail to start up properly. This could lead to problems when trying to access local storage. By default, if the app can't load the local storage, it resets it entirely to ensure the app is able to start. However, I have reworked this exact code to give the user the option to either reset the storage or restart the app.