Javascript error when viewing a repo #13811

Closed
opened 2025-11-02 10:53:50 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @rubenelshof on GitHub (Dec 11, 2024).

Description

Upon viewing a repository I get the following Javascript error:

JavaScript error: Cannot read properties of null (reading 'addEventListener') (https://git.example.com/assets/js/index.js?v=1.23.0~dev-792-g39a01016cd @ 111:29734). Open browser console to see more details.

Console error:

repo-common.ts:79 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at uh (repo-common.ts:79:10)
    at Tv (repo-common.ts:95:3)
    at He (dom.ts:65:7)
    at ue (dom.ts:91:10)
    at Lv (repo-common.ts:106:3)
    at Ty (repo-legacy.ts:82:3)
    at y1 (index.ts:113:7)
    at HTMLDocument.<anonymous> (index.ts:123:3)

Gitea Version

1.23.0+dev-792-g39a01016cd

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

gitea error

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

None

Originally created by @rubenelshof on GitHub (Dec 11, 2024). ### Description Upon viewing a repository I get the following Javascript error: `JavaScript error: Cannot read properties of null (reading 'addEventListener') (https://git.example.com/assets/js/index.js?v=1.23.0~dev-792-g39a01016cd @ 111:29734). Open browser console to see more details.` Console error: ``` repo-common.ts:79 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener') at uh (repo-common.ts:79:10) at Tv (repo-common.ts:95:3) at He (dom.ts:65:7) at ue (dom.ts:91:10) at Lv (repo-common.ts:106:3) at Ty (repo-legacy.ts:82:3) at y1 (index.ts:113:7) at HTMLDocument.<anonymous> (index.ts:123:3) ``` ### Gitea Version 1.23.0+dev-792-g39a01016cd ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![gitea error](https://github.com/user-attachments/assets/69577c3f-080a-49bf-9e6b-37cb1429d34d) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Docker ### Database None
GiteaMirror added the type/bug label 2025-11-02 10:53:50 -06:00
Author
Owner

@lunny commented on GitHub (Dec 11, 2024):

Maybe caused by #31142

@lunny commented on GitHub (Dec 11, 2024): Maybe caused by #31142
Author
Owner

@rubenelshof commented on GitHub (Dec 12, 2024):

Maybe caused by #31142

It could be.
When I click the 'Code' button it doesn't give me the dropdown menu as shown in the screenshots of that PR.

@rubenelshof commented on GitHub (Dec 12, 2024): > Maybe caused by #31142 It could be. When I click the 'Code' button it doesn't give me the dropdown menu as shown in the screenshots of that PR.
Author
Owner

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

Will fix it

@wxiaoguang commented on GitHub (Dec 12, 2024): Will fix it
Author
Owner

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

-> Fix clone panel js error #32798

@wxiaoguang commented on GitHub (Dec 12, 2024): -> Fix clone panel js error #32798
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13811