New issue
Advanced search Search tips

Issue 629403 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

webview not detecting info set through iframe, hence cookies and other redirect info are lost

Reported by maas36...@gmail.com, Jul 19 2016

Issue description

THIS TEMPLATE IS FOR FILING BUGS ON THE ANDROID SYSTEM WEBVIEW. GENERAL WEB BUGS SHOULD BE FILED USING A DIFFERENT TEMPLATE!

Device name: Samsung Galaxy s6 (Reproducible on all Android devices though)
Android version: 5.0
WebView version (from system settings -> Apps -> Android System WebView): 51.0.2704.81
Application:
Application version:

URLs (if applicable):
http://www.wearecalifornia.org/calicalls

Steps to reproduce:
(1) Load this url in webview: http://www.wearecalifornia.org/calicalls
(2) Click on the dropdown that says Translate and pick any language

Expected result:

The page should load in the selected language, like it does on Chrome browser.


Actual result:

An error is shown saying "There was an error submitting the form. You may not have cookies enabled, please enable cookies and try again....."

I did a remote debugging of webview and compared the requests with Chrome. It appears that the request header does not have the Cookie and hence it ends up as an HTTP 200 instead of the intended HTTP 302 response. 

I know the iframes don't get captured in the shouldoverrideurlloading() method. It does get capture in shouldInterceptRequest(). I am not sure if the translate field not working on this website is a webview bug or if I need to do something to enable capturing that info in my app. I have tried various websettings like "mSettings.setAllowUniversalAccessFromFileURLs(true);
            mSettings.setAllowContentAccess(true);
            mSettings.setAllowFileAccess(true);
            mSettings.setAllowFileAccessFromFileURLs(true);" and more but to no avail.
 

Comment 1 by sgu...@chromium.org, Jul 21 2016

Status: Fixed (was: Unconfirmed)
It seems a third party cookie is set. You need to enable setting third party cookies using: https://developer.android.com/reference/android/webkit/CookieManager.html#setAcceptThirdPartyCookies(android.webkit.WebView, boolean)

Sign in to add a comment