greasyfork-org / greasyfork

An online repository of user scripts.
https://greasyfork.org
GNU General Public License v3.0
1.46k stars 435 forks source link

Script `History` tab rendering history of wrong script #1204

Closed nexushoratio closed 11 months ago

nexushoratio commented 11 months ago

The past few days I've noticed that when visiting a history tab for a script, it may use the history (and name) of some random script instead of the one I'm looking at. At times it feels like it happens more than half of the time.

Sometimes reloading will eventually load the right history.

Which script it does show history for seems to be random, though at the moment, the two tabs I'm looking at show the same history for some unrelated script. One I'm looking at is a userscript, the other a library.

https://greasyfork.org/en/scripts/478188-nh-xunit/versions xunit

https://greasyfork.org/en/scripts/472097-linkedin-tool/versions lit

nexushoratio commented 11 months ago

After taking a couple of minutes to file this report, a reload shows a different script:

lit2

Feels like bad values are cached somewhere?

nexushoratio commented 11 months ago

I managed to get the history for my own userscript to load. Then when I loaded my library, it showed me the history of my userscript.

Constantly reloading that page eventually got me the right content there. Though it bounced between a few different scripts in the mean time.

I wonder: if two browsers are loading different histories at the same time, do they end up seeing the same page?

JasonBarnabe commented 11 months ago

Feels like bad values are cached somewhere

Yup, the cache key was not correctly reading the script ID so whatever request happened first after expiry had its result stored for all scripts.

Your browser differences were likely due to you being logged in on one and not another.