Clon1998 / mobileraker

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

Android app can't connect to pinter after a few days #368

Closed caste1200 closed 4 months ago

caste1200 commented 6 months ago

Bug Report

Description

Mobileraker stops connecting to my printer after a couple of days. I keep getting notifications of printing progress but can't connect on the app.

Steps to Reproduce

  1. Link printer to mobileraker using tailscale
  2. Keep using it for a couple of days even outside of local network
  3. Stops working after a couple of days out of nowhere

Expected Behavior

Being able to connect

Screenshots

Screenshot_20240517-104351~2 Screenshot_20240517-104544~2

Version Information

Debug Logs

Please attach the log files generated by Mobileraker. You can find them by navigating to the app's settings page, scrolling to the bottom, and pressing the Debug Logs button.

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 6 months ago

Hey, first of all, it seems like your printer and websocket address are different ignoring '/websocket'. This should nearly never be the case.

Secondly, if the issue occurs, are other UIs working/is the printer still reachable?

caste1200 commented 6 months ago

Hey, first of all, it seems like your printer and websocket address are different ignoring '/websocket'. This should nearly never be the case.

Secondly, if the issue occurs, are other UIs working/is the printer still reachable?

Hi, I can still reach the printer with Obico without any issues. And for the websocket, wich address should I use? When I enter on both my tailscale address, it is not able to connect

Clon1998 commented 6 months ago

I've just double checked and it actually does not matter to much what you enter there.

My current suspicion is that the tailscale network closes the connection/can be slow form time to time. Therefore try to increase the client timeout to 10/20sec to ensure the app has more time to fetch the data.

This can be done in the printer settings.

caste1200 commented 6 months ago

I've just double checked and it actually does not matter to much what you enter there.

My current suspicion is that the tailscale network closes the connection/can be slow form time to time. Therefore try to increase the client timeout to 10/20sec to ensure the app has more time to fetch the data.

This can be done in the printer settings.

I tried with 60s and still same error

caste1200 commented 6 months ago

Screenshot_20240517-184849 I just sent a temp tower and as you can see I have notifications on this but if I open the app, same error. Obico has no issues. Maybe I did the configuration wrong? Is there somewhere a guide on how to connect the printer via tailscale?

Clon1998 commented 6 months ago

I'll get back to you tomorrow. If I don't feel free to ping me again.

In the meantime, can you try to use the tail scale address in your browser to verify if that is also not working if mobileraker is not working?

Clon1998 commented 6 months ago

Hey,

I just checked and my remote connection is working, but I'm not using Tailscale. It's important to note that the notifications work independently of any remote connection, as they use Google's/Apple's push service servers to deliver notifications.

If the app stops connecting to the Tailscale instance again, please check if the issue also occurs in your browser. This would indicate a problem with your Tailscale setup.

caste1200 commented 5 months ago

its working again, restarted my phone, disabled and re-enabled tailscale on phone. Also removed the key expiry... not sure if that is what it was causing it since I have the feeling that everytime it works, it only works for a couple of days and then stops working