Closed
Bug 1046004
Opened 11 years ago
Closed 11 years ago
Preloaded appcache is not populated correctly
Categories
(Core Graveyard :: DOM: Apps, defect)
Tracking
(blocking-b2g:2.0+, b2g-v1.3 unaffected, b2g-v1.3T unaffected, b2g-v1.4 unaffected, b2g-v2.0 fixed, b2g-v2.1 fixed)
| Tracking | Status | |
|---|---|---|
| b2g-v1.3 | --- | unaffected |
| b2g-v1.3T | --- | unaffected |
| b2g-v1.4 | --- | unaffected |
| b2g-v2.0 | --- | fixed |
| b2g-v2.1 | --- | fixed |
People
(Reporter: yurenju, Assigned: gerard-majax)
References
Details
(Keywords: regression, Whiteboard: [systemsfe])
Attachments
(2 files)
|
4.44 KB,
patch
|
michal
:
review+
|
Details | Diff | Splinter Review |
|
1.19 KB,
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1024980 +++
I tested SUMO and wikipedia app on v1.3 with offline content but it does not work.
STR:
1. Download Wikipedia app from firefoxos-gaia-spain[1] to external-apps/
2. |MOZILLA_OFFICIAL=1 make production|
3. click wikipedia app icon without internet connection
expected: show wikipedia app
actually: got a dialog
please get more information on bug 1024879
| Reporter | ||
Updated•11 years ago
|
QA Contact: jmercado
| Reporter | ||
Comment 1•11 years ago
|
||
needinfo? same people on bug 1024890 comment 27, 28, 29
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jduell.mcbugs)
Flags: needinfo?(honzab.moz)
Flags: needinfo?(21)
| Reporter | ||
Comment 2•11 years ago
|
||
sorry it's bug 1024980 comment 27, 28, 29
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Yuren [:yurenju] from comment #0)
> +++ This bug was initially created as a clone of Bug #1024980 +++
>
> I tested SUMO and wikipedia app on v1.3 with offline content but it does not
> work.
>
> STR:
> 1. Download Wikipedia app from firefoxos-gaia-spain[1] to external-apps/
> 2. |MOZILLA_OFFICIAL=1 make production|
> 3. click wikipedia app icon without internet connection
>
> expected: show wikipedia app
> actually: got a dialog
>
> please get more information on bug 1024879
Do you know whether this still happens on 2.0 or on master ?
| Reporter | ||
Comment 4•11 years ago
|
||
| Reporter | ||
Comment 5•11 years ago
|
||
I don't know but will verify it later.
| Reporter | ||
Comment 6•11 years ago
|
||
[Blocking Requested - why for this release]:
(from :jsmith comment on bug 1024980 comment 26)
> [Blocking Requested - why for this release]:
>
> I think we made a mistake here punting this bug out of 1.3. Turns out this
> affects multiple preinstalled b2g apps preloading appcache. This was working
> in past releases, so this is a regression.
>
> We need to get this fixed in the next available release. Otherwise, we will
> risk not allowing partner apps with appcache from having offline access
> until an available network connection is established.
blocking-b2g: --- → 2.0?
| Reporter | ||
Updated•11 years ago
|
QA Whiteboard: [QAnalyst-Triage+][lead-review+]
| Reporter | ||
Updated•11 years ago
|
status-b2g-v1.3:
--- → affected
| Assignee | ||
Comment 7•11 years ago
|
||
Okay it's broken even on master.
| Assignee | ||
Comment 8•11 years ago
|
||
STR:
0. Get preload.py from []
1. |mkdir -p outoftree_apps && echo "Wikipedia,https://bits.wikimedia.org/WikipediaMobileFirefoxOS/manifest.webapp" >> outoftree_apps/list|
2. |cd outoftree_apps && python preload.py && cd ..|
3. |make production|
4. Disable Wi-Fi and data connection
Expected:
I can load offline Wikipedia.
Actual:
I get a message to enable internet connection.
status-b2g-v1.3T:
--- → ?
status-b2g-v1.4:
--- → ?
status-b2g-v2.0:
--- → ?
status-b2g-v2.1:
--- → affected
| Assignee | ||
Comment 9•11 years ago
|
||
Fun fact: on first boot, wikipedia does not work offline. But after a second boot, I got an update notification. After downloading it, it does work offline. The app was preloaded a couple of minutes before.
| Assignee | ||
Comment 10•11 years ago
|
||
So /data/local/OfflineCache/ exists, moz_cache_groups is okay but moz_cache table is empty. Comparing the database after applying the update, we have the proper content in the moz_cache table.
| Assignee | ||
Comment 11•11 years ago
|
||
Nice,
> 01-02 04:50:31.219 312 312 E GeckoConsole: [JavaScript Error: "NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsICacheService.createSession]" {file: "resource://gre/modules/OfflineCacheInstaller.jsm" line: 50}]
| Assignee | ||
Comment 12•11 years ago
|
||
This may be broken because of bug 999577, looking at the diff this is the one who added this NS_ERROR_NOT_IMPLEMENTED in CreateSession.
Depends on: 999577
| Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #12)
> This may be broken because of bug 999577, looking at the diff this is the
> one who added this NS_ERROR_NOT_IMPLEMENTED in CreateSession.
Okay this may be a separate issue :(
| Assignee | ||
Comment 14•11 years ago
|
||
So we are also lacking the root entry point in the cache, i.e., the URL "https://bits.wikimedia.org/WikipediaMobileFirefoxOS/". Hacking this makes the app displays offline.
Flags: needinfo?(21)
| Assignee | ||
Comment 15•11 years ago
|
||
| Assignee | ||
Comment 16•11 years ago
|
||
| Assignee | ||
Comment 17•11 years ago
|
||
Fabrice, hacking an entry matching the launch_path of Wikipedia make it working. But I'm not sure whether adding an entry for launch_path explicitely is the proper way to go to fix this.
Flags: needinfo?(fabrice)
Comment 18•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #17)
> Fabrice, hacking an entry matching the launch_path of Wikipedia make it
> working. But I'm not sure whether adding an entry for launch_path
> explicitely is the proper way to go to fix this.
Me neither, especially since your patch stores a url with the path to the index.html. We really need Honza to tell us what has changed here.
Flags: needinfo?(fabrice)
Comment 19•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #12)
> This may be broken because of bug 999577, looking at the diff this is the
> one who added this NS_ERROR_NOT_IMPLEMENTED in CreateSession.
Old cache API was disabled, but obviously some code is still trying to use it. See Honza's blog post to see how to use the new API: http://www.janbambas.cz/http-cache-v1-api-disabled/
| Assignee | ||
Comment 20•11 years ago
|
||
(In reply to Michal Novotny (:michal) from comment #19)
> (In reply to Alexandre LISSY :gerard-majax from comment #12)
> > This may be broken because of bug 999577, looking at the diff this is the
> > one who added this NS_ERROR_NOT_IMPLEMENTED in CreateSession.
>
> Old cache API was disabled, but obviously some code is still trying to use
> it. See Honza's blog post to see how to use the new API:
> http://www.janbambas.cz/http-cache-v1-api-disabled/
This is already fixed by attachment 8464704 [details] [diff] [review]
Honza, adding a fallback entry in the appcache manifest does the trick and thus the only fix needed is to update OfflineCacheInstaller to use the cache v2 API.
I have no idea whether this is what we want. Wikipedia's launch_path is a directory, not a file, since they assume server-side redirection to index.html.
Flags: needinfo?(honzab.moz)
| Assignee | ||
Comment 21•11 years ago
|
||
And bug 999577 is in v2.0, so this should be 2.0+
Assignee: nobody → lissyx+mozillians
Whiteboard: [systemsfe]
Target Milestone: --- → 2.1 S1 (1aug)
| Assignee | ||
Comment 22•11 years ago
|
||
Comment on attachment 8464704 [details] [diff] [review]
Make OfflineCacheInstaller use AppCacheStorage
Please find attached a patch that fixes the issue and makes OfflineCacheInstaller properly using the new Cache v2.
Matching try is green at: https://tbpl.mozilla.org/?tree=Try&rev=81c2186f08d9
Attachment #8464704 -
Flags: review?(honzab.moz)
| Assignee | ||
Comment 23•11 years ago
|
||
Yuren, using the list of apps from https://github.com/telefonicaid/firefoxos-gaia-spain, I can state the following:
- without attachment 8464704 [details] [diff] [review]:
- AccuWeather and Wikipedia do not work
- no cache is populated at all, and this is expected given that we should be using cache2
- with attachment 8464704 [details] [diff] [review]:
- AccuWeather works with the offline notification
- Wikipedia do not work, because it lacks an entry for its launch_path
- cache is populated properly besides
I don't think there is more problem. As far as I can tell, launch_path should not point to a directory but rather to a file. So I suspect Wikipedia's manifest is just wrong ?
Flags: needinfo?(yurenju.mozilla)
| Assignee | ||
Comment 24•11 years ago
|
||
In bug 1034730 there is some AppCache testing that has landed, but it seems limited. Maybe we want to improve those tests with this bug :)
Depends on: 1034730
Flags: needinfo?(myk)
Updated•11 years ago
|
Attachment #8464704 -
Flags: review?(honzab.moz) → review+
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(myk)
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 25•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #23)
> Yuren, using the list of apps from
> https://github.com/telefonicaid/firefoxos-gaia-spain, I can state the
> following:
> - without attachment 8464704 [details] [diff] [review]:
> - AccuWeather and Wikipedia do not work
> - no cache is populated at all, and this is expected given that we should
> be using cache2
Blocking given this would be a hard businees requirement for partner apps.
>
> - with attachment 8464704 [details] [diff] [review]:
> - AccuWeather works with the offline notification
> - Wikipedia do not work, because it lacks an entry for its launch_path
> - cache is populated properly besides
>
> I don't think there is more problem. As far as I can tell, launch_path
> should not point to a directory but rather to a file. So I suspect
> Wikipedia's manifest is just wrong ?
NI, Harald to help confirm if we need to reachout to wikipedia for the above?
blocking-b2g: 2.0? → 2.0+
Flags: needinfo?
Comment 26•11 years ago
|
||
Keywords: checkin-needed
Comment 27•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 28•11 years ago
|
||
Flags: needinfo?
Updated•11 years ago
|
Flags: needinfo?(jduell.mcbugs)
| Assignee | ||
Comment 29•11 years ago
|
||
Changing launch_path to add index.html at the end fixed Wikipedia, FYI.
Flags: needinfo?(poirot.alex)
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•