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

Issue 739658 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Image attachment is not displayed in Yahoo Mail app

Reported by ngo...@etouch.net, Jul 6 2017

Issue description

Device name: Pixel XL/(N2G47O), Nexus 5X/(N2G47O), Samsung Galaxy J2/(LMY47X), Micromax Q372/5.1 (LRX21M), Sony Xperia XA/6.0(33.2.B.2.93), ASUS_Z010D /6.0.1(MMB29P), Htc Desire 630/6.0.1(1.00.400.3)
WebView version: 61.0.3050.0
Application: Yahoo Mail
Application version: 5.17.2
Package Name:com.yahoo.mobile.client.android.mail

Bisect Information:

Per-Version bisect information:
Good build: 60.0.3093.0
Bad build: 60.0.3094.0
Regression range: https://chromium.googlesource.com/chromium/src/+log/60.0.3093.0..60.0.3094.0?pretty=fuller&n=10000

Per-CL bisect information:
Good commit:
Bad commit:

Suspect CL:
https://chromium.googlesource.com/chromium/src/+/  

Steps to reproduce:
1. Launch Yahoo Mail > Compose > Main body > Click on "+" icon > Click on Picture icon.
2. Select an Image from the device folder > Tap on "Attach" > Observe.

Expected result: Selected image should be attached/displayed.

Actual result: Selected image is not attached/displayed.
 
Labels: -Pri-3 M-60 Pri-1 Type-Bug-Regression
Status: Untriaged (was: Unconfirmed)
Please find the Video & Logcat @ go/chrome-androidlogs1/7/739658
Owner: arthurso...@chromium.org
Status: Assigned (was: Untriaged)
Per-CL bisect information:
Good commit:470080
Bad commit:470081
C  457.305s Main  You are looking for a change made after 470080(GOOD), but before 470081(BAD).


Suspect CL:
https://chromium.googlesource.com/chromium/src/+/8d745a7f38b559d75efe5b04a79f5fecd89a2e22

arthursonzogni@  Might be it looks like this issue is related to your change. please look into once, if its not related to your change please reassign to me. 
Thanks!
Cc: jianli@chromium.org clamy@chromium.org jam@chromium.org carlosk@chromium.org nasko@chromium.org
Components: UI>Browser>Navigation UI>Browser>Offline
Labels: Proj-PlzNavigate
Status: Started (was: Assigned)
At a first glance, I am probably the right owner. Thanks battun@!

This CL is about MHTML. MHTML is used by Chrome but also by Email clients. The fact that the bug appears with Yahoo Mail is probably not a coincidence.
I will start investigations.
Description: Show this description
Cc: torne@chromium.org timvolod...@chromium.org
I was not able to test it. I am waiting the permission to be able to sign the webview apk...

+CC throne@ and timvolodine@ who are working on WebView.

I have some ideas. Since my CL, every requests to an URL with the Content-ID scheme (cid:...) are either:
* handled by an MHTML archive (if any)
* not handled (blocked in blink)

Before my CL, if the document is not an MHTML archive, the load to the Content-ID url goes out of blink and fails somewhere in the net stack or maybe in the content layer.

I think the attached images in Yahoo Mail are represented with the 'cid' scheme.
Maybe the application catches request to <cid:...> URLs and returns the image instead of doing a network request. Is it possible to do something like this with a WebView?
I was able to reproduce the bug.
The problem is that Yahoo Mail are using urls with the cid: scheme. That was not expected outside of an MHTML archive.
I am working on the fix. (Probably a one-line one).
A fix is reviewed here: https://codereview.chromium.org/2975623002/
Labels: -Proj-PlzNavigate ReleaseBlock-Stable
Cc: japhet@chromium.org

Comment 10 by torne@chromium.org, Jul 13 2017

Cc: arthurso...@chromium.org
 Issue 735094  has been merged into this issue.

Comment 11 by boliu@chromium.org, Jul 13 2017

Labels: -Restrict-View-Google
-RVG. nothing secret, and it's being referenced by the fix

Comment 12 by torne@chromium.org, Jul 13 2017

So both the CL author and the reviewer appear to be on vacation at present; can someone else take a look?
Yes I am OOO tomorrow (Friday) (FR National day)
I didn't realized until now the reviewer is OOO today.

The fix is already reviewed, only the test needs a review. I will ask another people to review it.
Feel free to commit the CL when it is okay.
The problem is well understood. I didn't know that something like webview could intercept the requests.

I never had to ask for merging something. Could someone take care of it while I am OOO? torne maybe?

Comment 14 by torne@chromium.org, Jul 14 2017

I can get the change merged to M60, but it needs to land in trunk first. I'm going to TBR it and land it for you today.
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 14 2017

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

commit 2cccbe128c2425ab5d68c74af8760fe6a7af72f4
Author: arthursonzogni <arthursonzogni@chromium.org>
Date: Fri Jul 14 17:36:17 2017

Fix: Loading cid: resources in WebView.

A bug has been introduced in: https://crrev.com/2834013002.
The assumption that Content-ID URLs can't be loaded without an
MHTMLArchive doesn't hold. It is possible for instance with the Yahoo
Mail app. It embeds chrome as a Webview. The webview load attached image
with the Content-ID scheme.

This CL allows the load instead of blocking it.

BUG= 739658 
TBR=japhet@chromium.org

Review-Url: https://codereview.chromium.org/2975623002
Cr-Commit-Position: refs/heads/master@{#486796}

[modify] https://crrev.com/2cccbe128c2425ab5d68c74af8760fe6a7af72f4/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/2cccbe128c2425ab5d68c74af8760fe6a7af72f4/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp

Thanks torne@!
So now, AFAIU, we need to wait a few hours such that the change goes into canary and gets verified. Then I will be able to put the "Merge-Request-60" label to the issue. Once this is approved, I could use drover to incorporate this change.
Let me know if that's not correct.

Comment 17 by torne@chromium.org, Jul 17 2017

Labels: Merge-Request-60
The change was already included in 61.0.3158.0 onward. I think this fix is small and safe enough that we could just request merge now as stable is getting pretty close. It would still be good if we can get it verified though.
Project Member

Comment 18 by sheriffbot@chromium.org, Jul 17 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: We are only 7 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-60 Merge-Approved-60
Approved for M60 branch 3112.  Please test on canary ASAP and then merge once you've verified locally.
Project Member

Comment 20 by bugdroid1@chromium.org, Jul 17 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e4e3dce0263d6e02b5571fe8cfa7fa307b25bda

commit 7e4e3dce0263d6e02b5571fe8cfa7fa307b25bda
Author: Alex Mineer <amineer@chromium.org>
Date: Mon Jul 17 21:25:27 2017

Fix: Loading cid: resources in WebView.

A bug has been introduced in: https://crrev.com/2834013002.
The assumption that Content-ID URLs can't be loaded without an
MHTMLArchive doesn't hold. It is possible for instance with the Yahoo
Mail app. It embeds chrome as a Webview. The webview load attached image
with the Content-ID scheme.

This CL allows the load instead of blocking it.

BUG= 739658 
TBR=japhet@chromium.org

(cherry picked from commit 2cccbe128c2425ab5d68c74af8760fe6a7af72f4)

Review-Url: https://codereview.chromium.org/2975623002
Cr-Original-Commit-Position: refs/heads/master@{#486796}
Change-Id: I28d969b8b3558f9cebf3d26c3a65c05ce59a112b
Reviewed-on: https://chromium-review.googlesource.com/575399
Reviewed-by: Alex Mineer <amineer@chromium.org>
Cr-Commit-Position: refs/branch-heads/3112@{#625}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
[modify] https://crrev.com/7e4e3dce0263d6e02b5571fe8cfa7fa307b25bda/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/7e4e3dce0263d6e02b5571fe8cfa7fa307b25bda/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp

This was a clean CP and I'm assuming it's WAI.  Please test on canary tonight arthursonzogni@ and mark as fixed if it looks good.
Status: Fixed (was: Started)
I tested the Android WebView (canary 61.0.3159.0) in Yahoo Mail. It looks good!
Status: Verified (was: Fixed)
Issue verified on latest M60 60.0.3112.72 and M61: 61.0.3160.0
Tested devices:Pixel XL/N2G47O,Nexus 5X/N2G47O,Htc Desire 630/MMB29M

Thanks!
Project Member

Comment 24 by bugdroid1@chromium.org, Jul 20 2017

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

commit abd5f7e4feef725fa4a498b266ed3579a4a5ba65
Author: arthursonzogni <arthursonzogni@chromium.org>
Date: Thu Jul 20 18:49:33 2017

Followup: "Fix loading cid: resources in WebView".

This is a followup of https://codereview.chromium.org/2975623002/.
It prevents the renderer from ignoring main resource requests with the "cid"
scheme and adds tests that check an Android Webview can intercept any requests
with this scheme.

BUG= 739658 

Change-Id: I03e039f5e84f2be8638c46812f2216803a0f1d4d
Reviewed-on: https://chromium-review.googlesource.com/574591
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488330}
[modify] https://crrev.com/abd5f7e4feef725fa4a498b266ed3579a4a5ba65/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
[modify] https://crrev.com/abd5f7e4feef725fa4a498b266ed3579a4a5ba65/content/common/navigation_params.cc
[modify] https://crrev.com/abd5f7e4feef725fa4a498b266ed3579a4a5ba65/content/common/navigation_params_unittest.cc
[modify] https://crrev.com/abd5f7e4feef725fa4a498b266ed3579a4a5ba65/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/abd5f7e4feef725fa4a498b266ed3579a4a5ba65/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp

Sign in to add a comment