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
43.42k stars 5.34k forks source link

JavaScript error when editing md file with Palemoon 32.5.1 #28458

Closed veita closed 1 month ago

veita commented 7 months ago

Description

When editing a md file with Palemoon 32.5.1 the following error occurs:

JavaScript error: Error: (https://host.example.org/assets/js/index.js?v=1.21.2 @ 17:583).
Open browser console to see more details.

Gitea Version

1.21.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

JavaScript error: Error: (https://host.example.org/assets/js/index.js?v=1.21.2 @ 17:583).
Open browser console to see more details.

Git Version

git version 2.39.2

Operating System

Debian GNU/Linux 12 (bookworm) Release: 12

How are you running Gitea?

As a Systemd service.

Database

PostgreSQL

wxiaoguang commented 7 months ago

Quote: Open browser console to see more details.

wxiaoguang commented 7 months ago

It seems that the error comes from MonacoEditor.

Gitea has been using Monaco Editor for long time (#11366 , 1.12). In old releases, Gitea didn't report some kinds of JS errors to UI. In 1.21, many JS errors can be reported on the UI.

The root problem is that MonacoEditor can't run perfectly in PaleMoon, MonacoEditor code triggers JS errors in PaleMoon.

So, the possible reasons for why you see JS error message in 1.21 are:

  1. The error has been there for long time, but Gitea < 1.21 didn't show it. Gitea 1.21 exposes it, so you see it (I highly suspect this is the case).
  2. There was no error before Gitea 1.21 (old MonacoEditor), while the upgraded MonacoEditor in Gitea 1.21 triggers the new error (unlikely IMO).

You can try MonacoEditor here: https://microsoft.github.io/monaco-editor/

So maybe you need to make PaleMoon support MonacoEditor.

silverwind commented 7 months ago

At some point we have to think about whether it's worth it trying to support PaleMoon. It lags at least 3-4 years behind other browsers in terms of platform features.

If this is a upstream issue, of course file it to Monaco and/or VSCode repos.

silverwind commented 1 month ago

Duplicate of https://github.com/go-gitea/gitea/issues/31252, using that issue because it has the actual error.