rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
144 stars 23 forks source link

Followed Games Page: fix bug that happens when continuously loading pages with Endless Scrolling #1690

Open Eiion opened 3 years ago

Eiion commented 3 years ago

Description When activating 3.13 and clicking the Followed page link on the left menu bar the All page loads (with this URL https://www.steamgifts.com/giveaways/search?esgst=fgp) and just all giveaways are shown - just like on the All page - with no filters applied and no indication of being on the Followed page.

Steps to Reproduce

  1. Go to "Followed"
  2. See error

Expected Behavior When clicking on Followed the Followed page gets loaded, the link on the left indicated that you are on the Followed page and only giveaways for games that you are following get listed.

Console Errors

cdn.steamgifts.com/js/cmp.min.js:1 USP is not accessible
(anonymous) @ cdn.steamgifts.com/js/cmp.min.js:1
6chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST]  
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
2steamdb.info/static/logos/favicon-16x16.png:1 Failed to load resource: the server responded with a status of 404 ()
esgst.js:1 [ESGST]  
warning @ esgst.js:1
steamdb.info/static/logos/favicon-16x16.png:1 Failed to load resource: the server responded with a status of 404 ()
3esgst.js:1 [ESGST]  
warning @ esgst.js:1
4chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST] No result. Error: No result.
    at qt.gc_getCategories (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:233739)
    at async qt.gc_getGames (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:228031)
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
13chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST]  
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST] No result. Error: No result.
    at qt.gc_getCategories (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:233739)
    at async qt.gc_getGames (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:228031)
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
2chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST]  
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
8chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST] No result. Error: No result.
    at qt.gc_getCategories (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:233739)
    at async qt.gc_getGames (chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:88:228031)
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
3steamdb.info/static/logos/favicon-16x16.png:1 Failed to load resource: the server responded with a status of 404 ()
5chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1 [ESGST]  
warning @ chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/esgst.js:1
DevTools failed to load SourceMap: Could not load content for chrome-extension://ibedmjbicclcdfmghnkfldnplocgihna/lib/browser-polyfill.min.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

System (please complete the following information):

Additional Context I currently only follow 1 game on Steam and I don't think there's a giveaway for it currently on SG. Clicking the Followed link I would expect an empty list. Instead, with endless scrolling enabled, all 33 pages of currently available giveaways on SG load in one after another showing me every single giveaway.

CynicalSteve commented 3 years ago

+1 The followed games page has not been working for a long time. As an experiment, I followed One Step From Eden on Steam, synced and clicked on the Followed Games in the sidebar and sure enough, the first page is blank and giveaways from the All page are loaded from the 2nd page onwards

rafaelgomesxyz commented 3 years ago

Apparently that only happens if you have the option to continuously load pages enabled. You do have that option enabled, right?

As an experiment, I followed One Step From Eden on Steam, synced and clicked on the Followed Games in the sidebar and sure enough, the first page is blank and giveaways from the All page are loaded from the 2nd page onwards

If there are no giveaways for your followed games, then the page is supposed to be blank. You can't use navigation when in the followed page, because you load the next page by clicking on the 'Load More' button, so if you clicked '2' in the pagination then it's supposed to be the all page. I'll actually remove the pagination completely to avoid confusion.

CynicalSteve commented 3 years ago

Apparently that only happens if you have the option to continuously load pages enabled. You do have that option enabled, right?

As an experiment, I followed One Step From Eden on Steam, synced and clicked on the Followed Games in the sidebar and sure enough, the first page is blank and giveaways from the All page are loaded from the 2nd page onwards

If there are no giveaways for your followed games, then the page is supposed to be blank. You can't use navigation when in the followed page, because you load the next page by clicking on the 'Load More' button, so if you clicked '2' in the pagination then it's supposed to be the all page. I'll actually remove the pagination completely to avoid confusion.

I used One Step From Eden as an example because it was a popular giveaway back then as it was in a Humble Monthly. The problem is that I could see the giveaways in the Recommended page, but nothing shows up in the Followed page. As a more current example, Lovely Planet 2: April Skies currently has couple giveaways going up to 4 weeks. I followed the game on Steam, synced both Steamgifts & ESGST and the Followed page still shows up blank.

For the pagination, yup my bad I should've figured that it was due to the continuous loading feature turned on, but that isn't main issue.

If it helps, I'm running on Firefox 87.0 (64-bit) & ESGST ver. 8.8.7

rafaelgomesxyz commented 3 years ago

In that case, the only thing I can think of is that you're either not logged in to Steam, which is preventing the extension from syncing your followed games, or you're using Firefox Containers and you're logged in to Steam on a different container. Are any of those true?

CynicalSteve commented 3 years ago

In that case, the only thing I can think of is that you're either not logged in to Steam, which is preventing the extension from syncing your followed games, or you're using Firefox Containers and you're logged in to Steam on a different container. Are any of those true?

Unfortunately, neither is true. I followed the game through the browser version of Steam and remained logged in while I synced. I was not using Firefox Containers either.

rafaelgomesxyz commented 3 years ago

Ok, I'll take a closer a look and see if there's something else I'm missing. I might have to add some logs to the next version so we can see what's happening better.

Eiion commented 3 years ago

It would be helpful if pause/resume endless scrolling could be set on a per page basis. Would be a good thing in general...

I just gave it a try with endless scrolling on pause and the followed games page worked. Did a comparison with the all page and endless scrolling enabled filtering for followed games and the results were the same. So I guess that indeed fixed it for me.

CynicalSteve commented 3 years ago

It would be helpful if pause/resume endless scrolling could be set on a per page basis. Would be a good thing in general...

I just gave it a try with endless scrolling on pause and the followed games page worked. Did a comparison with the all page and endless scrolling enabled filtering for followed games and the results were the same. So I guess that indeed fixed it for me.

Yup, I tried turning it off and it now works. However in my case, it only worked after turning off the endless scrolling feature itself in ESGST settings. Pausing it still yields a blank page for me though, maybe because we are using different browsers so the behaviours are different?

Eiion commented 3 years ago

It would be helpful if pause/resume endless scrolling could be set on a per page basis. Would be a good thing in general...

I've tried to set endless scrolling to not work for the following page via ESGST's settings (with the 'Do NOT run it here', 'custom' and 'https://www.steamgifts.com/giveaways/search?esgst=fgp') but that for some reason does not disable endless scrolling on that page.