Flask issue when updating using the Webui
- @david
Update returned with a failure, then got the nginx gateway error. Logged in via ssh, verified what services were involved, tinypilot failed with flask error.
Is there a method to re install from a script when in this state??
- In reply torkb405⬆:David @david2023-07-25 11:40:17.624Z
Hi @rkb405, I'm sorry you're running into this issue after updating your TinyPilot.
From your description, this unfortunately sounds like it could be filesystem corruption. Missing files/directories and a failed update are common signs of the issue. I understand that you want to fix this without re-flashing your SD card, so I'll see if there's anything else we can do before I suggest a re-flash.
Since you have SSH access, can you share a TinyPilot log with me to review?
sudo /opt/tinypilot-privileged/collect-debug-logs
The command will collect your logs, but it won’t upload them to TinyPilot’s servers until you confirm. Once you confirm, can you copy the URL and paste it in your reply?
- RIn reply torkb405⬆:@rkb405
I already reflashed. I tried to comb through the tinypilot configs and could not find a way to reinstall. I know you guys have to protect your application, but a there needs to be a proper in place repair that can be done while remote, since these things are meant to be installed... .. . .Remote
- David @david2023-07-26 11:13:10.203Z
Thanks for the update, @rkb405! I'm glad you're back up and running after a re-flash.
I understand how frustrating it is to have to re-flash your SD card - especially if your device is remote.
Unfortunately, filesystem corruption isn't something that's easily fixable since it's difficult to determine the scale of the issue. Re-installing the TinyPilot software likely wouldn't restore functionality for long since the underlying filesystem is causing the issues you experienced.
The problem lies with microSD cards as a storage media. Unfortunately, microSD cards are more vulnerable to filesystem corruption than solid-state drives or hard disks.
The TinyPilot team has been focusing on minimizing these failures. One of the major improvements in TinyPilot 2.6.0 is a reduction in the amount of disk writes during updates to make it less likely you'll experience filesystem corruption. Enabling the read-only filesystem can also help increase the lifespan of your microSD card and help further reduce the risk of filesystem corruption.
Please let me know if you have any other questions or issues.