jshackles / Enhanced_Steam_Firefox

Enhanced Steam for Mozilla Firefox
GNU General Public License v3.0
135 stars 23 forks source link

Wishlist not showing "Games with discount" during Summer Sale #73

Open BlueRaja opened 9 years ago

BlueRaja commented 9 years ago

Or "sort by largest discount".

This is when I need it most, too :(

jshackles commented 9 years ago

I just tested this using Enhanced Steam 7.3 with Firefox 39 and it's working as it's supposed to.

BlueRaja commented 9 years ago

I'm running Firefox 38.0.5 (which Firefox tells me is the latest version) using Enhanced Steam 7.3, and I see this: http://screencast.com/t/dvMdIwRk

I tried disabling all my add-ons, but it didn't help. There are no errors in the console.

If there's anything more I can provide to help, please let me know. I'm a web developer, but I've never touched Firefox extensions so I don't know where/what to look for.

BlueRaja commented 9 years ago

So, I learned how to enable debugging for Firefox extensions :P

The extension is crashing with this stacktrace

20:35:06.016 SyntaxError: JSON.parse: unexpected character at line 1 column 8 of the JSON data
Stack trace:
check_early_access/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/enhancedsteam.js:3456:22
m.Callbacks/j@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27290
m.Callbacks/k.add@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27604
process_early_access@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/enhancedsteam.js:3486:2
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/enhancedsteam.js:5488:3
m.Callbacks/j@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27290
m.Callbacks/k.add@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27604
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/enhancedsteam.js:5479:2
m.Callbacks/j@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27290
m.Callbacks/k.add@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/jQuery.min.js:2:27604
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-ydifitekqginxa-at-jetpack/enhanced-steam/data/enhancedsteam.js:5478:2
onEvent@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://gre/modules/commonjs/sdk/content/content-worker.js:45:22
onEvent@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://gre/modules/commonjs/sdk/content/content-worker.js:45:22
onChromeEvent@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://gre/modules/commonjs/sdk/content/content-worker.js:91:16
1 timers.js:43

It looks like the problem is that ea_appids is set to the string {"ea": ]}, which is not valid JSON.

I would guess(?) one of the games in my wishlist is causing the issue. Do you repro when you view my wishlist?

BlueRaja commented 9 years ago

After forcibly clearing my ea_appids_time, the issue went away. But, the strange this is I've been seeing the issue all day (on multiple computers), more than the hour time between refreshing ea_appids... Did you update the server?

BlueRaja commented 9 years ago

I'm reopening, as I've been having this problem consistently for the last day.

The issue, as mentioned above, appears to be that an invalid response from the EnhancedSteam server is being cached. I think the solution would be to only cache the response if it's valid.

(If the server is returning invalid responses because it's being overloaded, maybe increase the cache time to like 24 hours?)