Closed Bug 1786128 Opened 2 years ago Closed 2 years ago

Can't export settings in Dark Reader

Categories

(Core :: DOM: File, defect, P2)

Firefox 105
defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox104 --- unaffected
firefox105 + fixed
firefox106 + fixed

People

(Reporter: bloonyapprentice, Assigned: dlrobertson)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(1 file, 1 obsolete file)

Steps to Reproduce

  1. Install Dark Reader.
  2. Click Dark Reader icon > Dev tools (in the bottom-right corner) > Preview new design to activate the new design.
  3. Click Dark Reader icon again > Settings > Manage settings > Export Settings.

Expected results

Dark Reader should successfully download the json file.

Actual results

Dark Reader does not download the file. No errors are displayed in about:debugging.

Regression range

 4:34.71 INFO: Narrowed integration regression window from [a6e42689, 58b31341] (3 builds) to [a6e42689, c1d1be43] (2 builds) (~1 steps left)
 4:34.71 INFO: No more integration revisions, bisection finished.
 4:34.71 INFO: Last good revision: a6e4268924e20f94b4e1e96ed1eb61d1909f8cfd
 4:34.71 INFO: First bad revision: c1d1be434427b1d709c490a02a1e8ac0899aba14
 4:34.71 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a6e4268924e20f94b4e1e96ed1eb61d1909f8cfd&tochange=c1d1be434427b1d709c490a02a1e8ac0899aba14

Points to bug 1771423.

Notes

I've also seen this problem manifested in websites like https://paimon.moe. The Wish History can't be exported.

Has STR: --- → yes
Regressed by: 1771423

:dlrobertson, since you are the author of the regressor, bug 1771423, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(drobertson)

(In reply to bloonyapprentice from comment #0)

...
Points to bug 1771423.

Notes

I've also seen this problem manifested in websites like https://paimon.moe. The Wish History can't be exported.

Thanks for the bug report! Your STR was very clear and helpful. This is definitely a bug introduced by bug 1771423. The exact cause is due to saveFile in dark mode reader creates a Blob without a content type set. Downloading a file without a content type does not appear to work currently. I have not figured out the fix yet, but I have attached a minimal reproducer.

Flags: needinfo?(drobertson)

Hmm, should we back out bug 1771423 from beta so that we don't end up shipping the regression?
Of course if the fix is easy, we could land that in beta too.

[Tracking Requested - why for this release]: Regressing bug landed in 105.

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Hi Dan

Could you take a look at this bug? Since it is a regression of 1771423.

Set it as p2 since the patch is still on nightly.

Flags: needinfo?(drobertson)
Priority: -- → P2

(In reply to Eden Chuang[:edenchuang] from comment #7)

Could you take a look at this bug? Since it is a regression of 1771423.

Set it as p2 since the patch is still on nightly.

Sorry, should have assigned myself! I started looking at it over the weekend. Thanks for the ping.

Assignee: nobody → drobertson
Flags: needinfo?(drobertson)
Assignee: drobertson → nobody
Severity: -- → S2
Assignee: nobody → drobertson

Figured out the cause of this. I'll post a patch tonight and try to work out a test.

A blob's content type is set from the blob type and is not sniffed. When
downloading a file and the content type is empty attempt to use the extension to
guess the content-type.

Ran the original STR from here and bug 1786480 with D155439, and the expected results are seen. There are at least two other alternative approaches to fixing this regression as noted in this comment. Feedback is very much welcomed.

Dan, this bug is collecting duplicates, one of a them a Webcompat P1 bug, and we merge 106 to beta next Monday. I think we should backout bug 1771423 from mozilla-central since we already had to back it out from beta 105 last cycle. What do you think?

Flags: needinfo?(drobertson)

(In reply to Pascal Chevrel:pascalc from comment #15)

Dan, this bug is collecting duplicates, one of a them a Webcompat P1 bug, and we merge 106 to beta next Monday. I think we should backout bug 1771423 from mozilla-central since we already had to back it out from beta 105 last cycle. What do you think?

Yeah, I'm okay with that. The fix is known (patch attached), but its proving to be difficult to determine the best behavior here to remain compatible with other browsers and follow the spec. How do backouts work when wpt tests are added? Do the wpt tests get removed from upstream as well?

I am not sure what we should do about the wpt tests, James would you know what is the best practice in our situation? Thanks!

Flags: needinfo?(james)

How do backouts work when wpt tests are added? Do the wpt tests get removed from upstream as well?

By default the sync will notice the test removal and create an upstream PR with the changes. So yes, they will be removed upstream once that PR lands. If you don't want that you could just backout the code changes and leave the test changes.

Flags: needinfo?(james)

(In reply to James Graham [:jgraham] from comment #19)

By default the sync will notice the test removal and create an upstream PR with the changes. So yes, they will be removed upstream once that PR lands. If you don't want that you could just backout the code changes and leave the test changes.

+1 that's probably fine. I'll keep working on this and hopefully the tests won't be out of wpt for too long

Flags: needinfo?(drobertson)

When do bugs solved by a backout get closed? I'm no longer able to repro this bug on nightly, and it is already backed out of beta.

Now is good :-). Fixed by backout.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Attachment #9291266 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: