Skip to content
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

TypeError: undefined is not an object (evaluating '_i18n.textEdited') #24770

Closed
HernanLencinas opened this issue May 17, 2023 · 11 comments
Closed
Assignees
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Milestone

Comments

@HernanLencinas
Copy link

Description

Some users are reporting that in the Gitea console, they are being shown the following error message:

JavaScript error: TypeError: undefined is not an object (evaluating '_i18n.textEdited') (https://git.cloudvalley.telecom.com.ar/assets/js/index.js?v=1.19.3 @ 54:663).
Open browser console to see more details.

Screenshot attached.

This happens randomly and from what we've observed, it mainly occurs with users using the Safari browser. We have checked the server and Gitea logs but haven't found any relevant error messages.

Users experiencing this issue also report that their user session is being closed, preventing them from working normally.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image
image

Git Version

2.31.1

Operating System

Linux

How are you running Gitea?

We are running Gitea from the binary available at https://dl.gitea.com/gitea/1.19.3/gitea-1.19.3-linux-amd64 on a virtual server.

Database

MySQL

@wxiaoguang
Copy link
Contributor

Do you mean that, if a user sees the error, then they refresh page, then the refreshed page doesn't have the error?

@wxiaoguang
Copy link
Contributor

I think I know the problem now.

Will propose a fix later (at most 1 day).

@wxiaoguang wxiaoguang added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label May 17, 2023
@wxiaoguang wxiaoguang self-assigned this May 17, 2023
@wxiaoguang wxiaoguang added this to the 1.19.4 milestone May 17, 2023
@HernanLencinas
Copy link
Author

When users encounter that error message, it closes their session, and they have to log in again. Then, while browsing the repositories, it may or may not appear. It seems to be quite random.

When the same user tries it with Chrome, it works without any issues.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 17, 2023

Oh .... if the user gets kicked-out, then that's another problem.

I think it has been fixed by #24330

The related issue is #24176 , there are more details.

The fix is only in 1.20 (you can try nightly), but it's not easy to backport hmm, not difficult.

According to my test, disabling Safari's "prevent cross-site tracking" could help.


I can try to send a partial backport to 1.19

@wxiaoguang
Copy link
Contributor

-> Fix safari cookie session bug #24772

I am not 100% sure but it looks like that's the problem (the user's session is closed after some time)

@HernanLencinas
Copy link
Author

Oh .... if the user gets kicked-out, then that's another problem.

I think it has been fixed by #24330

The related issue is #24176 , there are more details.

The fix is only in 1.20 (you can try nightly), but it's not easy to backport hmm, not difficult.

According to my test, disabling Safari's "prevent cross-site tracking" could help.

I can try to send a partial backport to 1.19

On our side, we can try upgrading to version 1.20 over the weekend, and once it's done, test again to see if the issue is solved.

lunny pushed a commit that referenced this issue May 18, 2023
Partically backport #24330

Related: #24176

Maybe fix #24770
@liyimeng
Copy link

Same problem here.

@wxiaoguang
Copy link
Contributor

Same problem here.

It could be another problem IMO. This issue about "user randomly gets logged out".

@wxiaoguang wxiaoguang added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label May 26, 2023
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this issue Jun 3, 2023
Partically backport go-gitea#24330

Related: go-gitea#24176

Maybe fix go-gitea#24770

(cherry picked from commit 64cc691)
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 6, 2023

I think this issue could be closed since #24772 has been backported to 1.19 nightly.

Feel free to reopen if there is any other problem.

@liyimeng
Copy link

liyimeng commented Jul 20, 2023

Is this fixed in 1.20.0. I upgrade this version, but still get the same errors

JavaScript error: TypeError: undefined is not an object (evaluating 'p.i18n.textEdited') (https://git.tdology.com/assets/js/index.js?v=1.20.0 @ 50:663). Open browser console to see more details.

I have safari Version 16.4 (18615.1.26.110.1)

The same problem on my iPhone.

@lunny
Copy link
Member

lunny commented Jul 20, 2023

Is this fixed in 1.20.0. I upgrade this version, but still get the same errors

JavaScript error: TypeError: undefined is not an object (evaluating 'p.i18n.textEdited') (https://git.tdology.com/assets/js/index.js?v=1.20.0 @ 50:663). Open browser console to see more details.

I have safari Version 16.4 (18615.1.26.110.1)

The same problem on my iPhone.

Could you try to clear your web browser cache?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Projects
None yet
Development

No branches or pull requests

4 participants