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

Issue 837652 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 826651
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

gapi.auth2.init stop DeviceMode form working when refresh

Reported by farhio...@gmail.com, Apr 27 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
1. open https://oauth.googleusercontent.com/robots.txt
2. open devtools 
3. switch Device Mode On ( command + shift + M) 
4. choose a desktop resolution (1200x800) - if not exist in dropdown - create one
5. paste this code (from the github issue https://github.com/google/google-api-javascript-client/issues/392#issuecomment-366363420) 

CODE
==========
const client_id =
  '359269480423-chvhi5jr4a5379f4id4cta0sd1gueqg2.apps.googleusercontent.com';

await new Promise(api_ready => document.head.append(Object.assign(
  document.createElement('script'),
  {
    src: 'https://apis.google.com/js/api.js',
    onload: api_ready,
  })));

await new Promise(auth2_ready => gapi.load('auth2', auth2_ready));

const googleAuth = await new Promise(init_done => gapi.auth2.init({
  client_id: client_id,
  scope: 'openid',
}).then(googleAuthWithThen => init_done(Object.assign(googleAuthWithThen, {
  then: undefined,
}))));

console.log('googleAuth =', googleAuth);
=========
END Of CODE

6. press enter key to execute the code

What is the expected behavior?
the emulated device mode still shows the same resolution. 
my inspection shows that gapi.auth2.init use "document.head.insertBefore" to inject scripts - which in turn, causes the issue.

What went wrong?
the emulate device mode is disregarded and chrome treats the emulated screen area as a small screen without the emulated resolution .
google-content-example demonstrates the above issue.
echoes-player-example demonstrates the same issue with my open source project - http://echoesplayer.com (no need to execute any code) - open devtools, pick a resolution and refresh the app to see the bug. 

Did this work before? Yes 63

Chrome version: 66.0.3359.117  Channel: stable
OS Version: OS X 10.13.4
Flash Version: 

toggling the device mode on/off resets to the expected behavior.
 
google-content-example.webm
5.9 MB View Download
echoes-player-example.webm
8.9 MB View Download
Labels: Needs-Bisect Needs-Triage-M66
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Feedback
Thanks for filing the issue!

Tried checking the issue on reported chrome version 66.0.3359.117 and on M60(60.0.3112.0) using Mac 10.13.1 with the below mentioned steps.
1. Launched chrome
2. Navigated to https://oauth.googleusercontent.com/robots.txt
3. Inspected the page.
4. Switched Dev mode on by hitting command + shift + M.
5. Made sure the resolution is 1200*800
6. Copied/pasted the code given in command#0 in console.
We observed similar behaviour i.e., the resolution didn't change in reported chrome version and on above mentioned M60 build. Attaching the screen cast from M60 for reference. 

@Reporter: Could you please have a look at the screen cast and give us a confirmation if the issue is there in M60 too. Please let us know if we have missed anything in the process. Any further inputs from your end may be helpful.
837652.mp4
1.2 MB View Download

Comment 3 by farhio...@gmail.com, Apr 30 2018

hi.
The  screencast you attached doesn't show the problem.
the bug is reproduced with version 66.0.3359.117 or greater.
i was able to reproduce it with all extensions disabled as well as with other chrome profiles.
if you record another screencase, please use these steps as it will be much clearer:
1. open http://echoesplayer.com
2. open devtools 
3. switch Device Mode On ( command + shift + M) 
4. choose a desktop resolution (1200x800) - if not exist in dropdown - create one
5. refresh the page

expected behavior:
the app should render with 1200x800 resolution

actual behavior:
the app renders as if it is loading in small screen device
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 30 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
Unable to reproduce the issue on chrome version 66.0.3359.139(...as per line-3, comment#3) and on the latest canary 68.0.3415.0 using Mac 10.13.1 with the below mentioned steps.
1. Launched chrome
2. navigated to http://echoesplayer.com
3. Inspected the page.
4. switched to Device Mode
5. the screen resolution was (1200x800).
6. Refreshed the page.
Even after refreshing the page we observed the screen resolution was (1200x800). We didn't observe any small screen device loading. Attaching the screen casts of both M66 and M68 for reference.

@Reporter: Could you please have a look at the screen cast and let us know if anything missed from our end. A screen cast explaining the issue would help us understanding it in a better way.

Thanks!
837652-M66 (1).mp4
4.7 MB View Download
837652 M68.webm
9.0 MB View Download
hi.
the bug is clearly shown in 837652-M66 (1).mp4 
notice how the resolution is applied correctly in time 0:29 
BUT
after refreshing the page the resolution is applied correctly at 0:36 

In the canary version this bug seems to be fixed.
Screen Shot 2018-05-02 at 12.15.25 PM.png
1.6 MB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, May 2 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: sindhu.chelamcherla@chromium.org
Labels: Needs-Feedback
As per comment#6 checked video given in comment#5 and didn't find any difference 0:29 and 0:36. 

@Reporter: Please provide us a screencast from your end and please mark where the issue is seen. In above screenshot both the resolution are 1200x800 on both cases. Please help in triaging this issue further.

Thanks!
hi.
please notice the differences in the images grid - i marked the difference with a red rectangle. 
Screen Shot 2018-05-02 at 12.15.25 PM.png
1.4 MB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, May 3 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
I attached a screencase.
you can clearly see that after i refresh the page, while the devtools is opened and with device mode on, the 1280x800 resolution is not applied.
toggling off and on the device mode fixes the issue (also demoed in this screencast).

May 3 2018 11_27 AM.webm
8.7 MB View Download
Cc: manoranj...@chromium.org
Components: -Platform>DevTools Platform>DevTools>Mobile
Labels: -Pri-2 -Needs-Bisect hasbisect-per-revision RegressedIn-65 M-66 FoundIn-66 Target-66 ReleaseBlock-Stable OS-Linux OS-Windows Pri-1
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
As per comment#9 and #11 checked the issue and able to reproduce this issue on reported version 66.0.3359.117, and latest stable 66.0.3359.139 using Windows 10, Mac 10.12.6 and Ubuntu 17.10. But issue is not reproducible on latest beta 67.0.3396.30 and latest canary 68.0.3419.0. Hence providing reverse bisect info.

Last Bad Build: 67.0.3395.0
First Good Build: 67.0.3396.0

You are probably looking for a change made after 550236 (known good), but no later than 550237 (first known bad).
CHANGELOG URL:
 https://chromium.googlesource.com/chromium/src/+log/269e6c87f284d12c2084f3185c980f0a0c0f8dab..4651e64a69eb454a9253963012cc10c50d0f10ae

Probably fixed by https://chromium-review.googlesource.com/1003324.

@dgozman: Please merge this to M-66 if required. Adding RB-Stable for M-66. Please remove if not the case.

Thanks!

Mergedinto: 826651
Status: Duplicate (was: Assigned)
This is due to google oauth going out of process interoperating badly with Device Mode. Unfortunately, the fix was not merged to 66 due to complexity.

Could you please check this in Chrome Canary, until next version (67) comes out?

Labels: -ReleaseBlock-Stable
i just confirmed this bug has been fixed with v67 (chrome).
thanks.

Sign in to add a comment