-
QuestionHi I ran into a weird issue with iOS web app (PWA) Here are the logs of this problem: the connection was closed after being re-established # Close the app (move back to homescreen) and the connection closed after a few seconds ✅
2024-10-08T07:15:13Z nrt [info]INFO: connection closed
# Reopen the web app and the connection was re-established ✅
2024-10-08T07:18:19Z nrt [info]INFO: ('***', ***) - "WebSocket /socket.io/?client_id=***&EIO=4&transport=websocket" [accepted]
2024-10-08T07:18:19Z nrt [info]INFO: connection open
2024-10-08T07:18:21Z nrt [info]INFO: Getting user timezone...
2024-10-08T07:18:21Z nrt [info]INFO: User timezone from storage: Asia/Shanghai
2024-10-08T07:18:21Z nrt [info]INFO: Getting user habit list
2024-10-08T07:18:21Z nrt [info]INFO: [CRUD] User be1dbc01-*** habit list query
2024-10-08T07:18:22Z nrt [info]INFO: *** - "GET /gui HTTP/1.1" 200 OK
# The connection was closed after being re-established ❌
# Note: "⚠️ Connection lost" error message popped up in the bottom left corner.
2024-10-08T07:18:22Z nrt [info]INFO: connection closed
2024-10-08T07:18:22Z nrt [info]INFO: *** - "GET /_nicegui/1.4.37/static/fonts.css HTTP/1.1" 304 Not Modified
...
2024-10-08T07:18:23Z nrt [info]INFO: *** - "GET /_nicegui/1.4.37/static/fonts/e62204447c1ed92a.woff2 HTTP/1.1" 304 Not Modified
2024-10-08T07:18:24Z nrt [info]INFO: *** - "WebSocket /socket.io/?client_id=***&EIO=4&transport=websocket" [accepted]
2024-10-08T07:18:24Z nrt [info]INFO: connection open I tested the nicegui main page with the same steps above but failed to reproduce the issue. So there must be something wrong with my code. However, troubleshooting this problem without a reproduction case is challenging... Could you provide any possible root cause or debugging tips? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I tried the aysncio debugging from the wiki but had no luck. def startup():
loop = asyncio.get_running_loop()
loop.set_debug(True)
loop.slow_callback_duration = 0.05
app.on_startup(startup) |
Beta Was this translation helpful? Give feedback.
-
Are you running multiple instances of the server? |
Beta Was this translation helpful? Give feedback.
-
Well.. I think we need a minimal reproducible example. Otherwise we can not help out. |
Beta Was this translation helpful? Give feedback.
Since this is an issue related to iOS instead of nicegui, I will do some research and update a solution if one is found.
Thank you anyway, @rodja.