Closed Bug 1575934 Opened 6 years ago Closed 5 years ago

Application cache regression in version 67.0

Categories

(Core :: Networking: HTTP, defect, P3)

Desktop
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 71+ verified
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- verified

People

(Reporter: chuckd, Assigned: ehsan.akhgari)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [necko-triaged])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36

Steps to reproduce:

Set up Offline mail in IBM Verse (https://wonka-01.cwp.pnp-hcl.com/verse). Contact charles.dumont@pnp-hcl.com for credentials to a test user account.

1.) Login in with credentials provided separately
2.) Click on user name in top right corner and select Setup Offline Mail
3.) Enter Password and Confirm password fields and click on Set up

Actual results:

Get Error message saying Failed to download application files....

At the Appcache API level, the listener receives the following appcache events
appcache - online: yes, event: checking, status: uncached
appcache - online: yes, event: error, status: uncached

This is a regression that was introduced in Firefox 67.0. The problem reproduces in the latest version of Firefox (68.0.2) as well as the latest beta release (69.0b15). The problem does not reproduce in versions of Firefox prior to 67.0, nor in current version of other browsers including Chrome, Safari, IE and Edge.

I'm a developer on the IBM Verse product and am reaching out to Mozilla support because we are unable to come up with a workaround for this issue.

Expected results:

Offline setup should have completed successfully.

Some more details on the implementation. When Offline Setup is performed, we load the app into a off-screen child iframe. A cookie is set which tells the server to add the manifest attribute to the html element so that the browser will load the appcache. The appcache is loaded in the iframe, and appcache events that occur in the iframe are posted to the parent window. The parent window monitors the progress of the appcache and reports errors or completion to the user. The iframe url is the same as the parent url so that the appcache resources will be used when the parent is reloaded as well. The appcache error event is occurring during the appcache load of the child iframe.

Hi Charles,

Thanks for providing me with the credentials and for the details when opening the bug. I was able to reproduce the bug on Windows 10 on the following versions:

release 68.0.2 (64-bit), nightly 70.0a1 (2019-08-26) (64-bit) and Beta 69.0b16 (64-bit).

I've chosen a component. If you consider that there's another component that's more proper for this case you may change it.

Best regards, Flor.

Status: UNCONFIRMED → NEW
Component: Untriaged → Downloads API
Ever confirmed: true
OS: Unspecified → Windows 10
Product: Firefox → Toolkit
Hardware: Unspecified → Desktop
Version: 67 Branch → Trunk

I think AppCache bugs are tracked in networking. Though note https://www.fxsitecompat.dev/en-CA/docs/2016/application-cache-support-will-be-removed/

Component: Downloads API → Networking: HTTP
Product: Toolkit → Core

This could be a regression from bug 1525900. AFAIK we are still running tests for appcache, so I'm curious how we could miss a major functionality regression.

For bit more details what could cause the appcache update error might be found int he Browser Console (Shift-Ctrl-J).

Regressed by: 1525900

(In reply to Honza Bambas (:mayhemer) from comment #4)

This could be a regression from bug 1525900. AFAIK we are still running tests for appcache, so I'm curious how we could miss a major functionality regression.

For bit more details what could cause the appcache update error might be found int he Browser Console (Shift-Ctrl-J).

Michal, would you like to take a look?
I think this is P3, since we want to unship AppCache.

Flags: needinfo?(michal.novotny)
Priority: -- → P3
Whiteboard: [necko-triaged]

(In reply to Kershaw Chang [:kershaw] from comment #5)

(In reply to Honza Bambas (:mayhemer) from comment #4)

This could be a regression from bug 1525900. AFAIK we are still running tests for appcache, so I'm curious how we could miss a major functionality regression.

For bit more details what could cause the appcache update error might be found int he Browser Console (Shift-Ctrl-J).

Michal, would you like to take a look?
I think this is P3, since we want to unship AppCache.

I don't think it's a regression from bug 1525900. I'll have a look at it once I get the credential.

Assignee: nobody → michal.novotny
Flags: needinfo?(michal.novotny)
No longer regressed by: 1525900

Parsing of the manifest fails because it's not a valid manifest. Cookies are missing in the request fetching the manifest and the server returns a login page. I'm not sure which bug caused this regression. Ehsan, I guess you might know.

Flags: needinfo?(ehsan)

(In reply to Michal Novotny [:michal] from comment #7)

Parsing of the manifest fails because it's not a valid manifest. Cookies are missing in the request fetching the manifest and the server returns a login page. I'm not sure which bug caused this regression. Ehsan, I guess you might know.

Not off hand, sorry, 67 is pretty old. Since I don't have the login credentials mentioned in comment 2 I cannot even test this bug...

Florencia, do you mind please running a bisection using mozregression and finding the exact commit that has caused this regression? Thanks!

Flags: needinfo?(ehsan) → needinfo?(fdiciocco)
Has Regression Range: --- → no
Has STR: --- → yes
Has Regression Range: no → yes
Flags: needinfo?(fdiciocco)

Looks like bug 1525245 is the cause.

baku, how easy this would be to fix if we even want to?

Blocks: 1525245
Flags: needinfo?(amarchesini)

Any progress on this? It's been a couple of weeks since the last update. This bug is impacting our customers and we'd like to get a fix. We know AppCache is deprecated, but is it still supported?

Flags: needinfo?(michal.novotny)

I don't know. It's a cookie bug and we're still waiting for feedback from baku.

Assignee: michal.novotny → nobody
Flags: needinfo?(michal.novotny)

Too late for 70 but we could still take a patch for 71/72.

I notice that no one is assigned to this bug. Who's the right developer to take this?

Flags: needinfo?(nhnguyen)

Christoph, could someone from your team take a look, esp. at comment #10? Thanks!

Flags: needinfo?(nhnguyen) → needinfo?(ckerschb)

I can have a look. I contacted the email address in comment 0 to get access to the test server.

Flags: needinfo?(ehsan)

In nsOfflineCacheUpdateItem::OpenChannel() we download the cache item with the content policy type TYPE_OTHER. That results in us selecting the "blocking all" variant of cookie settings, which means anything loaded by these channels won't have access to the cookie database.

I have a fix for this part, but that doesn't seem to fix the error on the website, so there is probably more to look into...

Flags: needinfo?(ehsan)
Flags: needinfo?(ckerschb)
Flags: needinfo?(amarchesini)

OK the second problem was the channel that we create for checking the appcache maifest. With that fixed, the site works as expected (as long as the browser.cache.offline.storage.enable pref is set to true).

Assignee: nobody → ehsan
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bc3714b56887 Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache; r=baku

Backed out changeset bc3714b56887 (bug 1575934) for wpt failures at /html/browsers/offline/application-cache-api/api_update_error.https.html

Backout: https://hg.mozilla.org/integration/autoland/rev/f2a55f2baaf87100626bd1594a376093691ca007

Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=bc3714b568870dd7f1cc26cb4036eff3ffeba8e4

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=271304127&repo=autoland&lineNumber=2628

task 2019-10-15T13:55:10.538Z] 13:55:10 INFO - TEST-START | /html/browsers/offline/application-cache-api/api_update_error.https.html
[task 2019-10-15T13:55:10.538Z] 13:55:10 INFO - Closing window 22
[task 2019-10-15T13:55:11.333Z] 13:55:11 INFO - IOError on command, setting status to CRASH
[task 2019-10-15T13:55:12.644Z] 13:55:12 INFO - mozcrash Copy/paste: /builds/worker/workspace/build/linux64-minidump_stackwalk /tmp/tmpVxtxOo/15341576-1949-6fd8-fb40-fb2fe00eda45.dmp /builds/worker/workspace/build/symbols
[task 2019-10-15T13:55:19.744Z] 13:55:19 INFO - mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/15341576-1949-6fd8-fb40-fb2fe00eda45.dmp
[task 2019-10-15T13:55:19.744Z] 13:55:19 INFO - mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/15341576-1949-6fd8-fb40-fb2fe00eda45.extra
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - PROCESS-CRASH | /html/browsers/offline/application-cache-api/api_update_error.https.html | application crashed [@ nsOfflineCacheUpdate::SetCookieSettingsArgs(mozilla::net::CookieSettingsArgs const&)]
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - Crash dump filename: /tmp/tmpVxtxOo/15341576-1949-6fd8-fb40-fb2fe00eda45.dmp
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - Operating system: Android
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - 0.0.0 Linux 3.10.0+ #260 SMP PREEMPT Fri May 19 12:48:14 PDT 2017 x86_64
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - CPU: amd64
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - family 6 model 6 stepping 3
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - 4 CPUs
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO -
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - GPU: UNKNOWN
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO -
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - Crash reason: SIGSEGV /SEGV_MAPERR
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - Crash address: 0x0
[task 2019-10-15T13:55:19.896Z] 13:55:19 INFO - Process uptime: not available
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO -
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Thread 11 (crashed)
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - 0 libxul.so!nsOfflineCacheUpdate::SetCookieSettingsArgs(mozilla::net::CookieSettingsArgs const&) [nsOfflineCacheUpdate.cpp:5392bdcd9d7d66bddc8b0ce43ab084e64a5c49d5 : 2310 + 0x29]
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rax = 0x000070b0aefba75a rdx = 0x0000000000000001
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rcx = 0x000070b0b1dc7a80 rbx = 0x000070b0b26cad30
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rsi = 0x000070b0b26cac80 rdi = 0x000070b0b26ca9d0
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rbp = 0x000070b0b26cace0 rsp = 0x000070b0b26cacc0
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - r8 = 0x0000000000003a27 r9 = 0x000070b0b26ce450
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - r10 = 0x000070b0a9ac0c7a r11 = 0x0000000000000000
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - r12 = 0x0000000080530012 r13 = 0x000070b09b1260f8
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - r14 = 0x000070b0b26cad30 r15 = 0x000070b09ce70060
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rip = 0x000070b0a9ac0c8c
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Found by: given as instruction pointer in context
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - 1 libxul.so!mozilla::docshell::OfflineCacheUpdateParent::Schedule(mozilla::ipc::URIParams const&, mozilla::ipc::URIParams const&, mozilla::ipc::PrincipalInfo const&, bool const&, mozilla::net::CookieSettingsArgs const&) [OfflineCacheUpdateParent.cpp:5392bdcd9d7d66bddc8b0ce43ab084e64a5c49d5 : 129 + 0x17]
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rbp = 0x000070b0b26cadd0 rsp = 0x000070b0b26cacf0
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rip = 0x000070b0a9ac08da
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Found by: previous frame's frame pointer
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - 2 libxul.so!mozilla::dom::ContentParent::RecvPOfflineCacheUpdateConstructor(mozilla::docshell::POfflineCacheUpdateParent*, mozilla::ipc::URIParams const&, mozilla::ipc::URIParams const&, mozilla::ipc::PrincipalInfo const&, bool const&, mozilla::net::CookieSettingsArgs const&) [ContentParent.cpp:5392bdcd9d7d66bddc8b0ce43ab084e64a5c49d5 : 4556 + 0x20]
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rbp = 0x000070b0b26cae30 rsp = 0x000070b0b26cade0
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rip = 0x000070b0ab3ad18d
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Found by: previous frame's frame pointer
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - 3 libxul.so!mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&) [PContentParent.cpp: : 8890 + 0x33]
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rbp = 0x000070b0b26ccbc0 rsp = 0x000070b0b26cae40
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rip = 0x000070b0a965a3a1
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Found by: previous frame's frame pointer
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - 4 libxul.so!mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [MessageChannel.cpp:5392bdcd9d7d66bddc8b0ce43ab084e64a5c49d5 : 2185 + 0xd]
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rbp = 0x000070b0b26ccc00 rsp = 0x000070b0b26ccbd0
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - rip = 0x000070b0a959ea99
[task 2019-10-15T13:55:19.897Z] 13:55:19 INFO - Found by: previous frame's frame pointer

Flags: needinfo?(ehsan)
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae8dbea0d35a Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache; r=baku
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Ryan, I understand the decision of not shipping a fix for this in 70 and waiting for 71. But about ESR, I'm not sure if wontfix is a good decision? Without this, app cache is completely broken... I know that we're about to unship the feature and the breakage caused by it is probably minimal, but enterprise environments are exactly where I would expect the last deployment(s) of app cache to be found. Do you think you'd be open to reconsidering after some bake time?

Flags: needinfo?(ryanvm)

Sure, we can revisit during the next cycle. Note that the patch needs rebasing for ESR68 too.

Flags: needinfo?(ryanvm)

Hi. I just tried this with the latest nightly, 72.0a1 (2019-11-04) (64-bit), an it's still not working for us. Should I be using a different build?

Flags: needinfo?(ehsan)

(In reply to chuckd from comment #26)

Hi. I just tried this with the latest nightly, 72.0a1 (2019-11-04) (64-bit), an it's still not working for us. Should I be using a different build?

Please see comment 18. On Nightly you need to set the browser.cache.offline.storage.enable preference to true in about:config, because the app cache API is about to be removed from Firefox and has been disabled in Nightly for now.

Flags: needinfo?(ehsan)

Thanks. I set browser.cache.offline.storage.enable to true but it's still not working. I think this message in the browser console may have something to do with it.

The Notification permission may only be requested from inside a short running user-generated event handler. I've not seen that before.

Never mind. Seems I needed to restart the browser after making that config change. It's working now. Thanks.

(In reply to :ehsan akhgari from comment #24)

Hi Ehsan, go-to-build for 68.3esr is next week. If you want to nominate a rebased patch for uplift, we'll need it pretty soon.

Flags: needinfo?(ehsan)

We would certainly like to see this fix go into the esr since many of our customers use esr releases.

Comment on attachment 9110135 [details]
Bug 1575934 - Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This patch fixes app cache which broke in bug 1525245 (Firefox 67).
  • User impact if declined: Web apps relying on app cache fail to function correctly (e.g. see comment 0).
  • Fix Landed on Version: 71
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This change is fairly large, but it is not super complex. It pipes the cookie settings objects to more places. Since that object is exposed to many existing places in the code before that in itself isn't very risky. It has also received some testing on trunk though app cache is disabled on trunk/early beta by default so that testing is of limited usefulness.

The reason why I evaluate the riskiness as medium is that we have a preference that would allow the app cache storage to be turned off in the case of a disaster situation (e.g. this patch causing an unexpected crash spike).

  • String or UUID changes made by this patch: None
Flags: needinfo?(ehsan)
Attachment #9110135 - Flags: approval-mozilla-esr68?

Unfortunately I'm unable to push this to try due to bug 1597858. I'm also unable to build the patch locally due to bug 1597860 as well as bug 1597864. So I have no way of testing this patch... :-( I would appreciate some help if you've dealt with this before?

Flags: needinfo?(ryanvm)

Not sure why you're hitting bug 1597858, but I can try pushing it to Try for you if you want. Any particular builds/tests you wanted to run?

Flags: needinfo?(ryanvm) → needinfo?(ehsan)

(In reply to chuckd from comment #29)

Never mind. Seems I needed to restart the browser after making that config change. It's working now. Thanks.

Would you mind testing Firefox 71 as well to see if this is also fixed? Or should I ask for a test account (not sure how many have been given and don't want to abuse that).

https://archive.mozilla.org/pub/firefox/candidates/71.0b11-candidates/build1/

Flags: needinfo?(chuckd)
QA Whiteboard: [qa-triaged]

(In reply to Ryan VanderMeulen [:RyanVM] from comment #35)

Not sure why you're hitting bug 1597858, but I can try pushing it to Try for you if you want. Any particular builds/tests you wanted to run?

All builds/tests on all platforms please.

Flags: needinfo?(ehsan)

(In reply to Bogdan Maris [:bogdan_maris], Release Desktop QA from comment #36)

(In reply to chuckd from comment #29)

Never mind. Seems I needed to restart the browser after making that config change. It's working now. Thanks.

Would you mind testing Firefox 71 as well to see if this is also fixed? Or should I ask for a test account (not sure how many have been given and don't want to abuse that).

https://archive.mozilla.org/pub/firefox/candidates/71.0b11-candidates/build1/

I just emailed you the test account information, FWIW.

(In reply to :ehsan akhgari from comment #37)

All builds/tests on all platforms please.

Busted build:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d9e3d8302f860b64a9c133f2487239cc98bf92c5

Flags: needinfo?(ehsan)

Tested on 71.0b11 and I see the same failure that was reported. I checked browser.cache.offline.storage.enable in about:config and the value is true. I didn't have to change it.

Contact charles.dumont@pnp-hcl.com if you need credentials to the test user account.

Flags: needinfo?(chuckd)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #39)

(In reply to :ehsan akhgari from comment #37)

All builds/tests on all platforms please.

Busted build:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d9e3d8302f860b64a9c133f2487239cc98bf92c5

Hmm, not sure what that error means. But now I succeeded to build locally, so I'll look into it...

Flags: needinfo?(ehsan)

OK, fixed the build failure. Updated the patch, and re-tested to ensure the fix works properly on the ESR68 branch as well.

This is as green as things can get on try. Good to go on my end.

Could someone please take a look at why this problem still reproduces on 71.0b11? Thanks.

(In reply to chuckd from comment #44)

Could someone please take a look at why this problem still reproduces on 71.0b11? Thanks.

Flags: needinfo?(bogdan.maris)

Let's let this bake in 71 before we evaluate this for uplift to esr. That would mean either for a 68.3.1 if we end up with one for some other reason, or 68.4.0.

Comment on attachment 9110135 [details]
Bug 1575934 - Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache

I'd like to hold off on uplift here but am adding an esr tracking flag to re-evaluate for the next esr.

Attachment #9110135 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68-

Hi Chuckd, I verified both on Firefox 71.0b11 and 71.0b12 and couldn't encounter the issue at all. Maybe there could be something wrong with the profile you are using? Here's an image from 71.0b12 with the offline server created + the message from console.

Flags: needinfo?(bogdan.maris)

Hi Catalin. You are correct. When I switch to a new profile, I can no longer reproduce the problem. Not sure what's wrong with my original profile. I tried clearing cookies and site data, but that didn't help. I also checked browser.cache.offline.enable and browser.cache.offline.storage.enable in about:config and they're both true.

I tried upgrading to the beta on a different machine that had 70 installed and had previously failed to setup offline in Verse. After upgrading, I was able to successfully setup offline, so I think we're ok.

Thanks Chuckd for the fast reply! Glad that it worked out after all. Good luck!

(In reply to Liz Henry (:lizzard) from comment #47)

Comment on attachment 9110135 [details]
Bug 1575934 - Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache

I'd like to hold off on uplift here but am adding an esr tracking flag to re-evaluate for the next esr.

Liz, it looks like this decision was made based on incorrect testing results on the 71 branch. Turns out the fix was working fine there. Do you think we should re-evaluate for the current ESR or are you still comfortable with punting until the next one? Thanks!

Flags: needinfo?(lhenry)

Comment on attachment 9110135 [details]
Bug 1575934 - Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache

OK, now that we're more sure of the verification in 71, let's go ahead and uplift this for 68.3esr.

Flags: needinfo?(lhenry)
Attachment #9110135 - Flags: approval-mozilla-esr68- → approval-mozilla-esr68+

Seems to be working as intended on 68.3.0esr too.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: