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

Issue 770518 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

window.opener = null issue in an embedded iframe

Reported by sanjinl...@gmail.com, Oct 1 2017

Issue description

Device name: Wileyfox Swift

From "Settings > About Chrome"
Application version: 61.0.3163.98
Operating system: Android

URLs (if applicable): N/A

Steps to reproduce:
Webview application (implemented in PhoneGap/Cordova inappbrowser) using embedded PayPal digital goods adaptive payments flow implemented in javascript (DG.js). See https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-embeddedPayment-curl-etc/ for more information regarding flow implementation. 

The payment flow is implemented in an iframe and executes window.open commands to open additional windows for user to log into paypal. From DG.js (https://www.paypalobjects.com/js/external/dg.js):

  // mobile exerience
  if (ua.match(/iPhone|iPod|iPad|Android|Blackberry.*WebKit/i)) {
                win = window.open('', this.name);
                this.dgWindow = win;
                return win;

If window.opener is executed after these lines of code then the result is null. This test is executed later in another PayPal script and fails, disrupting the payment flow and preventing users from logging into their PayPal account.

Expected result:
window.opener = a reference to a parent window

Actual result:
window.opener = null

This payment flow has worked in previous major stable Android version: 60.0.3112.170.
 
Cc: msrchandra@chromium.org nyerramilli@chromium.org ligim...@chromium.org sandeepkumars@chromium.org
Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback
@sanjinl777: Thanks for the report!!

Could you please provide us the sample test application (.apk file) to check the issue from our end.

Thanks!!
Apk attached...steps to reproduce using Chrome version 61.0.3163.98...

1. Tap on one of the Public Sites (doesn't matter which one)
2. Tap Cancel on the pop-up
3. Tap on one of the Projects (doesn't matter which one)
4. Tap on one of the giving amounts shown on the bottom (doesn't matter which one)
5. On the checkout page tap the checkbox and then tap the PayPal icon
6. The PayPal screen will show. Tap on the "Log In" button.
7. Instead of showing the login screen the app shows the same screen again

Now, if Chrome 60.0.3112.170 is installed and steps repeated then the step 7 will show the login screen allowing the payment flow to be completed.

Thanks!
LiftedLoads-debug.apk
1.3 MB Download
Project Member

Comment 3 by sheriffbot@chromium.org, Oct 3 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: satyavat...@chromium.org candr...@chromium.org battun@chromium.org
Components: Mobile>WebView
Labels: -Pri-3 M-63 Pri-1 Type-Bug-Regression
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue in Android. Observed the app is not showing the login screen.

Steps Followed:
1. Enabled WebView #61.0.3163.98
2. Installed the Life loads application
3. Navigated till checkout
4. Clicked on paypal
5. Observed the app is not showing the login screen.

WebView versions tested:
61.0.3163.98

OS
Android 7.1.2, 6.0.1, 8.0.0

Android Devices
7.1.2 Pixel XL Build/N2G48E, 6.0.1: SM-J710F Build/MMB29K, 8.0.0 Pixel Build/OPR1 170623.027.

Below is the manual bisect info
60.0.3112.0- Good build
61.0.3113.0- bad build

Manual CL:
https://chromium.googlesource.com/chromium/src/+log/60.0.3112.0..61.0.3113.0?pretty=fuller&n=10000

Unable to find the suspect from above CL. Hence CC'ing WebView folks for tool bisect info.

Issue is seen in M63 as well.

Please navigate to below link for the log's and videos
go/chrome-androidlogs/770518

Thanks!!
Labels: Needs-Bisect
Requesting per-cl bisect from QA
Labels: -Needs-Bisect
Owner: jochen@chromium.org
I don't think bisect is needed; this CL is probably to blame: https://chromium-review.googlesource.com/517085

Status: Assigned (was: Untriaged)
Labels: WV-Triaged
Modifying Label

Labels: -Triaged-Mobile
can you clarify whether the app enables the popup blocker, and whether it supports multiple windows or not?
Yes, the app allows multiple windows and there are no popup blockers enabled. 

Again, if the app is run on 60.0.3112.170 then it works fine. The issue appears only when 61.0.3163.98 is installed.
for the record, the app does not support multiple windows.

CL is up for review.
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d03b3d0f6d78eca4ed174e9c496948b4e3068867

commit d03b3d0f6d78eca4ed174e9c496948b4e3068867
Author: Jochen Eisinger <jochen@chromium.org>
Date: Tue Oct 24 15:42:00 2017

Set the opener correctly when not supporting multiple windows

BUG= 770518 
R=torne@chromium.org

Change-Id: I01b728704f525e06938865729dd4395f982908da
Reviewed-on: https://chromium-review.googlesource.com/735140
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511160}
[modify] https://crrev.com/d03b3d0f6d78eca4ed174e9c496948b4e3068867/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
[modify] https://crrev.com/d03b3d0f6d78eca4ed174e9c496948b4e3068867/third_party/WebKit/Source/core/page/CreateWindow.cpp

Status: Fixed (was: Assigned)
Labels: Merge-Request-63
Is this critical enough to get it into M63?
Project Member

Comment 17 by sheriffbot@chromium.org, Oct 26 2017

Labels: -Merge-Request-63 Hotlist-Merge-Approved Merge-Approved-63
Your change meets the bar and is auto-approved for M63. Please go ahead and merge the CL to branch 3239 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 18 by sheriffbot@chromium.org, Oct 30 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Please merge the fix to M63 as I am able to repro the issue on Pixel 2/OPM1.171019.007 having Monochrome 63.0.3239.31 however unable to repro on 64.0.3255.2 on the same config.
Project Member

Comment 20 by bugdroid1@chromium.org, Nov 2 2017

Labels: -merge-approved-63 merge-merged-3239
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6acacdb35c27e0317a67a7c3792b5a2f9c7a4d50

commit 6acacdb35c27e0317a67a7c3792b5a2f9c7a4d50
Author: Jochen Eisinger <jochen@chromium.org>
Date: Thu Nov 02 11:26:31 2017

Set the opener correctly when not supporting multiple windows

BUG= 770518 
R=torne@chromium.org
TBR=jochen@chromium.org

(cherry picked from commit d03b3d0f6d78eca4ed174e9c496948b4e3068867)

Change-Id: I01b728704f525e06938865729dd4395f982908da
Reviewed-on: https://chromium-review.googlesource.com/735140
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#511160}
Reviewed-on: https://chromium-review.googlesource.com/750087
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/branch-heads/3239@{#344}
Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578}
[modify] https://crrev.com/6acacdb35c27e0317a67a7c3792b5a2f9c7a4d50/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
[modify] https://crrev.com/6acacdb35c27e0317a67a7c3792b5a2f9c7a4d50/third_party/WebKit/Source/core/page/CreateWindow.cpp

Status: Verified (was: Fixed)
Verified on Nexus 6/N2G47S having 63.0.3239.41, issue no longer reproducible

Sign in to add a comment