Issue metadata
Sign in to add a comment
|
Android WebView with Chrome 71 can not get cookies in cross domain redirect.
Reported by
eiji.war...@iridge.jp,
Dec 13
|
||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: See attached file. To reprodiuce the problem, you needs our service account and Android App. What is the expected behavior? What went wrong? Android Apps that runs on device that installed Chrome 71 can't get cookies from WebView in cross domain redirect. Our web login form URL redirects below. 1. Web Form URL#1 at domain A submits auth URL at domain B. 2. Auth URL #1 at domain B sets cookies(in normally) and redirects another URL(Auth URL #2) at domain A. But, Chrome 71 don't set cookies. "onPageStarted" event is not activated. 3. Auth URL #2 at domain A sets cookies. Chrome 71 or older Chrome either one is OK. Then redirect service URL#1 at domain A. 4. Then, we expect got both of cookies domain A and B. But, in case of Android devices that use Chrome 71 as WebView implementation fails get domain B cookies. Chrome 70 or order Android System WebView can get both of domain cookies at same situation. Did this work before? Yes Chrome 70.0.3538.110 Does this work in other browsers? N/A Chrome version: 71.0.3578.83 Channel: stable OS Version: Android 7.0 or later Flash Version: Current Chrome Beta version 72.0.3626.14 also have same problem.
,
Dec 13
,
Dec 14
onPageStarted is triggered slightly later in the navigation process in recent versions - it's now only triggered when a navigation commits instead of when it starts. I'm not sure exactly what is expected to happen with redirects; Bo, do redirects commit at all? You should probably not be using onPageStarted to know when you can retrieve cookies; it's primarily intended for updating UI, not anything else. If you know the form of the login is always as you describe here then you could just retrieve the cookies for both domains once the entire flow has completed.
,
Dec 21
Hello guys, I've faced with exact same issue. Is there any updates how to fix it or maybe any workarounds? Because in my onPageStarted method I only update UI, that's all.
,
Dec 22
We are facing a similar issue and had to override the action on the URL, read all the cookies in the Cookie Store and pass them one the loadURL method with cookie headers.
,
Dec 28
,
Dec 28
,
Dec 28
In our case, it looks like onPageStarted is not triggered in log at the redirect. But, the navigation by redirect is complete.
,
Jan 18
(5 days ago)
No, redirects I don't don't commit. In webview 71, onPageStarted will only be called at the end of a redirect chain. If you want to catch redirects, you can use shouldOverrideUrlLoading, which I believe will be called for every url in a redirect chain. This is an intended change. I don't clearly understand what your app is doing in that pdf. If you are expecting to read cookies inside onPageStarted, then that was racy and was never guaranteed to work in older webview either. I'm not sure what you are expecting to do with these cookies during a navigation, but anything that affects that navigation itself is going to be racy as well. All the cookies set by the redirects should be there at the end of the navigation though; if that's not the case, that sounds like a separate bug we can look into. If you are only updating UI in onPageStarted, then there is nothing for you to do. Users should not be seeing the intermediate urls of a redirect anyway.
,
Jan 19
(4 days ago)
Per #c9 and offline discussion, I think we want to keep the current onPageStarted() behavior, if there is a bug related to redirects cookies, that should be a separate bug. Add Needs-Feedback for the input of redirects cookies. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by jbanavatu@chromium.org
, Dec 13