Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: GM_util.getPreferredLocale is not a function (Firefox 54 + intl.locale.matchOS=true) #2488

Closed
jbeich opened this issue Mar 12, 2017 · 4 comments
Milestone

Comments

@jbeich
Copy link

jbeich commented Mar 12, 2017

GM fails to install scripts on Nightly but when upgrading with some already installed the following errors shows up on console. matchOS check probably needs to be adjusted per bug 1337551 + bug 1344901. CC @zbraniecki just in case.

1489301732457   addons.manager  ERROR   Exception calling provider <unnamed-provider>.getAddonsByTypes: TypeError: GM_util.getPreferredLocale is not a function (chrome://greasemonkey-modules/content/script.js:148:9) JS Stack trace: getBestLocalization@script.js:148:9 < Script_getLocalizedDescription@script.js:156:20 < ScriptAddon@addons4.js:98:3 < ScriptAddonFactoryByScript@addons4.js:74:28 < AddonProvider_getAddonsByTypes/<@addons4.js:50:27 < AddonProvider_getAddonsByTypes@addons4.js:49:7 < callProviderAsync@AddonManager.jsm:294:12 < promiseCallProvider/<@AddonManager.jsm:318:53 < Promise@Promise-backend.js:390:5 < promiseCallProvider@AddonManager.jsm:317:10 < getAddonsByTypes/<@AddonManager.jsm:2510:36
@janekptacijarabaci
Copy link
Contributor

Thank you.

@zbraniecki
Copy link

I'm not sure why you want to get system locale as preferred one rather than app locale.

And if you, by any chance, do want an app locale, please, wait for bug 1346819 to land (hopefully today) and then use Services.locale.getAppLocaleAsLangTag.

Thank you and sorry for the trouble!

@arantius
Copy link
Collaborator

I've just pushed version 3.11beta1: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/beta?page=1#version-3.11beta1

It would be very useful if you could install it and confirm that it fixes this issue.

@jbeich
Copy link
Author

jbeich commented Apr 25, 2017

I confirm, FF55 + intl.locale.matchOS=true works fine on GM 3.11beta1 unlike GM 3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants