Closed Bug 815814 Opened 9 years ago Closed 9 years ago

Marketplace-dev fails to load the homepage even when user has wifi

Categories

(Firefox OS Graveyard :: Gaia, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: krupa.mozbugs, Assigned: potch)

References

Details

Attachments

(2 files)

b2g build details: nov 27 ( regular build)

steps to reproduce:
1. Make sure your unagi device is connected to wifi(Mozilla-G)
2. Launch marketplace (prod) app
3. Launch marketplace (dev) app

observed behavior:
Marketplace (prod) app loads the homepage as expected whereas marketplace (dev) loads the "Sorry you need to be online.." page instead of the homepage.
Priority: -- → P2
Target Milestone: --- → 2012-12-13
Note that this error message persists even after flashing my phone :(
This is blocking QA; marking as a P1
Priority: P2 → P1
blocking-basecamp: --- → ?
Flags: mkt-blocker+
Target Milestone: 2012-12-13 → 2012-12-20
We need to get https://github.com/mozilla-b2g/gaia/pull/6738 merged so the pre-cached offline experience is functional.
(In reply to Potch [:potch] from comment #3)
> We need to get https://github.com/mozilla-b2g/gaia/pull/6738 merged so the
> pre-cached offline experience is functional.

You need to attach this to a gaia bug and ask for review from someone who works on preloaded apps. Donovan would be a good candidate.

I'd attach a pull request link on the marketplace offline bug.
etienne_s said he is looking at it today
Won't block on device ship only cause we won't be shipping marketplace dev on production devices.
blocking-basecamp: ? → ---
Jason, this bug may not block, but once this is working we will need to land the same functionality on the production version of Marketplace.
blocking-basecamp: --- → ?
I've update https://github.com/mozilla-b2g/gaia/pull/6738 and am awaiting review.
(In reply to Potch [:potch] from comment #7)
> Jason, this bug may not block, but once this is working we will need to land
> the same functionality on the production version of Marketplace.

Then file a separate bug for the production stuff and nom that.
blocking-basecamp: ? → ---
Component: General → Gaia
Flags: mkt-blocker+
Product: Marketplace → Boot2Gecko
Target Milestone: 2012-12-20 → ---
Version: 1.0 → unspecified
Will update 768946 (the original tracker) accordingly.
Over to Gaia since this is a gaia patch. You'll need to ask for review from a Gaia peer.
NOTE: If blocking-basecamp+ is set, just land it for now.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 768946
User impact if declined: falls back to native offline experience as opposed to Marketplace's appcache
Testing completed: verified on desktop b2g and unagi that offline is functioning.
Risk to taking this patch (and alternatives if risky):
Attachment #693537 - Flags: review?(etienne)
I'm starting to suspect that gaia/b2g's offline cache "FALLBACK" directive is not being implemented correctly. Can't seem to get to the public version of a page if a fallback is specified regardless of connection state. Can we look into this?
(In reply to Potch [:potch] from comment #13)
> I'm starting to suspect that gaia/b2g's offline cache "FALLBACK" directive
> is not being implemented correctly. Can't seem to get to the public version
> of a page if a fallback is specified regardless of connection state. Can we
> look into this?

Honza knows quite a bit about offline cache. Maybe he has an idea.
cc-ing Alex who added support for appcache preloading.
I saw some errors fromt the OfflineCacheInstaller.jsm so I added more debug:

I/Gecko   (  440): Error in storeCache with https://marketplace-dev-cdn.allizom.org/media/js/mkt/consumer-min.js
I/Gecko   (  440): Error in storeCache with https://marketplace-dev-cdn.allizom.org/media/css/mkt/consumer-min.css
I/Gecko   (  440): Error in storeCache with https://login.persona.org/include.js
I/Gecko   (  440): Error in storeCache with https://marketplace-dev.allizom.org/telefonica/media/img/mkt/grain.png
I/Gecko   (  440): Error in storeCache with https://marketplace-dev.allizom.org/telefonica/offline/home

It looks like we fail to properly build the appcache. Are these resources properly set up in gaia?
First, there is an issue with the offline manifest.
You register consumer-min.css instead of offline-min.css.
Cherry pick this changeset to make it work correctly without connection:
  https://github.com/ochameau/gaia/commit/062aac1b20fde749b2e2f9aa6bdceb23427d3029

I'll now look at why we do not get the online version.
Someone decided the launch_path for marketplace-dev should be `/telefonica/offline/home`, which is why we saw the offline screen all the time. I updated the gaia manfiest to point to `/telefonica` (the actual launch_path of the app) and everything is fine.

Fixed in the pending offline PR https://github.com/mozilla-b2g/gaia/pull/6738.
Depends on: 824949
potch, you are missing following cache entry in /cache/manifest.appcache:

  CACHE:
  /offline/home 
  ...

Otherwise, if you want to make FALLBACK entry to work, we will have to land bug 824949.
With this gecko patch applied and the manifest.appcache modification, I have a correct behavior in offline and online modes.
Potch, FALLBACK fix is going to land. I already mentioned in comment 19 that it was working with patch pending review. It is now r+ and is only matter of landing it.

Ask me for the review if you want a faster review, as I'm used to test offline cache. Your previous pull request was looking good to me. I'd be quite sad to see you stop using offline cache given that I worked on fallback support just for this bug...
Attachment #693537 - Flags: review?(etienne) → review?(poirot.alex)
(In reply to Alexandre Poirot (:ochameau) from comment #21)

> Ask me for the review if you want a faster review, as I'm used to test
> offline cache. Your previous pull request was looking good to me. I'd be
> quite sad to see you stop using offline cache given that I worked on
> fallback support just for this bug...

We ran into addition security issues with appcache, the sum of which is we are on hold with appcache implementation until we can get things figured out. Sorry, your help has been awesome!
(In reply to Potch [:potch] from comment #22)
> We ran into addition security issues with appcache, the sum of which is we
> are on hold with appcache implementation until we can get things figured
> out. Sorry, your help has been awesome!

It is the long list of potential bugs you've sent to Brian (and me)?
(In reply to Honza Bambas (:mayhemer) from comment #23)

> It is the long list of potential bugs you've sent to Brian (and me)?

yes, bug 826309 being the primary reason.
Is there anyone I can talk to in berlin about marketplace plans?
I'm not sure what is the point of the current pull request that will just break marketplace-dev when there is no data connection. So that there isn't much difference anymore between marketplace and marketplace-dev.

I thought that marketplace-dev work was the sandbox for building final marketplace app that will work nicely until the user connect to internet.
If that's still the case, is there another bug to address that?
Comment on attachment 693537 [details] [review]
Pull Request for the Marketplace offline update.

Bug 822943 removed marketplace-dev and stagging from gaia repo.
Attachment #693537 - Flags: review?(poirot.alex)
We're still strongly considering using the AppCache ping for population metrics collection, which means this bug may morph into "limit the appcache'd assets" instead of "disable Marketplace appcache". Please don't land this in-product until a final decision is made (and approval is granted, since this isn't blocking-basecamp).
The issue we're blocked on now is because of the current pre-loaded appcache in gaia, presently marketplace-dev doesn't work *at all*. I'm fully open to re-enabling appcache, but getting the current busted assets out of gaia asap is my priority in fixing this bug.
The previous state of your pull request (with appcache) was looking fine for me.
Were you having issues ?
(In reply to Potch [:potch] from comment #28)
> The issue we're blocked on now is because of the current pre-loaded appcache
> in gaia, presently marketplace-dev doesn't work *at all*. I'm fully open to
> re-enabling appcache, but getting the current busted assets out of gaia asap
> is my priority in fixing this bug.

"doesn't work *at all*" - what it means?  I'm asking a hundred time again, but is there on the device an analogous error console as on desktop?  It can tell you whether the offline app cache update fails or at least if the problem is elsewhere.

Thanks.
Honza, Potch was able to provide a working version of marketplace-dev via https://github.com/mozilla-b2g/gaia/pull/6738 At the time I wrote comment 19. But now this PR has been rebased and remove the app cache completely.
The current gaia master version isn't working well as there were various issues between gaia build system and the prepopulated appcache data, plus the fact that I haven't implemented support of FALLBACK entry for pre-installed apps (see bug 824949).
But from what I have seen in the PR, everything seemed to work well.
(In reply to Alexandre Poirot (:ochameau) from comment #29)
> The previous state of your pull request (with appcache) was looking fine for
> me.
> Were you having issues ?

After encountering security issues (bug 823174) I was asked to focus my attention on other features. We were making progress, but my main concern is getting dev and QA unblocked at this time. I have the changeset on a branch, and will keep it from bitrotting.
(In reply to Honza Bambas (:mayhemer) from comment #30)
> (In reply to Potch [:potch] from comment #28)
> > The issue we're blocked on now is because of the current pre-loaded appcache
> > in gaia, presently marketplace-dev doesn't work *at all*. I'm fully open to
> 
> "doesn't work *at all*" - what it means?  I'm asking a hundred time again,
> but is there on the device an analogous error console as on desktop?  It can
> tell you whether the offline app cache update fails or at least if the
> problem is elsewhere.
> 
> Thanks.

Honza, it was an error on my side, caching the wrong set of urls and leading to an experience that thought it was always offline. Aside from the technical issues filed as bugs elsewhere, the issue here was a non-functional marketplace experience caused from seeding gaia with the wrong appcache information. As stated, my only goal in this bug is to fix the issue preventing QA and dev from launching marketplace-dev on device. I would greatly like to get appcache working, but those efforts shouldn't delay fixing the immediate issue any longer.
Attached file Pull request 7401
I restored the pull request with the working version I've seen in past.
But as Bug 822943 removed marketplace-dev and stagging from gaia repo,
this pull request isn't really valid, **nor this bug** as we do not expose marketplace-dev anymore...
Well that's a resolution I can live with. We should close this up then.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.