Client stops updating

As discussed on on the MUCK itself, there’s been some instances where the client stops updating. Sometimes it picks back up on its own, sometimes not, depending on the retries in CharPing. I happened to catch this in the console this time!

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.wolfery.com/api/core/char/c59r49gt874dppk865c0/ctrl/ping. (Reason: CORS request did not succeed). Status code: (null).

[CharPing worker] Error pinging c59r49gt874dppk865c0. Retrying in 15 seconds: TypeError: NetworkError when attempting to fetch resource. CharPing.worker.8d770eda.worker.js:1:1474
The connection to wss://api.wolfery.com/ was interrupted while the page was loading.

Nothing looks out of place on the WebSocket connection itself, since this appears to be a network thing, it just closes with Connection Closed: 1006

CORS :sweat: . I really don’t like CORS issues. I thought connecting to the api.wolfery.com subdomain would not be blocked by CORS (and it isn’t on my Chrome v101).

But the CORS might surely be the reason @Windchaser is having issues as well.
I’ll try to troubleshoot it more today.

@Makyo, what browser (incl. version) do you use? And do you have any adblock plugins? If I knew your setup, I could hopefully replicate the issue more easily.

(And, no, we don’t have ads. But I thought that maybe adblock plugins could falsely interpret the connection to api.wolfery.com as a possible CORS connection for ads)

And thanks for helping me! :smiley:

I’m currently using Firefox 100.0 via the snap store (a decision that’s currently causing problems but about which I can do nothing). I’m also using uBlock Origin, Privacy Badger, Facebook Container, and DuckDuckGo Privacy essentials. None of them are showing anything blocked, thankfully!

Another thing that might be worth considering is that I live in the middle of nowhere, so my internet is cellular or Starlink, both of which can get pretty flaky. WebSockets seem faaairly resilient, but sometimes, the connection will drop for 10-20 seconds a few times within a 10 minute period. I can normally tell when mosh gives me the connection lost bar, so I have a pretty good time of exactly when, but I haven’t been checking to see if that coincides with sudden CORS issues as my connection staggers back to life. The CORS issue could just be a red herring, there; receives a null status during the ping POST and the browser/JS interprets it as CORS stuff.

I don’t normally have any visibility as to whether this is the case beyond seeing mosh complain, unfortunately. The WiFi itself doesn’t drop, so all of my indicators show green. I’ll keep an eye on this, though, maybe I can catch them lining up.

Thanks for the detailed answer!

It is confusing for multiple reason:

  1. CORS should be totally unrelated to any of this (so yes, it might be a red herring (which I had to check the meaning of :sweat_smile: ) ))
  2. I am on fiber and still experience this occasionally, so connection might not be the issue either
  3. Issue seems to be cross browser … if we have the same issue. But it seems so.
  4. Windy’s issue (which might be related) just stopped being an issue

I have a feeling that it only happens for me when my tab has been open a while. I will see if I can verify this.

I will try to setup the test server again and see if I can replicate it there with bots.

I setup a test server which is a replica of Wolfery, and some spammy bots to infest Station Park. Hopefully I will be able to replicate the issue.

Also, I have fixed an issue where image files were linked to file.wolfery.mucklet.com (a cross-domain URL) instead of file.wolfery.com (only a different subdomain). Not sure if this could have had any effect on the issue.