It’s not always the case that an app gives you an AppOfflineError
after a period of inactivity. (I think @p.colbert might be thinking about SessionExpiredError
, which will usually happen after about 30 mins of inactivity).
You might find this part of a different thread helpful. (“Connection to server failed” here refers to an AppOfflineError
)
The “Connection to server failed” error is a different kettle of fish. This is an error the browser gives us when it can’t connect a websocket, and the websocket is how we do
anvil.server.call()
s. The most typical cause of this is a user’s internet connection flaking out for a second, although it can also be caused by corporate firewalls that shoot down websocket connections. In the former cases (ie most of the time) you’ll find that if you retry the call a moment later it will usually work, so the recommended approach is a global error handler to turn that temporary connectivity issue into a more pleasant experience for the user.