New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602395 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Chrome.identity.getAuthToken() throws exception only in a specific locale

Reported by howo...@gmail.com, Apr 11 2016

Issue description

Chrome Version       : 49.0.2623.110 (64-bit)
URLs (if applicable) : https://github.com/GoogleChrome/chrome-app-samples/issues/436

What steps will reproduce the problem?
1. Run the sample app and confirm that sign in works well.
2. Go to your language settings and change your language to Korean
3. Quit Chrome browser completely and open it again -- the browser should be in Korean now.
4. Run the sample app and encounter chrome.runtime.identity.getAuthToken: Authorization page could not be loaded error.

What is the expected result?
I should get the token in the callback without any exception in any locale

What happens instead?
You get an exception and token is undefined in the callback. This only happens in a specific locale.

Please provide any additional information below. Attach a screenshot if
possible.

Problem:
chrome.identity.getAuthToken() function throws {"message":"Authorization page could not be loaded."} error and returns undefined for token when a Chrome app runs in Korean locale.

I was having this problem with my Chrome app (quite puzzling because sign in doesn't work only in a certain locale) and I thought I did something wrong. I came here to look for the answer, and found out that the sample app is having the same problem. I tried the following things:

- Add the following domains to permissions in manifest.js
    "https://*.chromiumapp.org/*", "https://chromiumapp.org/",
    "https://*.apps.googleusercontent.com/", "https://apps.googleusercontent.com/",
    "https://apps.googleusercontent.com/", "https://*.chromiumapp.org/*/*",
    "*://*.google.com/*", "https://accounts.google.com/o/oauth2/v2/auth"
- Add key field in manifest.js so that App ID is the same for both production and development.
- Check that OAuth2 Client key has the right App ID.
- Use chrome.identity.launchWebAuthFlow in place of chrome.identity.getAuthToken
- Change the 'interactive': true option to false
- Call chrome.identity.getAuthToken({ 'interactive': true } twice
- Call chrome.identity.getAuthToken in the callback of chrome.identity.onSignInChanged

None of the above worked.
I am happy to invite you to see my code on GitHub if that helps.


 
0fae83c4-fdec-11e5-990c-429eb2d426e6.png
73.8 KB View Download
Cc: animohan@chromium.org
Components: Platform>Apps
Status: Available (was: Unconfirmed)

Comment 2 by howo...@gmail.com, Apr 13 2016

Thanks so much for working on this. I'd love to help in any way I can. This bug is affecting a production app, preventing Korean users from signing in.

Comment 3 by mxmk...@gmail.com, Apr 13 2016

I found the same error when working on my extension. It seems that it's bug connected with browser language. If I'm using the English language then all works fine, but when I switched the browser to the Russian language, then this error occurred. 
My environment: 
Chrome version: 49.0.2623.112 m
OS: Windows 10 Pro

Comment 4 by howo...@gmail.com, Apr 16 2016

What's the status of this issue?
Cc: courage@chromium.org

Comment 6 by howo...@gmail.com, May 10 2016

Hey, is there any action on this issue?

Comment 7 by howo...@gmail.com, Jun 3 2016

bump
Cc: -animohan@chromium.org
Owner: animohan@chromium.org
Please Ani, can you have a look at this and triage accordingly?
Owner: benwells@chromium.org
Adding Ben who might be able to better route this
Cc: roc...@chromium.org rdevlin....@chromium.org benwells@chromium.org asargent@chromium.org abodenha@chromium.org
Owner: ----
courage@ was the owner of this API, however he doesn't work on it any more :(

Adding some other people who may be able to help.

Albert - I assume this also affects ChromeOS, maybe know of engineers who could help out?

Comment 11 by howo...@gmail.com, Jul 2 2016

Will anyone take a look at this? :)
Cc: r...@chromium.org

Comment 13 by st...@chromium.org, Aug 24 2016

Cc: st...@chromium.org

Comment 14 by st...@chromium.org, Aug 24 2016

Cc: -r...@chromium.org
Cc: r...@chromium.org
Cc: -st...@chromium.org
Any progress on this? I've been struggling with this issue second day and get crazy

Comment 18 by r...@chromium.org, May 23 2017

Owner: rdevlin....@chromium.org
Status: Assigned (was: Available)
Owner: msarda@chromium.org
I think msarda@ and crew own the identity API nowadays.
I've tried the Identity Sample app on ToT for coreean (by changing the language to coreen in  chrome://chrome/settings/languages ) and everything is working fine for me.

Do you have a similar issue for English, or is it only for other languages? If you're seeing it for English as well, then you may be hitting the  Issue 722323  (I already have a patch for that here https://codereview.chromium.org/2901283002/ ).
Cc: -asargent@chromium.org
I am seeing this scenario for a few users of my extension. For some calleing getAuthToken twice does the trick, for others, it always returns "Authorization page could not be loaded?"

Any advice?
I think this is a duplicate of  Issue 722323  . Could you test it again on Chrome Canary as that patch should have landed now?
Cc: -roc...@chromium.org rockot@google.com
Status: WontFix (was: Assigned)
Closing this bug as I cannot repro it anymore. Please re-open if it still reproduces.

Sign in to add a comment