go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.36k stars 5.43k forks source link

Javascript error after updating to 1.17.0 #20824

Closed wolfbeast closed 2 years ago

wolfbeast commented 2 years ago

Description

I'm in the process of updating out Gitea instance to 1.17.0 from 1.12.6, and ran into it throwing a JS error after upgrading and migrating successfully.

09:54:40.024 error { target: SharedWorker, isTrusted: true, message: "ReferenceError: EventSource is not defined", filename: "https://repo.palemoon.org/assets/js/eventsource.sharedworker.js", lineno: 1, colno: 85, srcElement: SharedWorker, currentTarget: SharedWorker, eventPhase: 2, bubbles: false, cancelable: true } 1 index.js:37:15714
    Gg/< https://repo.palemoon.org/assets/js/index.js:37:15714

This is on the Pale Moon web browser (we use Gitea for Pale Moon development). Of note, Pale Moon does not support the ambiguous global window.event MSIE quirk (deprecated on mainstream browsers also) which may be the issue here?

Screenshots

gitea1

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Windows 10

Browser Version

Pale Moon 31.2.0.1

lunny commented 2 years ago

Should be fixed by #20663

wolfbeast commented 2 years ago

Thanks! I did some digging myself and found it seems to be because while we do support EventSource (and have since forever) and SharedWorkers, we currently don't support EventSource in workers. I opened an issue on our end to fix that, as well.

of note attempting to disable EventSource use through EVENT_SOURCE_UPDATE_TIME = -1 doesn't actually help here.

silverwind commented 2 years ago

BTW, does PaleMoon support Websocket inside SharedWorker?

wolfbeast commented 2 years ago

BTW, does PaleMoon support Websocket inside SharedWorker?

Yes, websockets are available in workers.

eeyrjmr commented 2 years ago

Is this related to or a duplicate of : https://github.com/go-gitea/gitea/issues/20572

wolfbeast commented 2 years ago

@eeyrjmr Yes it seems to be a duplicate. I'll just wait for it to make it to the release train.