rafaelgomesxyz / esgst

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

Some filters stop working on page 10 of Group page #1471

Open Eiion opened 5 years ago

Eiion commented 5 years ago

Description Filters stop working correctly on page 10 and resume working for page 11 (using endless scrolling). Some filters still work, like the groups filter, but filters like Whitelist, Group, Trading Cards or Entered don't seem to have any effect on what giveaways are displayed.

Steps to Reproduce

  1. Go to "Group" page
  2. select filters
  3. Scroll down
  4. have pages load in with endless scrolling enabled and filter be applied
  5. See error on page 10 (they work again on page 11)

Expected Behavior Filters work no matter the page with endless scrolling.

Console Errors

esgst.js:86 Uncaught (in promise) SyntaxError: Invalid regular expression: /^(.|(*)?)$/: Nothing to repeat
    at new RegExp (<anonymous>)
    at t.<anonymous> (esgst.js:86)
    at l (esgst.js:32)
    at Generator._invoke (esgst.js:32)
    at Generator.forEach.e.<computed> [as next] (esgst.js:32)
    at n (esgst.js:1)
    at o (esgst.js:1)

System (please complete the following information):

rafaelgomesxyz commented 5 years ago

That error could be coming from your single Giveaway Filters regex. Is it ^(.|(*)?)$? Because that's not valid regex.

Eiion commented 5 years ago

I don't know what that means. Under Giveaways "Single Filters" I'm using "Everywhere" and ".*".

Apparently this issue just recently started to occur with version 8.5.5 - this wasn't an issue before and I haven't changed settings in weeks if not months.

EDIT: By the way, just now the filter doesn't work on page 8 of the Groups page but does on all the other pages (still while using endless scrolling.)

Eiion commented 5 years ago

Today it's page 6 that's affected.

rafaelgomesxyz commented 5 years ago

The page number is irrelevant, since I don't see the same giveaways you do, so I can't reproduce it with that. It would be useful if you could detect what giveaway is triggering this issue, because I assume it's the same giveaway, that was previously on page 10 and now is on page 6.

Eiion commented 5 years ago

That's what I was assuming. I don't know how I would narrow it down to the one causing the issue though.

rafaelgomesxyz commented 5 years ago

Yeah, the weird thing is that I can't find this regex (/^(.|(*)?)$/) anywhere on ESGST. That error happens only in the page where the bug occurs?

Eiion commented 5 years ago

Only on the groups page, yes. I didn't ever check the single group page by itself though, only via endless scrolling.

I've wanted to try narrowing it down to what giveaway it could be that's causing the issue and successively let all the pages load in again having some filters already applied. But after scrolling down and even with more playing around with filters that didn't work before I quickly noticed that now they worked again for all the pages. At this point I'm at a loss in regards of the issue. It seems to have fixed itself - or maybe out of pure luck the giveaway in question got deleted. Either way, the error doesn't show up anymore. It was there just a few minutes ago, now it's gone.

I've checked my entered page to see if there's a deleted giveaway that could've been on page 6 or below (according to it's time left to enter) but the only one I could find that I was actually entered when it was deleted was one that was deleted 5 days ago already and would have been on a page past page 6, so that couldn't be it.

Eiion commented 5 years ago

And it's happening again on page 9 of the Groups page. Same error message as before. All giveaways displayed are made by the same guy and all have more or less the same giveaway description... so, I cannot tell which one would cause the issue.

Checking page 9 by itself, with endless scrolling paused, everything works fine.

And reloading the groups page, letting the filters do their job for a second time with letting it load in more pages, now suddenly everything works again without showing an error in console. This is odd to say the least.