Closed Bug 1322569 Opened 8 years ago Closed 5 years ago

Support about:reader on OriginParser

Categories

(Core :: Storage: Quota Manager, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: myk, Assigned: tt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On my regular profile, with the latest Nightly, all attempts to load a service worker script are failing with: Registration failed: TypeError: ServiceWorker script at SW-URL for scope SCOPE-URL encountered an error during installation. This might be related to bug 1242056, except that I'm on the latest Nightly, whereas that bug is an issue when using a Release version of Firefox with a profile that was previously used with the latest Nightly. Example: https://new.cleopatra.io/ "TypeError: ServiceWorker script at https://new.cleopatra.io/sw.js for scope https://new.cleopatra.io/ encountered an error during installation."
Does this happen on a fresh profile?
Flags: needinfo?(myk)
(In reply to Ben Kelly [:bkelly] from comment #1) > Does this happen on a fresh profile? No, I can't reproduce on a fresh profile.
Flags: needinfo?(myk)
Ben: is there a particular subset of the failing profile that I can provide to help diagnose the problem?
Flags: needinfo?(bkelly)
At a minimum I need the contents of: <profile>/storage/default/https+++new.cleopatra.io Can you zip that up and email to me separately?
Flags: needinfo?(bkelly) → needinfo?(myk)
(In reply to Ben Kelly [:bkelly] from comment #4) > At a minimum I need the contents of: > > <profile>/storage/default/https+++new.cleopatra.io > > Can you zip that up and email to me separately? Hmm, that doesn't exist. I do have a variety of other directories in <profile>/storage/default/, but since I don't have that one, presumably the failure occurs before that directory is created.
Flags: needinfo?(myk)
Hmm, when I load https://new.cleopatra.io/, the Browser Console reports a couple errors associated with bug 1286914: Quota 'url=https%3A%2F%2Fmichielbdejong.github.io%2Fmichielbdejong.com%2Fblog%2F16.html' is not a valid port number!: ActorsParent.cpp:6865 Quota Origin 'about+reader+url=https%3A%2F%2Fmichielbdejong.github.io%2Fmichielbdejong.com%2Fblog%2F16.html' failed to parse, handled tokens: 'about', 'reader': ActorsParent.cpp:6616 TypeError: ServiceWorker script at https://new.cleopatra.io/sw.js for scope https://new.cleopatra.io/ encountered an error during installation. So I guess this is that bug.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Hmm, or perhaps it isn't a duplicate, since I still see it after deleting storage for the origin that breaks in bug 1286914. I do see some other errors in the Error Console on startup that could be related: IndexedDB UnknownErr: ActorsParent.cpp:591 IndexedDB UnknownErr: ActorsParent.cpp:591 undefined Promise-backend.js:935 UnknownError indexed-db.js:59:9
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
We probably need a copy of the whole storage directory. Jan should probably look since this looks like a QuotaManager issue. If you don't have time to investigate with travel, please save off the profile so we can look into it next week.
Flags: needinfo?(jvarga)
(In reply to Ben Kelly [:bkelly] from comment #8) > We probably need a copy of the whole storage directory. Jan should probably > look since this looks like a QuotaManager issue. > > If you don't have time to investigate with travel, please save off the > profile so we can look into it next week. I've copied the directory, but it's very large (even after compression): 368M storage 333M storage.tbz2 It also contains much personal data. Is there a useful subset I can provide to help diagnose the problem?
(In reply to Myk Melez [:myk] [@mykmelez] from comment #9) > (In reply to Ben Kelly [:bkelly] from comment #8) > > We probably need a copy of the whole storage directory. Jan should probably > > look since this looks like a QuotaManager issue. > > > > If you don't have time to investigate with travel, please save off the > > profile so we can look into it next week. > > I've copied the directory, but it's very large (even after compression): > > 368M storage > 333M storage.tbz2 > > It also contains much personal data. Is there a useful subset I can provide > to help diagnose the problem? A recursive directory listing of <profile>/storage should be enough for start.
Flags: needinfo?(jvarga)
Also, check the error console, there can be a warning, something like QuotaManager: OriginParser error ...
(In reply to Jan Varga [:janv] from comment #10) > A recursive directory listing of <profile>/storage should be enough for > start. Ok, I've sent that to you directly via email. (In reply to Jan Varga [:janv] from comment #11) > Also, check the error console, there can be a warning, something like > QuotaManager: OriginParser error ... Hmm, I don't see any errors in the Browser Console when filtering on "quota".
Priority: -- → P2
Priority: P2 → P3
I'm seeing the same on my daily use profile that's 10 months old. I use that profile exclusively with Nightly. ni? jvarga: Did Myk's directory listing yield anything useful? How can I help track this down?
Flags: needinfo?(jvarga)

Tom, did fix this in a different bug ?

Flags: needinfo?(jvarga) → needinfo?(shes050117)

The origin directory is:

about+reader+url=httpsxxxx

Which is not supported by the originParser yet. So that it crashes on a debug build at [1] (and fail on a non-debug build).

[1] https://searchfox.org/mozilla-central/rev/44a212460990ffffecf50a8e972d3cbde2e7216b/dom/quota/ActorsParent.cpp#8853

Given this is an initialization failure, I'm going to take this.

Assignee: nobody → shes050117
Blocks: 1482662
Status: REOPENED → ASSIGNED
Flags: needinfo?(shes050117)

About:reader's implementation is:
https://searchfox.org/mozilla-central/source/toolkit/components/reader/ReaderMode.jsm

It seems that the format should be:
about:reader?url=https.... or
about:reader?url=http....

Component: DOM: Service Workers → DOM: Quota Manager
Priority: P3 → P2
Summary: TypeError: ServiceWorker script encountered an error during installation on latest Nightly → Support about:reader on OriginParser

I'll work on this tomorrow if there is nothing unexpected happen. This should be done before the upgrade if it's needed.

So about:reader?url=xxx is striped to about:reader by bug 1422456. I need to see if it's reasonable to have storage for "about:reader?url=xxx"
If it's reasonable, then we should probably somehow get the stripped part back. If it's not, then we should remove existing about:reader from storage and forbidden new about:reader storage.

While testing, I found that indexedDB, cache , and localstorage couldn't be got in "about:reader?url=xxx". The only possible way (IIUC) to have storage is to create that by the storage inspector.

I think comment 20 may moot this, but I don't think we'd ever want the "?url=xxx" parameterization to partition the storage.

Attachment #9071922 - Attachment description: Bug 1322569 - Recognize about:reader URL as an obsolete origin in quota manager; → Bug 1322569 - Support about:reader in quotaManager but recognize about:reader?url=xxx as an obsolete origin in quota manager;
Attachment #9071922 - Attachment description: Bug 1322569 - Support about:reader in quotaManager but recognize about:reader?url=xxx as an obsolete origin in quota manager; → Bug 1322569 - Recognize the about:reader?url=xxx as an obsolete origin in quota manager;
Pushed by shes050117@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7acbbe02705e Recognize the about:reader?url=xxx as an obsolete origin in quota manager; r=asuth
Status: ASSIGNED → RESOLVED
Closed: 8 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
See Also: → 1491637
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: