evennia icon indicating copy to clipboard operation
evennia copied to clipboard

[BUG] Webclient fails cryptically in local dev with no internet

Open InspectorCaracal opened this issue 1 year ago • 4 comments

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:

  1. Disconnect your machine from the internet
  2. Start up a local evennia instance
  3. Go to the webclient on localhost
  4. 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.

InspectorCaracal avatar Apr 13 '23 17:04 InspectorCaracal

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.

Griatch avatar Apr 13 '23 18:04 Griatch

Hm, I can't reproduce that behavior. When trying to run the browser in offline mode I get the following message 2023-04-29_08-16 which is at least making it pretty clear what is going on.

Griatch avatar Apr 29 '23 06:04 Griatch

@InspectorCaracal Ping. I can't reproduce this error and need more info. I only tested in firefox, maybe that's the issue?

Griatch avatar Aug 06 '23 15:08 Griatch

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.

InspectorCaracal avatar Aug 06 '23 23:08 InspectorCaracal