Closed Bug 830044 Opened 12 years ago Closed 12 years ago

Installing a hosted app that preloads an appcache that does not exist causes the app install process to spin infinitely forever

Categories

(Core Graveyard :: DOM: Apps, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jsmith, Assigned: ferjm)

Details

Build: B2G 18 1/12/2013 Device: Unagi Steps: 1. Install a hosted app preloading appcache that points to an appcache manifest that does not exist (e.g. 404) Expected: We should fail fast and report an error to the user that the download failed. Actual: The app install process starts spinning forever with no end in sight. Nothing interesting in the logcat.
Summary: Installing a hosted app that preloads an appcache that does not exist cause the app install process to spin infinitely forever → Installing a hosted app that preloads an appcache that does not exist causes the app install process to spin infinitely forever
Probably doesn't block because the marketplace validator could mitigate this by providing feedback that the address for the appcache path doesn't exist. I'd probably track it though given that the developer UX here sucks.
tracking-b2g18: --- → ?
ccing Matt to see if we're already doing the check in comment 1
Jason, as you said in another bug, this might easily happen outside of the marketplace, right ?
(In reply to Julien Wajsberg [:julienw] from comment #4) > Jason, as you said in another bug, this might easily happen outside of the > marketplace, right ? Yup that's right. I actually found this bug from helping someone debug their webapp on the webapps mailing list.
Assignee: nobody → ferjmoreno
Blocks: app-install
This works for me with latest inbound (80adbcab0085) and latest gaia (2465ff155f2c1d). Installing an app with an appcache path that does not exists throws APP_CACHE_DOWNLOAD_ERROR and the icon stops spinning. XXX FIXME : Got a mozContentEvent: webapps-install-granted -*-*- Webapps.jsm : Creating AppcacheObserver for http://10.95.194.252:3000 - pending -*-*- Webapps.jsm : Offline cache state change for http://10.95.194.252:3000 : 1 -*-*- Webapps.jsm : Offlinecache setError to APP_CACHE_DOWNLOAD_ERROR Clicking in the icon again to download the app throws APP_CACHE_DOWNLOAD_ERROR: XXX FIXME : Got a mozContentEvent: webapps-install-granted -*-*- Webapps.jsm : Creating AppcacheObserver for http://10.95.194.252:3000 - pending -*-*- Webapps.jsm : Offline cache state change for http://10.95.194.252:3000 : 1 -*-*- Webapps.jsm : Offlinecache setError to APP_CACHE_DOWNLOAD_ERROR
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Jason, it would help if you could point to a webapp causing this, if you still have this ?
I doubt something else fixed this - Tony confirmed this busted yesterday and a developer claimed this wasn't working on Saturday. I confirmed this yesterday as well twice. Reopen. http://dictionary.reference.com/appmarket/dictionary/dictionary.webapp
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
That app was taken off the market and dev has been notified to fix this, but comment 8 has an example. http://dictionary.reference.com/cache.manifest <-- appcache_path If you go to that site directly, you'll get a custom 404 page. I'll retest, although I doubt this has been fixed.
Keywords: qawanted
QA Contact: jsmith
Still works for me. XXX FIXME : Got a mozContentEvent: webapps-install-granted -*-*- Webapps.jsm : JSON manifest { "_origin": { "spec": "http://dictionary.reference.com/", "prePath": "http://dictionary.reference.com", "scheme": "http", "userPass": "", "username": "", "password": "", "hostPort": "dictionary.reference.com", "host": "dictionary.reference.com", "port": -1, "path": "/", "asciiSpec": "http://dictionary.reference.com/", "asciiHost": "dictionary.reference.com", "originCharset": "UTF-8", "ref": "", "specIgnoringRef": "http://dictionary.reference.com/", "hasRef": false }, "_manifest": { "version": "1.0", "name": "Dictionary (by Dictionary.com)", "description": "Access Dictionary.com, the most popular and trusted online dictionary, with spell-check, word definitions, thesaurus, and more!", "icons": { "16": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_16x16.png", "48": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_48x48.png", "128": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_128x128.png" }, "developer": { "name": "Dictionary.com, LLC", "url": "http://dictionary.com" }, "installs_allowed_from": [ "*" ], "appcache_path": "/cache.manifest", "locales": {}, "default_locale": "en" }, "_localeRoot": { "version": "1.0", "name": "Dictionary (by Dictionary.com)", "description": "Access Dictionary.com, the most popular and trusted online dictionary, with spell-check, word definitions, thesaurus, and more!", "icons": { "16": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_16x16.png", "48": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_48x48.png", "128": "/appmarket/dictionary/img/Mozilla_store_Dictionary_Dict_128x128.png" }, "developer": { "name": "Dictionary.com, LLC", "url": "http://dictionary.com" }, "installs_allowed_from": [ "*" ], "appcache_path": "/cache.manifest", "locales": {}, "default_locale": "en" } } -*-*- Webapps.jsm : Creating AppcacheObserver for http://dictionary.reference.com - pending -*-*- Webapps.jsm : Offline cache state change for http://dictionary.reference.com : 1 -*-*- Webapps.jsm : Offlinecache setError to APP_CACHE_DOWNLOAD_ERROR I am building inbound, so something else might have fixed this issue lately.
Not working for me on b2g 18 with: <project name="releases/gecko.git" path="gecko" remote="mozillaorg" revision="b75dfee39f8a5b634a9bc39dacf2bdf59ee4333f"/> <project name="releases/gaia.git" path="gaia" remote="mozillaorg" revision="df38c1bb813029f3ccfa4a997fb1529b3ff1a1ff"/>
Keywords: qawanted
Can you reproduce this with the b2g18 branch? There's always the slight possibility that we have something working on trunk, but not working on b2g18. This has happened before...
(In reply to Jason Smith [:jsmith] from comment #12) > Can you reproduce this with the b2g18 branch? > I'll try. I have to clone it first, though.
Matt actually clarified what might be causing this bug on the validator side, which might explain why downloading is failing here: Here's what the email thread said for the validator. The bug is caused by the 301/302 redirects that occur before the 404 occurs. The requests library doesn't throw an HTTPError exception if it is set to `allow_redirects` and the first response is not a failed status code. I'm working on the bug today.
FWIW, I tried with b2g18 (5a367713bfa4) and it seems to be working too. I tested with 'appInexistingCache' and 'appRedirectNoExistCache' tests from http://owapps.cloudfoundry.com (you can check the source at https://github.com/ferjm/apptester/tree/master/webapp/apps). I/GeckoDump( 108): XXX FIXME : Got a mozContentEvent: webapps-install-granted I/Gecko ( 108): -*-*- Webapps.jsm : Creating AppcacheObserver for http://apptester.eu01.aws.af.cm - pending E/GeckoConsole( 452): Content JS LOG at http://apptester.eu01.aws.af.cm/market.js:68 in onsuccess: Something went wrong. You installed a wrong app E/GeckoConsole( 108): Offline cache manifest HTTP request failed, URL=http://apptester.eu01.aws.af.cm/inexisting.appcache E/GeckoConsole( 108): Offline cache manifest removed, cache cleared, URL=http://apptester.eu01.aws.af.cm/inexisting.appcache E/GeckoConsole( 108): Offline cache update error, URL=http://apptester.eu01.aws.af.cm/inexisting.appcache I/Gecko ( 108): -*-*- Webapps.jsm : Offline cache state change for http://apptester.eu01.aws.af.cm : 1 I/Gecko ( 108): -*-*- Webapps.jsm : Offlinecache setError to APP_CACHE_DOWNLOAD_ERROR E/GeckoConsole( 108): Content JS INFO at app://system.gaiamobile.org/js/app_install_manager.js:188 in ai_handleDownloadError: downloadError event, error code is APP_CACHE_DOWNLOAD_ERROR I/GeckoDump( 108): XXX FIXME : Got a mozContentEvent: webapps-install-granted I/Gecko ( 108): -*-*- Webapps.jsm : Creating AppcacheObserver for http://apptester.eu01.aws.af.cm - pending E/GeckoConsole( 452): Content JS LOG at http://apptester.eu01.aws.af.cm/market.js:79 in onsuccess: Something went wrong. You installed a wrong app E/GeckoConsole( 108): Offline cache manifest HTTP request failed, URL=http://apptester.eu01.aws.af.cm/app/appRedirectNoExistCache/redirect.appcache E/GeckoConsole( 108): Offline cache manifest removed, cache cleared, URL=http://apptester.eu01.aws.af.cm/app/appRedirectNoExistCache/redirect.appcache E/GeckoConsole( 108): Offline cache update error, URL=http://apptester.eu01.aws.af.cm/app/appRedirectNoExistCache/redirect.appcache I/Gecko ( 108): -*-*- Webapps.jsm : Offline cache state change for http://apptester.eu01.aws.af.cm : 1 I/Gecko ( 108): -*-*- Webapps.jsm : Offlinecache setError to APP_CACHE_DOWNLOAD_ERROR E/GeckoConsole( 108): Content JS INFO at app://system.gaiamobile.org/js/app_install_manager.js:188 in ai_handleDownloadError: downloadError event, error code is APP_CACHE_DOWNLOAD_ERROR
What bothers me here is that when I initially worked on Bug 829522 I had put some logs in Webapps.jsm's updateObserver.observe function, and I've never seen these logs happening. FTR the problem in Bug 8295922 is that we were giving a wrong manifest URL to the AppCache downloader. However, the URL itself was existing (it was the webapp manifest) so this may be what triggers this bug.
Keywords: qawanted
I guess I can't reproduce as well.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Keywords: qawanted
Resolution: --- → WORKSFORME
No longer blocks: app-install
tracking-b2g18: ? → ---
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.