AppOfflineError:

Hi,

So, I’m trying to connect my image classifier (input: brain MRI image, output: yes/no brain tumor) from Google colab (python) to Anvil and I’ve come across a few error messages that I have been able to solve, but I began getting this error message as of last night:

AppOfflineError: App is offline at [Form1, line 15](javascript:void(0))

I first thought Anvil was offline to do some updates but since I’m getting the error today as well, I’m not sure that’s the case? Here is my clone link if that is helpful and a screenshot of my code from the server, which is very similar to the dog vs cat image classifier example that Anvil has.

https://anvil.works/build#clone:DMX42OOXIFCCJBG6=ATO7HY55USUJOMCGENWNSLCO

I’m not sure if this is helpful or related but when I run this at the start of my client code

!pip install anvil-uplink
import anvil.server
anvil.server.connect("my uplink here") 

I get this message even after I follow its suggestion to restart the runtime.

Also, I did look at the forum first before posting this topic but it seems like the issue was resolved randomly for others or was resolved via email so I’m posting it again so that hopefully it will be useful for someone else in the future!

Thank you!

Antonio

I have noticed when pip installing the anvil-server that argeparse likes to update whether it actually needs to or not (even if the server was already installed). So I think it might work if you get rid of the !pip install anvil-uplink line.

Hmm okay I deleted the line from the client and the cell runs and I no longer get the “restart runtime” warning, but from the anvil server I still get the “AppOfflineError”

I found a solution more or less: the error goes away when I run the same code on my surface pro vs my mac. Same google chrome browser just a different device. Another user on the forum reported this trick worked for their problem as well.

I just got this error on my app. Simple refresh fixed it.

Interestingly, though, my app session showed the exception, which is odd for an app that’s supposedly offline:

AppOfflineError: Connection to server failed (error)
at Mysteries.Mystery, line 38
called from app/anvil_extras/routing/_router.py, line 250
called from app/anvil_extras/routing/_router.py, line 101
called from app/anvil_extras/routing/_router.py, line 101
called from app/anvil_extras/routing/_router.py, line 61
: [object Event]
1 Like