Cannot edit file in browser #13101

Closed
opened 2025-11-02 10:30:59 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @jeroen-80 on GitHub (Jun 4, 2024).

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

Originally created by @jeroen-80 on GitHub (Jun 4, 2024). ### 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
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:30:59 -06:00
Author
Owner

@silverwind commented on GitHub (Jun 4, 2024):

Which browser/version?

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

@silverwind commented on GitHub (Jun 4, 2024): Which browser/version? Missing browser feature is https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices.
Author
Owner

@jeroen-80 commented on GitHub (Jun 4, 2024):

Which browser/version?

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

@jeroen-80 commented on GitHub (Jun 4, 2024): > Which browser/version? MS Edge (on Windows 10), latest & greatest.
Author
Owner

@silverwind commented on GitHub (Jun 4, 2024):

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

@silverwind commented on GitHub (Jun 4, 2024): Can you reproduce the error on https://microsoft.github.io/monaco-editor/playground.html?
Author
Owner

@silverwind commented on GitHub (Jun 11, 2024):

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 on GitHub (Jun 11, 2024): 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. <img width="1014" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/d1b25549-39e8-4de4-98f8-93f77e2c63c5">
Author
Owner

@silverwind commented on GitHub (Jun 11, 2024):

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

@silverwind commented on GitHub (Jun 11, 2024): Upstream issue: https://repo.palemoon.org/MoonchildProductions/UXP/issues/2526
Author
Owner

@jeroen-80 commented on GitHub (Dec 4, 2024):

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

Upstream issue is fixed. Issue in gitea unchanged, with nowadays 1.22.4.

@jeroen-80 commented on GitHub (Dec 4, 2024): > Upstream issue: https://repo.palemoon.org/MoonchildProductions/UXP/issues/2526 Upstream issue is fixed. Issue in gitea unchanged, with nowadays 1.22.4.
Author
Owner

@wxiaoguang commented on GitHub (Dec 4, 2024):

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

Upstream issue is fixed. Issue in gitea unchanged, with nowadays 1.22.4.

Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work? Do you see browser errors when using Gitea and/or the monaco-editor?

@wxiaoguang commented on GitHub (Dec 4, 2024): > > Upstream issue: https://repo.palemoon.org/MoonchildProductions/UXP/issues/2526 > > Upstream issue is fixed. Issue in gitea unchanged, with nowadays 1.22.4. Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work? Do you see browser errors when using Gitea and/or the monaco-editor?
Author
Owner

@jeroen-80 commented on GitHub (Dec 4, 2024):

Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work?

I cannot test since the system is offline :) However the same browser on another systen with (I guess) the same settings works.

Do you see browser errors when using Gitea and/or the monaco-editor?

Only errors in the browser console. The browser does not show the file content, and an animation that runs forever.

image

@jeroen-80 commented on GitHub (Dec 4, 2024): > Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work? I cannot test since the system is offline :) However the same browser on another systen with (I guess) the same settings works. > Do you see browser errors when using Gitea and/or the monaco-editor? Only errors in the browser console. The browser does **_not_** show the file content, and an animation that runs forever. ![image](https://github.com/user-attachments/assets/3af21f57-03f6-4fc9-99fa-805f8597b4bf)
Author
Owner

@wxiaoguang commented on GitHub (Dec 5, 2024):

Do you see browser errors when using Gitea and/or the monaco-editor?

Only errors in the browser console. The browser does not show the file content, and an animation that runs forever.

@wxiaoguang commented on GitHub (Dec 5, 2024): > > Do you see browser errors when using Gitea and/or the monaco-editor? > > Only errors in the browser console. The browser does **_not_** show the file content, and an animation that runs forever. * Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work? * yes or no? * Do you see browser errors when using Gitea and/or the monaco-editor? * when using Gitea, do you see browser errors (including console)? If yes, what are the errors? * when using https://microsoft.github.io/monaco-editor/playground.html, do you see browser errors (including console)? If yes, what are the errors?
Author
Owner

@silverwind commented on GitHub (Dec 5, 2024):

Make sure MS Edge is not in Compatibility mode for that site. The kind of errors you are seeing indicate that you are using a very outdated browser engine.

@silverwind commented on GitHub (Dec 5, 2024): Make sure MS Edge is not in Compatibility mode for that site. The kind of errors you are seeing indicate that you are using a very outdated browser engine.
Author
Owner

@wxiaoguang commented on GitHub (Dec 5, 2024):

Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work?

I cannot test since the system is offline :) However the same browser on another systen with (I guess) the same settings works.

Hmm, missing this reply.

The editor does not need any external network access. And I have tested "offline", the editor does work.

So, since "the same browser on another system", I think you need to figure out what's the difference, it doesn't seem to be related to Gitea. Maybe your "offline" browser is corrupted?

Do you see browser errors when using Gitea and/or the monaco-editor?

Only errors in the browser console. The browser does not show the file content, and an animation that runs forever.

The errors in console might tell you details.

So do you see any browser error (including console)? If yes, what are the errors?

@wxiaoguang commented on GitHub (Dec 5, 2024): > > Does https://microsoft.github.io/monaco-editor/playground.html?source=v0.52 work? > > I cannot test since the system is offline :) However the same browser on another systen with (I guess) the same settings works. Hmm, missing this reply. The editor does not need any external network access. And I have tested "offline", the editor does work. So, since "the same browser on another system", I think you need to figure out what's the difference, it doesn't seem to be related to Gitea. Maybe your "offline" browser is corrupted? > > Do you see browser errors when using Gitea and/or the monaco-editor? > > Only errors in the browser console. The browser does **_not_** show the file content, and an animation that runs forever. The errors in console might tell you details. So do you see any browser error (including console)? If yes, what are the errors?
Author
Owner

@jeroen-80 commented on GitHub (Dec 10, 2024):

So, since "the same browser on another system", I think you need to figure out what's the difference, it doesn't seem to be related to Gitea. Maybe your "offline" browser is corrupted?

Bingo! Both are Windows 10 boxes, with the latest Windows Updates and Edge. So I though the were the same. It seems they're not. Windows Update does not update Edge, at least not in my setup. So although the base systems were the same, the Edge browsers were not. I've updated Edge from within the appliaction and the issue is fixed. Thank you for your help!

@jeroen-80 commented on GitHub (Dec 10, 2024): > So, since "the same browser on another system", I think you need to figure out what's the difference, it doesn't seem to be related to Gitea. Maybe your "offline" browser is corrupted? Bingo! Both are Windows 10 boxes, with the latest Windows Updates and Edge. So _I though_ the were the same. It seems they're not. Windows Update does _not_ update Edge, at least not in my setup. So although the _base systems_ were the same, the Edge browsers were not. I've updated Edge from within the appliaction and the issue is fixed. Thank you for your help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13101