window.applicationCache.status not getting updated when resources finish loading

RESOLVED FIXED in mozilla23



8 years ago
4 months ago


(Reporter: luke, Assigned: mayhemer)


(Blocks 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [games:p2])


(1 attachment)

These HTML5 games show a common problem in FF (not present in Chrome) where, after the resources are loaded the first time, window.applicationCache.status does not get set to IDLE or UPDATEREADY and hence the game never advances.

After the resources are fully loaded, if you refresh the page, everything plays fine.  The hang-after-load reproduces if you delete the site's appcache from prefs.

(I don't know anything about the appcache, so maybe this bug is INVALID; I'm just forwarding the bug report.)
Honza, can you take a look?
(In reply to Boris Zbarsky (:bz) from comment #1)
> Honza, can you take a look?

Assignee: nobody → honzab.moz
Luke, just to confirm the STR for this are:
- load one of the URIs
- let the offline cache update finish (the nice progress bar shows that)
- clear offline data using clear recent history dialog
- reload the page, offline cache update runs fully again
=> after the offline cache update is completed the state doesn't change to IDLE

All during a single session of the browser.

Is that so?
Nope, simpler than that:
 - clear offline data (if you have visited the URI before)
 - load the URI
=> state doesn't change to IDLE, game stays hung at "100% loaded"

(If you now reload the page, the state is fine, so the game loads fine, so that's the current workaround.)
Ok, so I have to close the game page, clear cache, and then have a new tab and go to the game page again.  I don't need to restart Firefox instance.  Is that all so?
Should be, yes.
So, thanks this report I've found some more bugs around applicationCache.status.  I'll report them separately.

This is definitely a dup of bug 383014.  Thanks the remaining record in moz_cache_groups table the update process believes there was an app cache before and instead of IDLE reports UPDATEREADY.

I'll fix that bug and let you try.

Thanks for quick replies and this whole report, Luke.
Depends on: 383014
No, this will be more complicated, my test case had a typo.  I'll report back soon.
No longer depends on: 383014
I think your report is not exactly correct.  I can reproduce the problem (and I know the cause) when I visit the URL for the very first time and have to accept the "allow offline" prompt.  But I don't see it when I later delete the offline cache via the clear history dialog and open the page again in a new tab.  Then the state gets updated for me as expected.
Sure.  Any progress on the bug?
(In reply to Luke Wagner [:luke] from comment #10)
> Sure.  Any progress on the bug?

So, you agree the description (comment 0) is not fully correct?  Do you agree comment 9 is better description of this bug?

It is on my list of all app cache bugs I want to work on soon.
I get a JS error trying to open any of the links in comment 0, so it seems something has changed and I don't know.  I was hoping you were able to see the problem with a simple test-case.
(In reply to Luke Wagner [:luke] from comment #12)
> I get a JS error trying to open any of the links in comment 0, so it seems
> something has changed and I don't know.  I was hoping you were able to see
> the problem with a simple test-case.

I found a problem that more or less is what you describe in comment 0.  But not exactly.  Just want to confirm you agree with my findings in comment 9 those IMO better describe this bug.  Note: when I delete the offline cache, I don't delete the offline-app permission (there is no more any prompt on the second visit after delete).
Whiteboard: [games:p2]
Posted patch v1Splinter Review
Attachment #641635 - Flags: review?(jduell.mcbugs)
Blocks: 825618
Comment on attachment 641635 [details] [diff] [review]

Review of attachment 641635 [details] [diff] [review]:

Honza has promised me a new unbitrotted version, and I've promised to review it more quickly :)
Attachment #641635 - Flags: review?(jduell.mcbugs)
Jason, maybe you could at least look at the patches and give comments regardless the patches are outdated..
Attachment #641635 - Flags: feedback?(jduell.mcbugs)
Comment on attachment 641635 [details] [diff] [review]

Michal, can you please take a look?  I believe you are going to be faster then Jason ;)
Attachment #641635 - Flags: feedback?(jduell.mcbugs) → review?(michal.novotny)
Attachment #641635 - Flags: review?(michal.novotny) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.