Closed
Bug 769171
Opened 12 years ago
Closed 8 years ago
swapCache
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: chielm, Unassigned)
Details
(Keywords: html5)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 Steps to reproduce: I download the new application cache for my web application and when the download is ready I want to swap the cache by using the "applicationCache.swapCache()" function Actual results: I get this error: "An attempt was made to use an object that is not, or is no longer, usable" code: "11" nsresult: "0x8053000b (InvalidStateError)" location: "<unknown>" Expected results: The browser should swap the application cache
(In reply to Shalini from comment #1) > can u explain this in more detail
Updated•12 years ago
|
Component: Web Apps → Networking: Cache
Product: Firefox → Core
QA Contact: untriaged → networking.cache
I can confirm the bug. applicationCache.swapCache() is not working for me too with Firefox 14.0.1. No problem with 12.x
Test case: http://mozbugs.github.cscott.net/videobug/ We wait until we get the updateready event, verify that the cache status is UPDATEREADY, and then try to call swapCache() and get the InvalidStateError exception. The AppCache spec (http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#application-cache-api) specifies that swapCache() should succeed in that situation.
Comment 5•11 years ago
|
||
I confirm that as of Firefox/24 calling window.applicationCache.swapCache() inside the onupdateready event causes a DOM Exception to be thrown: An attempt was made to use an object that is not, or is no longer, usable
Comment 6•11 years ago
|
||
Seeing the same thing in Firefox 23. Calling window.applicationCache.swapCache() inside onupdateready callback.
Comment 7•11 years ago
|
||
how is this bug still listed as UNCONFIRMED ?
Comment 8•11 years ago
|
||
I just wonder if this issue affects Firefox OS. Because application cache is of great importance on web apps.
Ditto on bryandonnovan@gmail.com! What the heck is going on with UNCONFIRMED. I have a screenshot of this issue but I can't post here. This is Definitely an issue and terrible because it has bitten our team several times in production. Please, please, please CONFIRM and FIX.
Comment 10•11 years ago
|
||
Confirmed in Chrome 30.0.1599.101, and Firefox, any flavor really.
Comment 11•11 years ago
|
||
Confirmed in Firefox 25 as well now.
Comment 12•10 years ago
|
||
Still a bug. Since the mozilla team has refused to confirm the bug, investigate, or otherwise fix the bug, we have deleted Firefox from all computers in our organization and now advocate not using Firefox.
Comment 13•9 years ago
|
||
Still a bug on FF 37. I can't make the cache work as intented: Swaping the cache when it is ready and reload page. On Chrome it works perfectly, just dropping the offline mode for FF users. Even if I swap from within the event listener and reload page, it still use some old cached file this might be another bug...
Comment 14•9 years ago
|
||
I had a look at the source code (FF38). there are a few spots that will throw this error but i don't think i understand anything useful. I just attach them here hope someone capable can find out what's the problem. ======================================== if (!currentAppCache) { return NS_ERROR_DOM_INVALID_STATE_ERR; } // Check the current and potentially newly available cache are not identical. if (mAvailableApplicationCache == currentAppCache) { return NS_ERROR_DOM_INVALID_STATE_ERR; } if (mAvailableApplicationCache) { nsCString currClientId, availClientId; currentAppCache->GetClientID(currClientId); mAvailableApplicationCache->GetClientID(availClientId); if (availClientId == currClientId) return NS_ERROR_DOM_INVALID_STATE_ERR; } else if (mStatus != OBSOLETE) { return NS_ERROR_DOM_INVALID_STATE_ERR; }
Comment 15•9 years ago
|
||
Why is this still happening in Firefox 40? This is a critical bug!
Comment 16•8 years ago
|
||
We still see this bug in FF ESR (38.6) but not with FF 44. So this might have been fixed between these versions.
Comment 17•8 years ago
|
||
wfm based on comment 16.. app cache being removed anyhow
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•