-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
ReferenceError: EventSource is not defined
in Pale Moon
#20572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
did you clean browser cache? |
I tried it in a new clean profile, same result. |
Looks like the PaleMoon browser doesn't have the EventSource in its SharedWorker although it does have it in the non-sharedworker state. There are a few places we would need to look at to get this working: gitea/web_src/js/features/notification.js Lines 52 to 53 in 589677f
This would need to detect somehow that EventSource is not available in the SharedWorker, or better we would need to protect the constructor here to test if the source is extant:
and then the sharedworker dropped. Now, I don't think we explicitly support Palemoon. |
Some browsers do not have EventSource within the SharedWorker context even though it is available in the normal context. This leads to a global error percolating up to the main page. Here we simply wrap the new Source in a try/catch and catch the error falling back to a poller if so. Fix go-gitea#20572 Signed-off-by: Andrew Thornton <[email protected]>
Before 1.17, your javascript error will be hidden by webbrowser. In 1.17, they will be displayed on the top of the page. |
This issue is a prime example as to why:
Why that? |
FYI, some questions can be answered from #18971 and (#18971 (comment)) There are some FAQs like "What if some users do not want to see these errors?" and "What if I see JavaScript error", and it's always open to propose better solutions. |
Please have a try on try.gitea.io If the problem is fixed, I will send a backport to 1.17.1 |
Checked, no errors reported (neither on the page, nor in javasscript console) |
Thank you for the confirmation. The backport for 1.17 is in #20663 |
Unfortunately 1.17.1 doesn't seem to fix this error. I just upgraded our Pale Moon Gitea instance to it and it still throws.
|
Works for me on try.gitea.io. Have you cleared your cache after starting 1.17.1? |
🤦 OK, silly me. Caching issue. Sorry for the noise! |
Description
After updating to 1.17.0 with javascript enabled this time, after logging in I start getting errors about EventSource (see screenshot). (It doesn't happen when I'm logged out)
Developer console:
Actually, downgrading to 1.16.9 I still have the error, but only in the developer console not in the UI. As a workaround, I can add
to my
app.ini
, butEVENT_SOURCE_UPDATE_TIME
's documentation seems to suggest that the feature availability is auto-detected. (If I typeEventSource
into devconsole, I get back that it's afunction
, I don't know what gitea does to get it undefined...)Screenshots
This is running gitea locally, but I get the same result on try.gitea.org.

Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
Linux
Browser Version
Pale Moon 31.1.1
The text was updated successfully, but these errors were encountered: