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

RESOLVED FIXED in mozilla23

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: luke, Assigned: mayhemer)

Tracking

(Blocks: 1 bug)

unspecified
mozilla23
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [games:p2])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.

 http://gunbros.glu.com
 http://bigtimegangsta.glu.com
 http://bugvillage.glu.com
 http://contractkiller.glu.com

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?
(Assignee)

Comment 2

5 years ago
(In reply to Boris Zbarsky (:bz) from comment #1)
> Honza, can you take a look?

Sure.
Assignee: nobody → honzab.moz
(Assignee)

Comment 3

5 years ago
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?
(Reporter)

Comment 4

5 years ago
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.)
(Assignee)

Comment 5

5 years ago
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?
(Reporter)

Comment 6

5 years ago
Should be, yes.
(Assignee)

Comment 7

5 years ago
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
(Assignee)

Comment 8

5 years ago
No, this will be more complicated, my test case had a typo.  I'll report back soon.
No longer depends on: 383014
(Assignee)

Comment 9

5 years ago
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.
(Reporter)

Comment 10

5 years ago
Sure.  Any progress on the bug?
(Assignee)

Comment 11

5 years ago
(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.
(Reporter)

Comment 12

5 years ago
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.
(Assignee)

Comment 13

5 years ago
(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).

Updated

5 years ago
Whiteboard: [games:p2]
(Assignee)

Comment 14

5 years ago
Created attachment 641635 [details] [diff] [review]
v1
Attachment #641635 - Flags: review?(jduell.mcbugs)
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 15

5 years ago
Try: https://tbpl.mozilla.org/?tree=Try&rev=5a536d9749a9
(Assignee)

Updated

5 years ago
Blocks: 825618
Comment on attachment 641635 [details] [diff] [review]
v1

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)
(Assignee)

Comment 17

4 years ago
Jason, maybe you could at least look at the patches and give comments regardless the patches are outdated..
Attachment #641635 - Flags: feedback?(jduell.mcbugs)
(Assignee)

Comment 18

4 years ago
Comment on attachment 641635 [details] [diff] [review]
v1

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+
(Assignee)

Comment 19

4 years ago
Comment on attachment 641635 [details] [diff] [review]
v1

https://hg.mozilla.org/integration/mozilla-inbound/rev/74431003f8cc
Attachment #641635 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/74431003f8cc
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.