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.01k stars 5.31k forks source link

Cannot edit file in browser #31252

Open jeroen-80 opened 4 weeks ago

jeroen-80 commented 4 weeks ago

Description

Running 1.22.0 in offline mode on offline system. Try to edit a text file in the browser. Fails, error in browser console:

monaco.14c11225.js:559

Uncaught (in promise) SyntaxError: Invalid flags supplied to RegExp constructor 'd'
    at new RegExp (<anonymous>)
    at Object../node_modules/monaco-editor/esm/vs/editor/browser/services/editorWorkerService.js (monaco.14c11225.js:559)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js (monaco.14c11225.js:638)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/color.js (monaco.14c11225.js:638)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js (monaco.14c11225.js:638)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorContributions.js (monaco.14c11225.js:638)
./node_modules/monaco-editor/esm/vs/editor/browser/services/editorWorkerService.js @ monaco.14c11225.js:559
__webpack_require__ @ bootstrap:19
./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.js @ monaco.14c11225.js:638
__webpack_require__ @ bootstrap:19
./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/color.js @ monaco.14c11225.js:638
__webpack_require__ @ bootstrap:19
./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js @ monaco.14c11225.js:638
__webpack_require__ @ bootstrap:19
./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/browser/colorContributions.js @ monaco.14c11225.js:638
__webpack_require__ @ bootstrap:19
include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.main.js @ monaco.14c11225.js:430
__webpack_require__ @ bootstrap:19
async function (async)
(anonymous) @ repo-editor.js:134
Qv @ repo-editor.js:177
(anonymous) @ index.js:153

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Install package = dl.gitea.io. Running on Ubuntu 20.04 LTS native.

Database

None

silverwind commented 4 weeks ago

Which browser/version?

Missing browser feature is https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices.

jeroen-80 commented 4 weeks ago

Which browser/version?

MS Edge (on Windows 10), latest & greatest.

silverwind commented 4 weeks ago

Can you reproduce the error on https://microsoft.github.io/monaco-editor/playground.html?

silverwind commented 3 weeks ago

In PaleMoon, I can reproduce on https://microsoft.github.io/monaco-editor/playground.html?source=v0.49.0. No idea about Edge, it should support.

image
silverwind commented 3 weeks ago

Upstream issue: https://repo.palemoon.org/MoonchildProductions/UXP/issues/2526