Closed Bug 1042314 Opened 11 years ago Closed 10 years ago

Marketplace fails to load with TypeError: r is undefined

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P4)

x86
Gonk (Firefox OS)

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: krupa.mozbugs, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

steps to reproduce: 1. Load marketplace prod expected behavior: homepage loads fine actual behavior: homepage is stuck on the splash screen with TypeError: r is undefined include.js:431 https://www.dropbox.com/s/5fa8vujkc26gitz/Screenshot%202014-07-22%2014.07.33.png
reducing the severity since closing the tab and opening marketplace in a new tab fixes the issue. We still need to fix this issue.
Severity: blocker → major
No one else can reproduce this, so dropping priority.
Priority: -- → P4
From Wil: http://micropipes.com/temp/d/loading.png Wil, if you clear `localStorage` does the issue persist? I tried visually diffing the `console` statements between a working page load (what I see no my screen) and what you have in your screenshot. Nothing stands out to me. It'd be awesome if you can beautify the source and paste a screenshot. To do that, click on the error in the console, then click the curly braces - you should see something like this: http://cl.ly/image/0L09030a1O2S/Screen%20Shot%202014-07-25%20at%2012.53.26%20PM.png
Component: Payments/Refunds → Consumer Pages
Attached image error.png
Can you run this in your console and copy+paste the result somewhere? document.body.innerHTML = JSON.stringify(localStorage);
Firefox was not super excited about that and I had to close the tab afterward. I did copy the result though, it's exactly 1.5M of text. Is there anything private in it or should I attach it here?
(In reply to Wil Clouser [:clouserw] from comment #6) > Firefox was not super excited about that and I had to close the tab > afterward. I did copy the result though, it's exactly 1.5M of text. Is > there anything private in it or should I attach it here? If you can get just `require('user').get_settings()`, that should help.
Krupa, if you have a chance, could you paste your `require('user').get_settings()` when reproducing this issue. Thanks!
Flags: needinfo?(krupa.mozbugs)
Jason was able to reproduce. And these were his settings: http://cl.ly/image/0k1U123a400k/Screen%20Shot%202014-07-29%20at%205.00.10%20PM.png I was able to reproduce this for the first time upon entering this in my console: require('user').update_settings({carrier_sim: null, region_sim: null, region_geoip: 'us'}) After clearing localStorage and retrying those steps, I was unable to reproduce. Several retries and several logins later, I was unable to reproduce again. Based on comment 4, this is happening somewhere with the operator shelves / category drop-down list. Notice this console log is missing when the `TypeError` happens: [homepage] OSC injection skipped; No shelf
I hit this issue on FirefoxOS (stage packaged app). https://pastebin.mozilla.org/5754245
Flags: needinfo?(krupa.mozbugs)
I got a similar error today loading feed. TypeError: k is not an object Digging in, in my case, the code that does this is in cache.js flush_expired(), it seems like in there, "cache" is not an object when flush_expired() is called for some reason. On top of cache.js, calling flush_expired() is this code: if (settings.offline_cache_enabled && settings.offline_cache_enabled()) { cache = storage.getItem(cache_key) || {}; flush_expired(); } require('storage').getItem('request_cache') returns null, so cache is {}, so I don't understand why it's failing later, but maybe that helps.
Looking further, in feed, the code is actually: if (settings.offline_cache_enabled && settings.offline_cache_enabled()) { cache = storage.getItem(cache_key) || '{}'; flush_expired(); } Because it predates dethe's work in https://bugzilla.mozilla.org/show_bug.cgi?id=984984. Maybe there was a bug in there that is now fixed, where we wouldn't parse the cache JSON string earlier enough ?
FYI the issue I had and described in the 2 comments above was fixed in bug 1056244 (https://github.com/mozilla/fireplace/commit/bf87edc8ef129ee1dfc1404bfd199119791153b2)
No activity on this for a while, I assume everything is good.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: