Description
Gitea Version
1.16.0
Git Version
No response
Operating System
Windows Server
How are you running Gitea?
Windows service that starts gitea.exe
Database
SQLite
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
When clicking the edit button on issue comment etc. nothing happens and the following issue appears.
Just updated from 1.15.10 to 1.16.0
index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value') at HTMLDivElement.<anonymous> (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:3669) at Generator.next (<anonymous>) at index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5242 at new Promise (<anonymous>) at Ws (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5062) at HTMLDivElement.Bb (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:561) at HTMLDocument.dispatch (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:274187) at HTMLDocument.Nt.handle (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:272017) (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Ws @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Bb @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 dispatch @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1 Nt.handle @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1
Screenshots
No response
Activity
wxiaoguang commentedon Feb 1, 2022
Is it related to local cached files? What about Private Window or Ctrl+F5?
zeripath commentedon Feb 1, 2022
I think this is likely a duplicate of #18281
[-]Edit of comments noot possible[/-][+]Edit of comments not possible[/+]silverwind commentedon Feb 1, 2022
Please clear the browser cache including ServiceWorker cache. Issue should resolve within 24 hours of the last visit of the old version.
wxiaoguang commentedon Feb 2, 2022
@zeripath @silverwind If we make static files served in
/assets/public-{ver}/js/index.js
, then we do not need to ask users to clear their cache again and again (like this one #18476Unable to drag and drop issue cards from Kanban project
), we can be sure that users always get correct files after every release.Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack.
silverwind commentedon Feb 2, 2022
Yes, dynamic assets filenames are one solution, but most collaborators prefer the dynamic part in the filename, not in a folder name and this is also default webpack behaviour IIRC.
wxiaoguang commentedon Feb 2, 2022
most
sometimes is not correct. Before MVVM, most developers think jQuery is the best solution. I only care about what's the right thing to do.Arguing things without a feasible solution from time to time won't solve problems, maybe one year later there are still a lot of users complaining about "why should I refresh my cache when upgrading Gitea".
tautf commentedon Feb 2, 2022
To all, at the day of the update it did not work. Clearing the cache didn't help as well.
Today, it works fine. Multiple clients with different os and browsers. So likely its related to the browsers.
zeripath commentedon Feb 2, 2022
I have and had no problem with
/assets/public-{ver}/js/index.js
My only problem was with
/public-{ver}/...
and the creation of new top-level dirs that would require more username restrictions.lunny commentedon Feb 2, 2022
The top level is
/assets
which has been reserved. So I don't think there is any problem here.But I also don't like to add hash in the directory. Why not files? For files, we can have
xxxxx-1-index.js
andxxxxx-2-index.js
in future. It could be splitted. I assume the generated index.js will become more big. But for a directory with hash, it's more difficult to do that.wxiaoguang commentedon Feb 2, 2022
Please see the original closed PR, it already explained why. No one has done the refactoring of CodeMirror and other non-webpack resources.
Why it could be a problem? We can have version in directory and hash in filename at the same time. I do not know why
it's more difficult to do that
. And explained in the original PR, even if using version in directory name, we can still use hash in filename in future. This mechanism could never be a blocker.wxiaoguang commentedon Apr 7, 2022
It's highly likely related the cache problem, or maybe some issues which have been fixed (eg: #18281)
This one can be closed and there are already many other cache related issues.