Firefox experiences Network Protocol Violation on Discourse based Websites

While this might be the case, Discourse is the only Site I frequent that causes this Issue. Anything else works just fine, even if there is Network Issues or broken WIFI (Well fine as in Firefox knows the Network is offline as opposed to trying to connect and failing with a Network Protocol Violation).

1 Like

I do not have privacy badger for note.

Firefox has also not restarted in weeks.

I run uMatrix and some Dark Reader clone, but it still happens in Firefox safe mode without extensions.

Same, I only see it on, and it happens frequently on, any discourse powered site, whether first party or self hosted.

1 Like

By triggering a hard refresh instead of showing the offline page, wouldnā€™t we get around that problem?

If the server is down, the user will get a proper error; if itā€™s just their connection being temperamental theyā€™ll either eventually load the site, or get a timeout error.

1 Like

I would be fine if it at least loaded the page properly on the first try. Right now people dont even register to my Forums because the whole oauth popup window is giving that same error and they think everything is broken and highly insecure. And i had that popup breaking on this meta discourse forum too, when I registered to make this report. (see screenshot)

Something should to be done to address the issue, and I would be sad if I heard something along the lines of ā€œlets bug Firefox until they never fix itā€, because I am very sure they will just say ā€œFix your Websiteā€, and then we get the eternal ping-pong of nothing ever happening on either Side. And I did get this vibe from a few (but ofcourse not all) people here, it just happened too often to me when developing stuff, to not notice it when it is likely to happen.

But Iā€™m a tad bit paranoid and dont know people here, so please prove me wrong. :wink:

1 Like

We donā€™t have any customers (out of 600+ customers) reporting this problem, so it is likely specific to your configuration or networking somehow.

So I tried it on Firefox on my old Windows 8 Laptop (ofcourse Firefox got updated to Version 62 before the Test) and it did not happen there (Same Router doing the Internet).

To compile all the Info together:

  • my zotac zbox + Kubuntu 18.04 + Firefox 62 + no extensions + my network setup = error on first try, always
  • my Asus laptop + Windows 8 + Firefox 62 + my network setup = works
  • device from someone who complained to me + linux mint + Firefox 62 + no extensions = error on first try, always
  • proprietary company computers + windows 10 + Firefox 62 = sometimes error sometimes works
  • Firefox + Privacy Badger = sometimes error sometimes works
  • Crappy Asus Netbook + Wireless Dongle = sometimes error
  • Someone, who told me this happens without specifying any of their system details = error

So I doubt itā€™s just particular Setups, since it can happen to any OS (unsure if Apple is affected) and with any Network. The only thing they have in common is a somewhat up to date Firefox and that they are somehow logged into Discourse or trying to do so.

And since it doesnā€™t affect any other sites in Firefox this way (in this consistent fashion), I would bet its somewhere in Discourse, maybe one of the Lines mentioned in previous comments.

1 Like

Itā€™s happened to me a few times since I posted 3 days ago. Maybe I jinxed myself. I can also confirm that Iā€™ve only seen this error on Discourse sites, including this one, freepbx.org, and my own. Iā€™m on Firefox 62.0.

A new version of Privacy Badger was just released today. I just updated. Iā€™ll report back if I encounter any issues.

1 Like

And I got another Report from a Firefox User who has this Issue. Same Firefox Version and same Kubuntu Version that I have though. He gave me this Screenshot.

1 Like

Iā€™ve seen people complaining about it on a large number of discourse forums, they are usually ignored as a ā€˜refresh fixes itā€™. But it happens on these forums itself, on other forums, for quite a number of people, etcā€¦ It is quite a bad user experience. Personally Iā€™ve seen it here at meta.discourse.org, on the rust forums, elixir forums, gradle forums, every single discourse site that Iā€™ve seen and itā€™s happened on multiple computers that I use, including my home computer here just a few minutes ago (which is odd because it doesnā€™t happen that often here, it reminded me of this thread). I still do not have privacy badger, adblock, or the sort, just uMatrix (which Iā€™ve disabled as a test to no avail) and a dark reader extension (also tested disabling to no avail in the past).

1 Like

I recommend switching to Chrome, which does not have these problems. Or any other non-Firefox based browser. You may wish to file bugs against the Firefox project.

I already primarily do use chrome (I am right now), not everyone does however, nor do users of the forums, and that initial message is often a very quick turn-off for them and they go away to not return (directly reported as such).

This old post here looks somewhat related:
https://meta.discourse.org/t/cannot-load-app-for-a-meta-topic/78008

The post at elixir forums about it (have to be logged in):
https://elixirforum.com/t/problem-with-elixirforum-content-error/14885

A pixls forum discussion (of which clearing the cache, which clears the webworker, fixed it, though who knows for how long):

Manjaro forum:
https://forum.manjaro.org/t/corrupted-content-error-on-firefox/56148

And loaded firefox in safe mode, navigated to https://meta.discourse.org/, site loaded, clicked login, clicked github, and the page that popped up in the little window was (after a flicker of it going through github):


Of which clicking Try again and it worked.

So yes, I would love to hear of an idea to get everyone switched to a singular browser as it would make development so much easier in my day job, but that also sounds like stagnation waiting to happenā€¦ Until then, if you have any ideas for how to convince multiple non-dev, normal people to switch from their preferred browsers, especially when half the time they access the site then it will not load so they wonā€™t come back anyway, Iā€™m all ears.

Before posting this I tried a few more times in firefox, it seems that it loads fine in the main tab but when loading the github login page then on the redirect back from github it is doing that screen rather consistently. A potentially interesting screenshot:


Note how the site request never even appears as the service worker has hijacked it. When refreshing the page to continue then the service worker is performing a fetch request, which then continues the pipeline properly.

Whether a firefox bug or not, itā€™s only affecting discourse sites on any URL even while running firefox in safe mode

1 Like

Oh, and Iā€™ve heard of a similar issue happening with safari on iPadā€™s (but not safari on macosx), though never been able to confirm that so I canā€™t say one way or the other.

1 Like

It is a Firefox bug; you will need to report it to them, not us. We have no control over firefox bugs as we do not work on the Firefox project.

2 Likes

Didnā€™t the people who actively work on the actual Code of Discourse say in this Thread, that its likely an Issue on Discourse Side? Why are you trying to make people believe its not, without even trying to provide evidence?

You are kidding, right? People canā€™t just switch Browsers anytime they want, sometimes they have no choice, sometimes all other choices are bad, or cant even be installed.

What if this Bug actually also happens on Chrome, but Chrome decided to be more forgiving on this Error and just auto-refresh the Page whenever it happens? Then the User wouldnā€™t see the Issue, but the Issue itself still persists.

So please provide actual Information to this topic other than ā€œDonā€™t use Firefox, tell Firefox its brokenā€, even though Firefox might have a good reason to display this Error for the Discourse Service Worker.

1 Like

It looks like the solution suggested so far is ā€œclear cacheā€

https://support.mozilla.org/en-US/questions/1232773

https://support.mozilla.org/en-US/questions/1232935

1 Like

Yep and that one does definitely not work, especially if its the very first time opening the page (in case of registering an account).

I use Firefox full time on my desktop and have never seen this issue.

That said I see ZERO value in service worker request interception for any of the features we use on desktop including the desktop push notification plugin, and want to see this removed.

I will remove this myself in a week or two.

8 Likes

Yep, as stated prior, clearing the cache does fix it for a time, then it seems that when the webworker gets re-registered then it starts happening in short order, generally when another tab/window gets popped up via the site, like a 3rd party login request here on the meta site for example.

Yeah I see it super-rare at home as well, I can only seem to replicate it by logging out, logging in, then choosing either github or google or so, when they redirect back it just kind of dies with that error again. I canā€™t get it to replicate any other way. At work on windows 10 and Firefox Dev it happens on every initial load of the site in any new tab, extremely common there.

Ah awesome, thanks! If I can figure out who told me they had the safari-ipad issue then Iā€™ll have them try again as well at that time.

2 Likes

We already explicitly ban service workers on iOS/Safari AFAIK (cc @tgxworld ) so I do not think this is the same issue. (also if we are already giving Safari ā€œspecialā€ treatment, we might as well give Firefox the same free pass)

2 Likes

It was early this year, march or so I think. The firefox issue has been happening for at least a year for me sporadically, though I think it gave me a protocol violation error or something like that for a while in the same circumstances before changing to the current error that it gives now earlier this year. Would you happen to know when the service-worker being blocked on safari was done off-hand?

1 Like