gettext_lazy intermittently failing

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: chuck, Assigned: chuck)

Tracking

Avenir
Points:
---

Details

(Assignee)

Description

3 years ago
Davor and I have both run into instances where this exception has blocked page loading:

	TypeError: can't convert ({toString:(function () {
	                return get(str, args, context);
	            })}) to primitive type

Davor's happened in header.html. Mine in platform_selector.html, on this line:

https://github.com/mozilla/fireplace/blob/4cadb7b51e600e427d59a884f889ca418c29bed0/src/templates/_includes/platform_selector.html#L10

Davor fixed his issue by deleting his repo entirely and rebuilding. I got mine functional by changing this line to not use gettext_lazy:

https://github.com/mozilla/fireplace/blob/master/src/media/js/compat_filter.js#L28

Comment 1

3 years ago
I updated marketplace-core module version to 2.12.0 in bower.json after
https://github.com/mozilla/marketplace-core-modules/pull/49
and then `make install`

Is this relevant?
(Assignee)

Comment 2

3 years ago
Good suggestion, Trishul! Unfortunately not, this is still happening on 2.13.0.
(Assignee)

Comment 3

3 years ago
I have a pull request up to revert all the gettext_lazy changes, in case it becomes an issue on stage or prod: 

https://github.com/mozilla/fireplace/pull/1441

It can be applied locally if this is blocking your development:

https://patch-diff.githubusercontent.com/raw/mozilla/fireplace/pull/1441.patch
(Assignee)

Comment 4

3 years ago
This is fixed by running `./node_modules/commonplace/bin/commonplace langpacks` in your local environment. Thanks to mstriemer on the assist!
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.