evennia
evennia copied to clipboard
[BUG] Webclient fails cryptically in local dev with no internet
Describe the bug
When running evennia locally for development purposes on a machine without an internet connection, the webclient fails with a blank page and a DNS error in the logs.
This is presumably caused by the page's failure to load the remotely linked bootstrap CSS file at the beginning.
To Reproduce
Steps to reproduce the behavior:
- Disconnect your machine from the internet
- Start up a local evennia instance
- Go to the webclient on localhost
- See error
Expected behavior
There should be, at minimum, some kind of visible fail state in the webclient page if it fails to load for whatever reason, rather than just a blank page. e.g. the remotely-linked javascript libraries do have fallback blocks if they fail to load.
Environment, Evennia version, OS etc
Evennia 1.2, a machine without internet
Additional context
One solution might be to load the remote CSS via javascript with a fallback, similarly to how the remotely linked JS libraries work.
Another solution would be to package the remote libraries with evennia itself. This would remove the dependency on the remote servers entirely - especially since the webclient is coded to use specific versions of the libraries as it is. On the other hand, it would place more bandwidth demands on the evennia server itself. (I don't personally think this would pose a significant problem.)
This issue has little effect on the end-user for production servers.
We tried packing the libs with Evennia for a spell, but it adds a lot of cruft to the repo and is something I'd prefer to avoid. We could display a more relevant error message if not able to get the css file though.
Hm, I can't reproduce that behavior. When trying to run the browser in offline mode I get the following message
which is at least making it pretty clear what is going on.
@InspectorCaracal Ping. I can't reproduce this error and need more info. I only tested in firefox, maybe that's the issue?
I learned about this originally via owllex on discord and I can't remember whether I reproduced it myself or not any more, so I'll see if I can make it happen again. If not, I'll check with owllex about it.