Open Bug 1594453 Opened 5 years ago Updated 2 years ago

DevTools broken because of extra character in l10n.js

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: regression)

Attachments

(3 files)

Reported via https://twitter.com/twenster/status/1192063960549384192 , maybe a broken language pack.

:flod, could this be related to l10n?

Flags: needinfo?(francesco.lodolo)
Attached image immagine.png

In 70 we moved the menubar to Fluent, but I don't see how that could create this kind of issue (the whole menubar should be dead). It also works fine for me on a 70.0.1 German build.

Is he using a language pack maybe (in about:addons, Languages tab)?

Flags: needinfo?(francesco.lodolo)

More details from the report: https://twitter.com/twenster/status/1192109278544486402

Used 70.0.1, works in French, broken in German.

See Also: → 1594522

Sorry but I don't see how this is related to uplifts.

Language packs are compatible with one version of Firefox, so we have the problem when we uplift new strings to mozilla-beta, and it affects Beta and DevEdition. Release doesn't have this kind of issues, because we never uplift to release.

See Also: 1594522

For reference, I can't reproduce with:

  • German build, new profile.
  • Existing profile, installing the German language pack.

It would be useful to see if there's anything reported in the error console when Firefox starts.

Hi, I'm the one on twitter how reported the issue. I checked this morning the langage pack on my browser and didn't found any in the extension panel. Mozilla addons page shows I can install the latest german pack though. see screenshot below.

Thanks for signing up to Bugzilla, it makes the conversation a lot easier.

I don't see a screenshot, but if there is no Languages panel in about:addons, it means that you're using a fully localized build, and that excludes issues with language packs.

First of all, with Firefox closed, could you make a copy of your profile folder? That could help later, if we manage to fix the issue.
You can find the path to your profile in about:profiles, just make a copy of the entire folder.

Once that's done, can you try to launch Firefox with the -purgecaches option? Assuming you've installed Firefox in the default path, try running from terminal /Applications/Firefox.app/Contents/MacOS/firefox -purgecaches.

One more question: can you still access the browser console with cmd+shift+J? If so, can you see if there are any errors about Fluent or DevTools?

(copied the relevant screenshot as an attachment, so yes this is a regular German build, no language pack here).

If the suggested cmd+shift+j is not working, you may try to set devtools.console.stdout.chrome and devtools.console.stdout.content to true, and then start Firefox from the command line. If there is an exception while starting DevTools you could see it in the logs then.

(In reply to Julian Descottes [:jdescottes] from comment #11)

If the suggested cmd+shift+j is not working, you may try to set devtools.console.stdout.chrome and devtools.console.stdout.content to true, and then start Firefox from the command line. If there is an exception while starting DevTools you could see it in the logs then.

I just did, find below the different outputs :)

(In reply to Francesco Lodolo [:flod] from comment #8)

One more question: can you still access the browser console with cmd+shift+J? If so, can you see if there are any errors about Fluent or DevTools?

Using the shortcut doesn't opens any console. However here is the log when firefox is started from the terminal:

console.error: "Exception while trigerring key [object Object]: SyntaxError: "" string literal contains an unescaped line break
load@resource://devtools/shared/base-loader.js:192:27
_require@resource://devtools/shared/base-loader.js:430:23
requireHook@resource://devtools/shared/Loader.jsm:90:14
require@resource://devtools/shared/base-loader.js:384:14
@resource://devtools/client/definitions.js:111:44
load@resource://devtools/shared/base-loader.js:192:27
_require@resource://devtools/shared/base-loader.js:430:23
requireHook@resource://devtools/shared/Loader.jsm:90:14
require@resource://devtools/shared/base-loader.js:384:14
@resource://devtools/client/framework/devtools.js:47:12
load@resource://devtools/shared/base-loader.js:192:27
_require@resource://devtools/shared/base-loader.js:430:23
requireHook@resource://devtools/shared/Loader.jsm:90:14
require@resource://devtools/shared/base-loader.js:384:14
@resource://devtools/client/framework/devtools-browser.js:18:30
load@resource://devtools/shared/base-loader.js:192:27
_require@resource://devtools/shared/base-loader.js:430:23
requireHook@resource://devtools/shared/Loader.jsm:90:14
require@resource://devtools/shared/base-loader.js:384:14
initDevTools@resource:///modules/DevToolsStartup.jsm:818:12
onKey@resource:///modules/DevToolsStartup.jsm:756:30
attachKeys/xulKey<@resource:///modules/DevToolsStartup.jsm:684:58
"

(In reply to Francesco Lodolo [:flod] from comment #7)

Once that's done, can you try to launch Firefox with the -purgecaches option? Assuming you've installed Firefox in the default path, try running from terminal /Applications/Firefox.app/Contents/MacOS/firefox -purgecaches.

Here is the log:

$ /Applications/Firefox.app/Contents/MacOS/firefox -purgecaches
console.log: "Context menu callback function called"
console.log: "Setting up Sentry Remote Error Reporting: SENTRY_DSN_PROD"
console.log: "Injecting MetaMask Mesh testing client"
console.log: "base_url=https://lastpass.com/"
console.warn: "MetamaskContentscript - lost connection to MetaMask Background Multiplex"
console.warn: "MetamaskContentscript - lost connection to MetaMask muxed traffic for channel "provider" failed."
console.warn: "MetamaskContentscript - lost connection to MetaMask muxed traffic for channel "publicConfig" failed."
console.log: "server.js : lp_StartLogin fromlogincheckack=undefined"
console.log: "server.js : lplogincheck fromwebsite=httptest sessionid=undefined"
console.log: "server.js : loginoffline from=logincheck offline_before_online=true"
console.log: "logincheck getting uuid"
console.log: "logincheck got uuid"
console.log: "logincheck getting uuid"
console.log: "logincheck got uuid"
console.log: "MetaMask Mesh Testing - threshold not matched -- skipping test"
console.warn: "MetamaskContentscript - lost connection to MetaMask Background Multiplex"
console.warn: "MetamaskContentscript - lost connection to MetaMask muxed traffic for channel "provider" failed."
console.warn: "MetamaskContentscript - lost connection to MetaMask muxed traffic for channel "publicConfig" failed."
console.log: "read: 26 preferences"
console.log: "server.js : lpLoginCheckResponse fromwebsite=httptest"
console.log: "read: 40 preferences"
console.log: "server.js : lpLoginCheckResponseStep2 fromwebsite=httptest"
console.log: "server.js : ***** disableoffline=false"
console.log: "server.js : lpLoginResponse_win fromwebsite=httptest bIsLoginCheck=true"
console.log: "server.js : lpLoginResponse_win1_5 fromwebsite=httptest bIsLoginCheck=true"
console.log: "server.js : lpReadKeyFile fromwebsite=httptest silent=false bIsLoginCheck=true"
console.log: "server.js : lpReadKeyFile : reading db"
console.log: "server.js : lpReadKeyFile : starting db transaction"
console.log: "server.js : lpReadKeyFile calling executeSql"
console.log: "server.js : lpLoginCommon bIsLoginCheck=true"
console.log: "server.js : lpReadKeyFile : reading numrows=1"
console.log: "server.js : lpReadKeyFile : worked -- calling lpLoginResponse_win2"
console.log: "server.js : lpLoginResponse_win2 fromwebsite=httptest bIsLoginCheck=true"
console.log: "server.js : lpLoginResponse_win2 lp_server_attach_version=0"
console.log: "RSA : login response : server returned privatekeyenchash : calling readrsaprivatekeyhexfromdb() to make sure it matches the local value"
console.log: "rsa_clearvars : called"
console.log: "RSA : readrsaprivatekeyhexfromdb : trying to read from db"
console.log: "server.js : !hassites() or server_ver:3224 != local_ver:-1 so calling get_accts_local!"
console.log: "RSA : readrsaprivatekeyhexfromdb : found it in the db"
console.log: "RSA : readrsaprivatekeyhexfromdb : trying to decrypt using CBC"
console.log: "RSA : readrsaprivatekeyhexfromdb : successfully decrypted using CBC and extracted plaintext private key"
console.log: "RSA : readrsaprivatekeyhexfromdb : SUCCESS"
console.log: "server.js : num sites: 312 num sn: 4 num ff: 0 num identities: 0 pendings: 0 num applications: undefined"
console.log: "read: 40 preferences"
console.log: "ReadFileGeneric : calling read_file binary function filename=af7926d2e39feef7b1ed0a6d5f20db6dc0fb99d01407366a8eeb269c0b53772c.sch filename2=af7926d2e39feef7b1ed0a6d5f20db6dc0fb99d01407366a8eeb269c0b53772c.sch"
console.log: "ReadFileGeneric : callback2 called"
console.log: "ReadFileGeneric : callback2 calling callback"
console.log: "challenge:returning cuz cached"

Something I noticed too, profile filename pattern has changed.
I usually see a filename like : 5y51qd9j.default
But my current profile foldername is : mpic1orm.default-release

In fact I have 2 folders, one dated in september with the old format, and the "new" dated today, with the new format. If this may be any clue.

Thanks a lot for the logs, this is super helpful!

It seems to indicate DevTools are crashing when we load a specific file from definitions.js

https://hg.mozilla.org/releases/mozilla-release/file/tip/devtools/client/definitions.js#l111

const { MultiLocalizationHelper } = require("devtools/shared/l10n");

Even though the file is related to localization, this is just a regular DevTools module and you should have exactly the version in your French and in your German versions... Could you try to open a tab on resource://devtools/shared/l10n.js in your German browser and attach the content you get here?

(In reply to Olivier Anh from comment #13)

Something I noticed too, profile filename pattern has changed.
I usually see a filename like : 5y51qd9j.default
But my current profile foldername is : mpic1orm.default-release

In fact I have 2 folders, one dated in september with the old format, and the "new" dated today, with the new format. If this may be any clue.

That is likely caused by the "profile-per-install" feature. Release could not use your existing profile, and created one with default-release.
https://blog.nightly.mozilla.org/2019/01/14/moving-to-a-profile-per-install-architecture/

Attached file l10n.js

Thanks! So I can see at line 190 that there is a single " at the beginning of the line.

 "  if (localizedNumber === (localizedNumber | 0)) {

While that seems to explain the error you are seeing, I have no idea where this might come from.
I now doubt this is profile related, did you try to re-download Firefox from scratch? Did it solve your issue?

(downgrading the priority for now as this seems to be an isolated issue, but still investigating!)

Severity: blocker → normal
Priority: P1 → P2

I now doubt this is profile related, did you try to re-download Firefox from scratch? Did it solve your issue?

Olivier: hi :) just adding a need info to make sure you see my question above. Thanks!

Flags: needinfo?(olisker)

(In reply to Julian Descottes [:jdescottes] from comment #17)

I now doubt this is profile related, did you try to re-download Firefox from scratch? Did it solve your issue?

I haven't yet redownloaded from scratch. I was waiting for your Ok, in case you needed more insight. I'll do it when I'm back to the office.

Flags: needinfo?(olisker)
Summary: Tools>Web Developer menus are missing for German → DevTools broken because of extra character in l10n.js

Hi everyone,

I remove firefox 70.0.1 from my MacOS, deleting also ~/Library/Application Support/Firefox (ie profiles). Redownloaded Firefox german version from the site.

Shift+cmd+J opens the browser console window!
Extras / Webdeveloper Menu is back again!
Contextual menu opens the inspector at the bottom of the browser!
So everything seems fine now!

Thank all of you. If I can be of any further help with this bug, let me know.

Thanks for the update Olivier, glad it's fixed for you!

At that point, I guess this was either a bad build or an update that went wrong?
Julien: do you know if any anything could explain the symptoms here: a DevTools JS file contained with a random " character. This change was never seen in the source control of course. This was a German build of Firefox 70. Any prior issue similar to this?

Flags: needinfo?(jcristau)

Aryx suggested this could be a single bit flip (space to quotation mark). Maybe from bad ram or bad disk on the client machine?

Flags: needinfo?(jcristau)

I think there's at least one other bug that suggested that something during updates corrupted the install. But I don't remember the bug number. As flod reads all my bugmail, maybe he remembers? I think it was on ESR, and something that rather obviously corrupted files in omni.ja, fixed by a re-install.

(In reply to Julien Cristau [:jcristau] from comment #23)

Aryx suggested this could be a single bit flip (space to quotation mark). Maybe from bad ram or bad disk on the client machine?

Thanks for checking Julien! That sounds like a plausible explanation, but I would never have thought about that.
I'm not sure what is reasonable to do at DevTools level to prevent against this. Maybe make DevTools loader errors more visible? In development, loader errors happen frequently as we modify files. But on a release build, this should never happen so maybe we should report them in a more visible way?

We seem to have a potentially similar corruption in bug 1550951 (see bug 1550951 comment 8).

Blocks: 1616059
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: