Closed Bug 1928114 Opened 1 year ago Closed 1 year ago

"export to mobile" fails to generate QR code for 2 byte wide unicode characters

Categories

(Thunderbird :: Account Manager, defect, P1)

Thunderbird 128
defect

Tracking

(thunderbird_esr128 fixed, thunderbird132 fixed, thunderbird133 fixed, thunderbird134 fixed)

VERIFIED FIXED
134 Branch
Tracking Status
thunderbird_esr128 --- fixed
thunderbird132 --- fixed
thunderbird133 --- fixed
thunderbird134 --- fixed

People

(Reporter: sugotland, Assigned: freaktechnik)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

  1. Open 'Setting' in Spaces Toolbar
  2. Click "Export to Mobile"
    3.Click the button "Export"

Actual results:

The QR codes don't appear.

Expected results:

Show a QR code.

Summary: export to mobile has → "export to mobile" fails to generate QR code for Japanese

I also find this bug in 130.

Thanks for the report of this problem. Could you possibly help to get a little more detail by opening up the developer console (Ctrl+Shift+I) and provide any error messages that appear when you attempt to generate the QR code?

Flags: needinfo?(sugotland)

Not Janpanese. It is Chinese

Flags: needinfo?(sugotland)

(In reply to Toby Pilling [:tobyp] from comment #2)

Thanks for the report of this problem. Could you possibly help to get a little more detail by opening up the developer console (Ctrl+Shift+I) and provide any error messages that appear when you attempt to generate the QR code?

OK. I will try

Uncaught Cannot encode text 10 qrcode.mjs:169:9
Segment resource:///modules/qrcode.mjs:169
segments resource:///modules/qrcode.mjs:818
map self-hosted:175
generate resource:///modules/qrcode.mjs:818
renderQR resource:///modules/QRExport.sys.mjs:213
getQRCodes resource:///modules/QRExport.sys.mjs:132
initializeQRCodes chrome://messenger/content/preferences/qr-code-wizard.mjs:58
showCodes chrome://messenger/content/preferences/qrExport.mjs:255
addEventListeners chrome://messenger/content/preferences/qrExport.mjs:109

addEventListeners chrome://messenger/content/preferences/qrExport.mjs:107
init chrome://messenger/content/preferences/qrExport.mjs:21
init chrome://messenger/content/preferences/preferences.js:133
AsyncFunctionNext self-hosted:800

init_category_if_required chrome://messenger/content/preferences/preferences.js:110
gotoPref chrome://messenger/content/preferences/preferences.js:266
init chrome://messenger/content/preferences/preferences.js:187

<anonymous> chrome://messenger/content/preferences/preferences.js:95

In english(US) language, the bug also can be reproduced.

Segment resource:///modules/qrcode.mjs:169
segments resource:///modules/qrcode.mjs:818
map self-hosted:175
generate resource:///modules/qrcode.mjs:818
renderQR resource:///modules/QRExport.sys.mjs:213
getQRCodes resource:///modules/QRExport.sys.mjs:132
initializeQRCodes chrome://messenger/content/preferences/qr-code-wizard.mjs:58
showCodes chrome://messenger/content/preferences/qrExport.mjs:255
addEventListeners chrome://messenger/content/preferences/qrExport.mjs:109

Severity: -- → S1
Priority: -- → P1
Assignee: nobody → martin
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: "export to mobile" fails to generate QR code for Japanese → "export to mobile" fails to generate QR code for 2 byte wide unicode characters
Target Milestone: --- → 134 Branch

Comment on attachment 9434277 [details]
Bug 1928114 - Fix exporting QR codes with 2 byte utf-8 characters. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): bug 1919799 initially implemented this
User impact if declined: Can't generate QR code to export mail accounts if any of the export data contains UTF-8 codepoints that are two bytes wide.
Testing completed (on c-c, etc.): Tested in local build, has unit test coverage (and still passes existing coverage)
Risk to taking this patch (and alternatives if risky): Low risk, given unit tests are unaffected and this just subtly changes the data we encode in the QR code. Alternatively we could guide users to not include passwords and make sure their account names don't include non-ascii characters etc. but that seems like it would make it too much effort to use the feature in the first place.

Attachment #9434277 - Flags: approval-comm-beta?

SuGotLand, would you be willing to test the fix in the daily build tomorrow?

Flags: needinfo?(sugotland)

Nowdays my disk has been nearly full, so I can' t build the daily version locally, but I can download and test the new version of the daily after it update in the download page.

Flags: needinfo?(sugotland)

(In reply to Corey Bryant from comment #9)

SuGotLand, would you be willing to test the fix in the daily build tomorrow?

You can email me after updating.

Seems like this also fixes other UTF-8 encoding errors the QR code could produce for other non-ASCII characters.

Blocks: 1918537

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fd4c4c22d1db
Fix exporting QR codes with 2 byte utf-8 characters. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Duplicate of this bug: 1928233

(In reply to SuGotLand from comment #14)

The windows version is only 841KB, it can't run and delete my own daily version.

Ah yes, sorry, I had linked the wrong file. https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/e9pC1cv_Tqan1rSGdbWk7w/runs/0/artifacts/public/build/install/sea/target.installer.exe should be better. Though since it's landed now it should be in a regular daily in about 3 hours or so.

Comment on attachment 9434277 [details]
Bug 1928114 - Fix exporting QR codes with 2 byte utf-8 characters. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9434277 - Flags: approval-comm-beta? → approval-comm-beta+

It works on linux, but on windows, the bug still exists.

Comment on attachment 9434277 [details]
Bug 1928114 - Fix exporting QR codes with 2 byte utf-8 characters. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): bug 1919799 initially implemented this
User impact if declined: Can't generate QR code to export mail accounts if any of the export data contains UTF-8 codepoints that are two bytes wide.
Testing completed (on c-c, etc.): Tested in local build, has unit test coverage (and still passes existing coverage)
Risk to taking this patch (and alternatives if risky): Low risk, given unit tests are unaffected and this just subtly changes the data we encode in the QR code. Alternatively we could guide users to not include passwords and make sure their account names don't include non-ascii characters etc. but that seems like it would make it too much effort to use the feature in the first place.

Attachment #9434277 - Flags: approval-comm-release?
Attachment #9434277 - Flags: approval-comm-esr128?
Duplicate of this bug: 1928569
Duplicate of this bug: 1928468

Comment on attachment 9434277 [details]
Bug 1928114 - Fix exporting QR codes with 2 byte utf-8 characters. r=#thunderbird-reviewers

[Triage Comment]
Approved for release

[Triage Comment]
Approved for esr128

Attachment #9434277 - Flags: approval-comm-release?
Attachment #9434277 - Flags: approval-comm-release+
Attachment #9434277 - Flags: approval-comm-esr128?
Attachment #9434277 - Flags: approval-comm-esr128+
Duplicate of this bug: 1929150

Confirming this issue as verified fixed on 133.0b3(20241107210012) using Windows 10.

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

Attachment

General

Creator:
Created:
Updated:
Size: