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

Issue 771984 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Add to Homescreen changes method POST to GET

Reported by kim.dehm...@gmail.com, Oct 5 2017

Issue description

Steps to reproduce the problem:
Difficult to say exact steps as it requires a test page with autosubmit forms with method POST and a login service, but they explain the general issue.

1. Open Chrome on a test page that links to an autosubmit login/logout
2. Via Chrome burger menu: 'Add to Homescreen'
3. Open the page via the A2HS shortcut
4. Navigate to the Login / Logout autosubmit form page
4a. Form page autosubmits to login server
4b. See method POST becoming a GET instead

What is the expected behavior?
Add to Homescreen shortcut should not change POST requests to GET

The Chrome browser app (not WebView) will keep method POST as POST, expected the same from A2HS.

What went wrong?
Hello! 

Our login/logout process redirects to an autosubmit form with method POST and instead of continuing with method POST it changes to a GET. 

Since around Wednesday 27th Sep we have received reports about our login/logout no longer to be working on Android 'Add to Homescreen' shortcuts. 

The exact same code for the login / logout works when opened via the normal Chrome browser app.
We have tested with multiple devices in version 61.0.3163.98, all of them fail when using the Add to Homescreen shortcut.

One device using Chrome version 58.0.3029.83 on Android 6.1 works with both Chrome Browser and the Add to Homescreen shortcut.

Another device using Chrome version 60.0.3112.116 on Android 7.1.1 works with both Chrome Browser and the Add to Homescreen shortcut.

I have attached 4 har files containing the observed network requests.
v58 Where both Chrome (browser app) and A2HS are GOOD
v61 Where Chrome (browser app) is GOOD but A2HS is BAD

Did this work before? Yes 60.0.3112.116 on Android 7.1.1

Does this work in other browsers? Yes

Chrome version: 61.0.3163.79  Channel: stable
OS Version: 7.1.1
Flash Version: 

Seen similar task in last week regarding a PUT change to GET:
https://bugs.chromium.org/p/chromium/issues/detail?id=762954&q=post%20method%20get&sort=-modified&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified

Hope you're able to identify the problem! :)
Best Regards
Kim
 
v61GoodChromeLogout.har
83.7 KB Download
v61BadA2HSLogout.har
29.8 KB Download
v58GoodChromeLogout.har
81.6 KB Download
v58GoodA2HSLogout.har
87.2 KB Download
Labels: Needs-triage-Mobile
Components: UI>Browser>WebAppInstalls Mobile>WebAPKs
Labels: Needs-Feedback
Could you provide a test page?
Hi,
Would a simulation account to our system work for you? And if so could I email it privately to you?

Project Member

Comment 4 by sheriffbot@chromium.org, Oct 11 2017

Cc: yhirano@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "yhirano@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
Labels: Needs-Feedback
Thanks, I would like to ask one thing before accessing your system - could you test with BrowserSideNavigation disabled via chrome://flags/#browser-side-navigation? That might affect v61 results.


Hi, I've tried with the flag disabled but it still occurs. 
I will prepare a simulation account with a description and screenshots for you

Project Member

Comment 7 by sheriffbot@chromium.org, Oct 12 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "yhirano@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
I see, thanks. Then I will investigate. My mail address is yhirano@chromium.org.
Owner: dominickn@chromium.org
Status: Untriaged (was: Unconfirmed)
I confirmed the issue with 61.0.3163.98 on Android.

dominickn@, can you take a look?
We're going to need some more details here. Otherwise, yhirano@ will need to provide them.

 - when you add to homescreen, is the shortcut opening in Chrome itself or as a standalone progressive web app?
 - how exactly have you implemented the auto submitting form? I.e. where is POST being specified?

Cc: dominickn@chromium.org
Owner: piotrs@chromium.org
Status: Assigned (was: Untriaged)
Over to piotrs@ for investigation.
Status: Started (was: Assigned)
This should already be fixed in newest Canary for this particular webapp, however there is a broader problem that right now still affects WebAPKs. Patches are being reviewed right now and I will be trying to merge the fix to m63.
Components: -Blink>Network
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 17 2017

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

commit a4d8beb85c47926af04d11d2ae514b00d0ddd839
Author: Piotr Swigon <piotrs@chromium.org>
Date: Tue Oct 17 06:44:37 2017

[WebApps] Prevent POST requests from opening in CCT.

POST requests should not get opened in CCT, as:
1) Request might not require redirecting the user.
2) CCT will issue the request as GET and drop the request body.

Test for this change has been extracted to crrev.com/c/722488
for easier merging.

Bug:  771984 
Change-Id: I1f49409ec3de20c9c29352e5e23c571a365e515b
Reviewed-on: https://chromium-review.googlesource.com/722384
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509307}
[modify] https://crrev.com/a4d8beb85c47926af04d11d2ae514b00d0ddd839/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 17 2017

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

commit e3f4b2ac8458db6aae544271db13cdf9c6516f57
Author: Piotr Swigon <piotrs@chromium.org>
Date: Tue Oct 17 09:25:33 2017

[WebApps] Test for preventing POST requests from opening in CCT.

This patch contains a test for the change in crrev.com/c/722384, which
has been extracted out for easier merging.

Bug:  771984 
Change-Id: I22ef843febc297a4f2a85a2d0957e7619981e781
Reviewed-on: https://chromium-review.googlesource.com/722488
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509333}
[modify] https://crrev.com/e3f4b2ac8458db6aae544271db13cdf9c6516f57/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/e3f4b2ac8458db6aae544271db13cdf9c6516f57/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java

Status: Fixed (was: Started)
This is fixed now for both legacy web apps and WebAPKs. I will try to merge the fix for WebAPKs into m63, but this particular website should be working already on Chrome Canary 64.0.3241.0.
Hi,
Great to hear, thanks for the quick work! 
Labels: -Needs-triage-Mobile Merge-Request-63
I would like to request a merge of crrev.com/c/722384, which is a one-line change fixing POST requests to off webapp scope URLs when running as a WebAPK.

Tests has been landed in a separate patch, so that the fix can be merge more easily (tests in crrev.com/c/722488).

Change is already in Canary and works fine.
Project Member

Comment 19 by sheriffbot@chromium.org, Oct 19 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 20 by bugdroid1@chromium.org, Oct 19 2017

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

commit 561743ce9507c8c0a35472213c89148d44961d04
Author: Piotr Swigon <piotrs@chromium.org>
Date: Thu Oct 19 23:23:53 2017

[WebApps] Prevent POST requests from opening in CCT.

POST requests should not get opened in CCT, as:
1) Request might not require redirecting the user.
2) CCT will issue the request as GET and drop the request body.

Test for this change has been extracted to crrev.com/c/722488
for easier merging.

Bug:  771984 
Change-Id: I1f49409ec3de20c9c29352e5e23c571a365e515b
Reviewed-on: https://chromium-review.googlesource.com/722384
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#509307}(cherry picked from commit a4d8beb85c47926af04d11d2ae514b00d0ddd839)
Reviewed-on: https://chromium-review.googlesource.com/729659
Reviewed-by: Piotr Swigon <piotrs@chromium.org>
Cr-Commit-Position: refs/branch-heads/3239@{#91}
Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578}
[modify] https://crrev.com/561743ce9507c8c0a35472213c89148d44961d04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java

Labels: ReleaseBlock-Stable
After discussions with sbirch@ marking this is an RBS for m62 iff there will be a respin for another issue. In such case crrev.com/c/722384 should be merged. It will not merge without conflict, but the one line which this patch adds can still be added.
Cc: sbirch@chromium.org
We are planning a respin tomorrow. Please request this to be merged into M62 branch and confirm here that this merge is very safe for M62 and cannot make the issue any worse than what it is now.
Cc: owe...@chromium.org
Labels: -Hotlist-Merge-Approved Merge-Request-62
Status: Assigned (was: Fixed)
Requesting an emergency merge of crrev.com/c/722384 into m62 (ahead of the security related respin tomorrow). As discussed between cmasso@ and owencm@.
Labels: -Merge-Request-62 Merge-Approved-62
Project Member

Comment 26 by bugdroid1@chromium.org, Nov 1 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdc81887306ca70ae3876a905aa13f3aad2b7705

commit bdc81887306ca70ae3876a905aa13f3aad2b7705
Author: Piotr Swigon <piotrs@chromium.org>
Date: Wed Nov 01 23:36:08 2017

[WebApps] Prevent POST requests from opening in CCT.

POST requests should not get opened in CCT, as:
1) Request might not require redirecting the user.
2) CCT will issue the request as GET and drop the request body.

Test for this change has been extracted to crrev.com/c/722488
for easier merging.

(cherry picked from commit a4d8beb85c47926af04d11d2ae514b00d0ddd839)

Bug:  771984 
Change-Id: I1f49409ec3de20c9c29352e5e23c571a365e515b
Reviewed-on: https://chromium-review.googlesource.com/722384
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#509307}
Reviewed-on: https://chromium-review.googlesource.com/749564
Reviewed-by: Piotr Swigon <piotrs@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#769}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/bdc81887306ca70ae3876a905aa13f3aad2b7705/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java

Status: Fixed (was: Assigned)
Cc: aska...@chromium.org
FYI for anyone following along with this issue: the fix was included in a release that was made available to 100% of devices today, so the issue should largely be disappearing (although some devices may take a while to update of course).

Sign in to add a comment