Closed Bug 796370 Opened 12 years ago Closed 12 years ago

Marketplace assertion when clicking on any app [nsIDOMHistory.replaceState]

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ghtobz, Unassigned)

Details

(Whiteboard: [label:market])

[GitHub issue by dougt on 2012-06-22T05:19:02Z, https://github.com/mozilla-b2g/gaia/issues/1869]
mac build, gaia build from tonight.

1) launch marketplace
2) click on any app
3) notice nothing happens

Log says:


JavaScript error: https://marketplace-dev-cdn.allizom.org/media/js/mkt/consumer-min.js?build=28f769f, line 19: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHistory.replaceState]
[GitHub comment by cgjones on 2012-06-22T22:48:14Z]
This probably wants a gecko bug, and a CC of @jlebar .
[GitHub comment by cgjones on 2012-06-22T22:48:48Z]
(Unless that's an expected FAILURE when script does something wrong.)
[GitHub comment by dougt on 2012-06-22T23:58:35Z]
needs to be debugged.  didn't have time last night.
[GitHub comment by jlebar on 2012-06-25T13:13:50Z]
This is hitting an assertion in push/replaceState which checks for a sesison history object.

That assertion is actually dead code, and I'll remove it [1].  But things probably aren't going to work for you if you don't have a shistory; for example, pushState won't make much sense without session history.

I wonder why it is that we have no shistory.
[GitHub comment by jlebar on 2012-06-25T13:14:01Z]
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=767957
[GitHub comment by jlebar on 2012-06-25T13:34:58Z]
See also https://bugzilla.mozilla.org/show_bug.cgi?id=755116 comment 0.  Why is there no session history here??
[GitHub comment by jlebar on 2012-06-25T13:40:28Z]
Yeah.  Bug 755116 will make the history.replaceState call work, but then when I try to go back in the marketplace, I get

    JavaScript error: https://marketplace-dev-cdn.allizom.org/media/js/mkt/detail.js, line 19: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHistory.back]
[GitHub comment by jlebar on 2012-06-25T13:56:12Z]
Okay, I think this was regressed by https://bugzilla.mozilla.org/show_bug.cgi?id=757137.

That bug switched us to using <html:iframe> instead of <browser> for the homescreen.  But <iframe> inside something without an shistory doesn't get an shistory!

We'll fix this.
[GitHub comment by jlebar on 2012-06-25T14:34:40Z]
Here's the bug that will actually fix things for you: https://bugzilla.mozilla.org/show_bug.cgi?id=767978
[GitHub comment by jlebar on 2012-06-25T14:45:01Z]
With my patch in bug 767978, I get

    JavaScript error: https://marketplace-dev-cdn.allizom.org/media/js/mkt/detail.js, line 29: href is undefined

but I think that is unrelated.
[GitHub comment by potch on 2012-06-27T22:19:45Z]
Is the core issue here resolved? Trying to chase things down on marketplace.
[GitHub comment by cvan on 2012-06-28T09:32:45Z]
[my test case](http://people.mozilla.org/~cwiemeersch/replaceState.html) seems to work fine when [installed as an app](http://people.mozilla.org/~cwiemeersch/install.html). and this appears to be fine on the Marketplace now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Users can launch marketplace and click on the app to loads its detail page or hit the "Free" button to install it. Closing this as verified.

Verified on gaia build from 10/12/2012
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.