Support about:reader on OriginParser

RESOLVED FIXED in Firefox 69

Status

()

defect
P2
normal
RESOLVED FIXED
3 years ago
3 days ago

People

(Reporter: myk, Assigned: tt)

Tracking

(Blocks 1 bug)

unspecified
mozilla69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 years ago
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)
Reporter

Comment 2

3 years ago
(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)
Reporter

Comment 3

3 years ago
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)
Reporter

Comment 5

3 years ago
(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)
Reporter

Comment 6

3 years ago
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: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1286914
Reporter

Comment 7

3 years ago
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)
Reporter

Comment 9

3 years ago
(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 ...
Reporter

Comment 12

3 years ago
(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)

Comment 14

3 months ago

Tom, did fix this in a different bug ?

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

Comment 15

3 months ago

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)
Assignee

Comment 16

8 days ago

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
Assignee

Comment 17

6 days ago

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

Assignee

Comment 19

5 days ago

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.

Assignee

Comment 20

5 days ago

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;

Comment 23

4 days ago
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

Comment 24

3 days ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 years ago3 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.