Closed Bug 1116162 Opened 6 years ago Closed 6 years ago

"Exception: Utils.scriptLoader: Cannot load script from gaia/shared/js/l10n.js: TypeError: console.error is undefined" when runtime DEBUG is true

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: zbraniecki)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
stas
: review+
ochameau
: review+
Details | Review
When the DEBUG flag in shared/js/l10n.js is true flashing fails with:

Exception: Utils.scriptLoader: Cannot load script from /srv/moz/gaia/shared/js/l10n.js: TypeError: console.error is undefined
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
I'll fix this once bug 1113023 lands
Depends on: 1113023
Attached file pull request
Attachment #8543033 - Flags: review?(stas)
Comment on attachment 8543033 [details] [review]
pull request

Do you know why https://github.com/mozilla-b2g/gaia/blob/698e6e8a098cc060b26cd6f25171633c4c7e739d/build/webapp-optimize.js#L597-L602 isn't enough for this to work?
Attachment #8543033 - Flags: review?(stas) → review+
(In reply to Staś Małolepszy :stas from comment #3)
> Comment on attachment 8543033 [details] [review]
> pull request
> 
> Do you know why
> https://github.com/mozilla-b2g/gaia/blob/
> 698e6e8a098cc060b26cd6f25171633c4c7e739d/build/webapp-optimize.js#L597-L602
> isn't enough for this to work?

Yes.

Because we load l10n.js here: https://github.com/mozilla-b2g/gaia/blob/698e6e8a098cc060b26cd6f25171633c4c7e739d/build/webapp-optimize.js#L764-L765 - which is way before we create the full mockWin (and the one we create uses XHR mocks that require paths to app/htmlFile).
But it shouldn't run at that point just yet;  only when we call mozL10n.bootstrap explicitly?
Comment on attachment 8543033 [details] [review]
pull request

Alexandre, I accidentally landed this small patch without getting review from a build peer. Apologies!

Can you review it? If you want me to back out the patch, lmk and I will.

Once again, apologies for the omission.
Attachment #8543033 - Flags: review?(poirot.alex)
(In reply to Staś Małolepszy :stas from comment #6)
> But it shouldn't run at that point just yet;  only when we call
> mozL10n.bootstrap explicitly?

True, but it binds at that point. :)
D'oh, of course it does.  Thanks.
Attachment #8543033 - Flags: review?(poirot.alex) → review+
You need to log in before you can comment on or make changes to this bug.