-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
JavaScript promise rejection: TypeError: Cannot read properties of undefined (reading 'facebook.json'). Open browser console to see more details. #29273
Comments
It is caused by your browser extension's bug. If you don't like to see the message, you could add your customized CSS styles to hide such prompts ( |
@wxiaoguang Thanks, If it is a browser extension bug, try.gitea.io is fine. |
Closing the browser extension |
Maybe we can somehow detect when a error is not coming from our scripts, and don't display errors from third-party scripts based on script file |
Can someone link the extension that causes this from Chrome Store/Mozilla Addons? |
And maybe it's time to stop showing the JS errors to end users? Only show it in dev mode and for site admin? |
That'd also be an option, but I'm not sure I like it too much because sometimes we do get valuable issue reports from it. |
Can be reproduced with a Violentmonkey script: // ==UserScript==
// @name Gitea error trigger
// @match http://localhost:3000/*
// ==/UserScript==
(async () => {
throw new Error("error from userscript");
})() |
So I checked it: It is possible in Firefox to detect extension scripts via |
So we don't get issues like #29080 and #29273 any more. Only active in [production builds](https://webpack.js.org/guides/production/#specify-the-mode), in non-production the errors will still show.
So we don't get issues like go-gitea#29080 and go-gitea#29273 any more. Only active in [production builds](https://webpack.js.org/guides/production/#specify-the-mode), in non-production the errors will still show.
Backport #29303 by @silverwind So we don't get issues like #29080 and #29273 any more. Only active in [production builds](https://webpack.js.org/guides/production/#specify-the-mode), in non-production the errors will still show. Co-authored-by: silverwind <[email protected]>
So we don't get issues like go-gitea/gitea#29080 and go-gitea/gitea#29273 any more. Only active in [production builds](https://webpack.js.org/guides/production/#specify-the-mode), in non-production the errors will still show. (cherry picked from commit 532da5ed5ee3edb45d2ee63c6ab0fad53473691f)
Description
Gitea upgraded from 1.20.5 to 1.21.5, and the Web frontend gives an error:
The problem persisted even after Chrome's cache was cleared.
browser console output:
Screenshots
Gitea Version
1.21.5
Can you reproduce the bug on the Gitea demo site?
No
Operating System
Windowns
Browser Version
Chrome 121.0.6167.185
The text was updated successfully, but these errors were encountered: