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

Issue 641790 link

Starred by 4 users

Issue metadata

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



Sign in to add a comment

Android: downloading any file causes "replace file" dialog even if file does not exist.

Project Member Reported by wfh@chromium.org, Aug 28 2016

Issue description

Version: Chrome Canary 54.0.2840.0
OS: Android N 7.0.99 NME42G

What steps will reproduce the problem?
(1) Visit a page with a PDF. I think it also works for any downloads
(2) Download file
(3) Notice the message "replace existing" file appears.

What is the expected output?

Just downloads and/or opens without dialog

What do you see instead?

Dialog saying to replace the file.

Please use labels and text to provide additional information.

See screenshot.
 
Screenshot_20160828-132001.png
97.7 KB View Download
Cc: talo@chromium.org
Adding talo@ who might know who to assign this to. I'm also seeing this with every download.

Comment 2 by wfh@chromium.org, Sep 8 2016

Cc: -talo@chromium.org
Labels: ReleaseBlock-Beta
Owner: talo@chromium.org
Status: Assigned (was: Untriaged)
This is still happening for me.

Comment 3 by wfh@chromium.org, Sep 8 2016

Cc: amineer@chromium.org
Labels: M-54
I am not able to repro the problem from trunk build with my nexus 6P/android N, can i get the device that repro the problem?
Status: Fixed (was: Assigned)
This is an M54 issue and trunk is M55 so that doesn't necessarily help.  However, I downloaded the latest M54 build and it doesn't appear to repro this, so it must have been fixed somewhere.  wfh@, benwells@, can you let me know if you see it after you get the latest dev later tonight / tomorrow?

Comment 6 by wfh@chromium.org, Sep 14 2016

I am still getting this on Canary 55.0.2859.0 on Android NDE63J (this is a fresh install of the phone from factory reset). Perhaps this only repros on Android N?

Comment 7 by wfh@chromium.org, Sep 14 2016

Cc: sidv@chromium.org
FWIW - I just tested on Stable 52.0.2743.99 and I don't have this happen. My variations on that version are attached.
variations-stable.txt
658 bytes View Download

Comment 8 by wfh@chromium.org, Sep 14 2016

Cc: dah...@chromium.org

Comment 9 by wfh@chromium.org, Sep 14 2016

Summary: Android: downloading any file causes "replace file" dialog even if file does not exist. (was: downloading any PDF causes "replace file" dialog even if file does not exist)

Comment 10 by wfh@chromium.org, Oct 5 2016

Status: Assigned (was: Fixed)
This is certainly not fixed. I still get this on Canary 55.0.2875.3 on the Pixel phone. I was reporting the bug earlier on the same phone so perhaps it is specific to that. It happens for every single download.

Comment 11 by wfh@chromium.org, Oct 5 2016

I updated all channels on my phone today and this repros on all except stable.

Stable 53.0.2785.134 no repro
Beta: 54.0.2840.42 repro
Dev: 55.0.2880.3 repro
Canary: 55.0.2879.0 repro

I'm.not sure why the bug was closed in c5 (sorry I only just noticed that) but it still seems like quite a visible regression to me.
Cc: dfalcant...@chromium.org qin...@chromium.org
Owner: dfalcant...@chromium.org
We tested on Pixel XL/NMF04/54.0.2840.42 and 55.0.2880.3 builds and unable to repro the issue.

Have you checked your download directory to see if the same pdf already exists?

Cc: -qin...@chromium.org -sidv@chromium.org
Owner: qin...@chromium.org
Sending back to Min again.

Comment 14 by wfh@chromium.org, Oct 5 2016

Re : 12 it appears for every download even ones from new pages I've never visited...
Labels: -ReleaseBlock-Beta ReleaseBlock-Stable
I can repro this on latest M54 beta as well.

http://caffepinguini.com/menu-item/download-our-food-menu-in-pdf/

Long press on "Caffe Pinguini New Menu 2016", select "Download Link" - see dialog asking to overwrite current file, even though I've never been on this page before.

Setting this as a stable blocker, we have *less than one week* to fix and merge back to branch 2840.  qinmin@, PTAL ASAP.
hmm... I tried the link in #15, but cannot repro it. Somehow this bug is not very consistently reproducible.
Tried both Chrome beta and Chrome dev on Alex's phone, both have the issue of poping up the overwrite infobar even after the pdf file has been deleted.

However, the issue is not reproducible for chrome built from trunk.
I feel this issue may be related to bugs in Android 7.0. 
The problem is not reproducible on other Android versions, and also doesn't show up in all Chrome versions.

I tried Beta and Dev on N. I can't reproduce it using the link in #15 nor any other download link.

Even if it's some interaction with on N, the UX still isn't great. Currently Chrome on Android surfaces all target determination errors as the "replace file" dialog. At best, this is confusing. It also means that some portion of actual errors will get recorded as user initiated cancellations.

Would someone who can consistently repro the issue be willing to run an instrumented build? That way we can get some diagnostics and figure out what's going on. Even if we surface the error to the user, it might be something that we can handle better than show an error and give up.
I'm happy to run an instrumented build, though I did that with qinmin@ yesterday and I don't believe the problem recurred there.  Let me know what you need me to do...
Ah. Good.

qinmin: was the instrumentation done to figure out what went wrong at DownloadTargetDeterminer?

Labels: -M-54 -ReleaseBlock-Stable M-56
Labels: -M-56 M-54 ReleaseBlock-Stable
I just booted up my Nexus 6P running Android 6.0.1 (M) and was able to reproduce on canary, dev and beta - but not stable.  I think we have an M54 regression here somewhere, though given that only wfh@ and myself have been able to reliably repro perhaps we have an account specific regression somewhere?

Bringing back to M54 RB-Stable given the repeatability on a N6P / M, I have left the device with minqin@, again - let me know what else I can help provide to debug...
I got Alex's device, and was able to repro the problem on Beta, Canary and Dev.

However, problem goes away after uninstalling/reinstalling the Canary from Google Play, so I suspect this has something to do with stored data.

I built Canary from trunk, but cannot repro the problem either.
I just uninstalled / reinstalled Chrome Dev on my Pixel device and could repro the issue immediately.
hmmm... i tried uninstalling Chrome Dev from nexus 6P, and reinstalling it

1. Chrome Dev built from trunk works fine
2. Chrome Dev downloaded from Android Play Store shows the problem 


OK, an interesting finding:

Sign into Chrome actually has an impact on whether the problem is reproducible:

1. Uninstall Chrome Dev
2. Install Chrome Dev through play store, and Run it
3. When asked whether want to sign in, click yes, and the problem will reproduce

if in 3, i choose not to sign in, then the problem will not reproduce.

So this has something to do with the data stored in profile
aha, i figured it out.

This is the culprit:https://cs.chromium.org/chromium/src/chrome/browser/download/download_target_determiner.cc?q=PromptForDownload&sq=package:chromium&l=841&dr=C

There is a "Always prompt for download location" preference on desktop. And after signing into chrome, that preference is applied on Android. That's why we always show the overwrite infobar.
LOL. Nice find.
Labels: Merge-Request-54
Status: Started (was: Assigned)

Comment 32 by dimu@chromium.org, Oct 7 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 33 by bugdroid1@chromium.org, Oct 7 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f17168f31be3737ce57abc06d89b43165485eb1b

commit f17168f31be3737ce57abc06d89b43165485eb1b
Author: Min Qin <qinmin@chromium.org>
Date: Fri Oct 07 19:54:13 2016

Don't prompt for download location on Android

On Android, choosing file location is not very user friendly.
Disable this for now.

TBR=asanka@chromium.org
BUG= 641790 

Review-Url: https://codereview.chromium.org/2394303003
Cr-Commit-Position: refs/heads/master@{#423921}
(cherry picked from commit b034f7843cb922da49735428a0aafcb4cf9a3e38)

Review URL: https://codereview.chromium.org/2402053002 .

Cr-Commit-Position: refs/branch-heads/2840@{#685}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/download_target_determiner.cc
[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/download_target_determiner_unittest.cc

qinmin: The change in #30 missed the M55 cutoff. You'd need to merge to M55 as well.
[Bulk edit]

URGENT: This issue is marked as an RB-Stable for Android M54.  If it is going to block the release, it needs to be fixed ASAP, and merged back to branch 2840 by 5 PM PT Oct 11.

Please review and if you cannot get it fixed by then, ping me; if you don't believe you are the right owner, and you cannot find another one - please ping me.
Project Member

Comment 36 by bugdroid1@chromium.org, Oct 7 2016

Labels: merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3266347769228c04686411d2aade855ca73cde8

commit d3266347769228c04686411d2aade855ca73cde8
Author: Min Qin <qinmin@chromium.org>
Date: Fri Oct 07 21:02:37 2016

Don't prompt for download location on Android

On Android, choosing file location is not very user friendly.
Disable this for now.

TBR=asanka@chromium.org
BUG= 641790 

Review-Url: https://codereview.chromium.org/2394303003
Cr-Commit-Position: refs/heads/master@{#423921}
(cherry picked from commit b034f7843cb922da49735428a0aafcb4cf9a3e38)

Review URL: https://codereview.chromium.org/2401143002 .

Cr-Commit-Position: refs/branch-heads/2883@{#4}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/download_target_determiner.cc
[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/download_target_determiner_unittest.cc

Comment 37 by wfh@chromium.org, Oct 8 2016

yay! so pleased the root cause for this was found :)
Status: Fixed (was: Started)
Based on all the commits that have landed here, this should be fixed.  qinmin@, please correct me and reopen if I'm wrong.  Test team, please make sure we verify this.
Labels: M-55
Cc: yus...@chromium.org talo@chromium.org ian...@chromium.org qin...@chromium.org
 Issue 652549  has been merged into this issue.

Comment 41 Deleted

I used to get this reliably on 54.0.2840.50 ( issue 652549  comment 6), but I've tested with 54.0.2840.58 that includes the patch, after signing in and forcing a sync, and can no longer reproduce this. Hurray!
Status: Verified (was: Fixed)
 Issue 655031  has been merged into this issue.
Project Member

Comment 45 by bugdroid1@chromium.org, Oct 27 2016

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

commit d3266347769228c04686411d2aade855ca73cde8
Author: Min Qin <qinmin@chromium.org>
Date: Fri Oct 07 21:02:37 2016

Don't prompt for download location on Android

On Android, choosing file location is not very user friendly.
Disable this for now.

TBR=asanka@chromium.org
BUG= 641790 

Review-Url: https://codereview.chromium.org/2394303003
Cr-Commit-Position: refs/heads/master@{#423921}
(cherry picked from commit b034f7843cb922da49735428a0aafcb4cf9a3e38)

Review URL: https://codereview.chromium.org/2401143002 .

Cr-Commit-Position: refs/branch-heads/2883@{#4}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/download_target_determiner.cc
[modify] https://crrev.com/d3266347769228c04686411d2aade855ca73cde8/chrome/browser/download/download_target_determiner_unittest.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Oct 27 2016

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

commit f17168f31be3737ce57abc06d89b43165485eb1b
Author: Min Qin <qinmin@chromium.org>
Date: Fri Oct 07 19:54:13 2016

Don't prompt for download location on Android

On Android, choosing file location is not very user friendly.
Disable this for now.

TBR=asanka@chromium.org
BUG= 641790 

Review-Url: https://codereview.chromium.org/2394303003
Cr-Commit-Position: refs/heads/master@{#423921}
(cherry picked from commit b034f7843cb922da49735428a0aafcb4cf9a3e38)

Review URL: https://codereview.chromium.org/2402053002 .

Cr-Commit-Position: refs/branch-heads/2840@{#685}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/download_target_determiner.cc
[modify] https://crrev.com/f17168f31be3737ce57abc06d89b43165485eb1b/chrome/browser/download/download_target_determiner_unittest.cc

Sign in to add a comment