Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't open PDF on initial download on certain devices #7993

Closed
kjozwiak opened this issue Jan 31, 2020 · 3 comments · Fixed by brave/brave-core#4492
Closed

can't open PDF on initial download on certain devices #7993

kjozwiak opened this issue Jan 31, 2020 · 3 comments · Fixed by brave/brave-core#4492
Assignees
Labels
android-core-release bug OS/Android Fixes related to Android browser functionality

Comments

@kjozwiak
Copy link
Member

Description

On certain devices, you won't be able to open a PDF the first time you download it. Opening a PDF that was downloaded for the first time will display a Can't open file error message. You'll need to download it for the second time and replace the first PDF, at this point, the PDF will open in a third party application as expected.

This seems to be happening in the Pixel 2 but I can't reproduce the same issue on the Samsung S10+.

This was originally reported via the community https://community.brave.com/t/brave-mobile-is-not-able-to-display-pdf-using-it-on-pixel-2xl-latest-version/

Steps to reproduce

  1. download & install 1.5.3 CR: 79.0.3945.136
  2. search for bitcoin whitepaper under DDG and hit the first result (PDF)
  3. give android permission to download the PDF
  4. open bitcoin.pdf via Brave's Downloads
  5. you'll get a Can't open file error when attempting to open the PDF
  6. search for bitcoin whitepaper via DDG and hit the PDF result for the second time
  7. hit Download under the Download file again? modal

This time the PDF will open without any issues.

Actual result

Screenshot_20200131-003743

Expected result

Users should be able to open PDF's when they first initially download them and shouldn't require them to be downloaded twice.

Issue reproduces how often

100% reproducible using the STR mentioned above.

Issue happens on

  • Current Play Store version? Yes, reproducible
  • Beta build? Yes, reproducible

Device details

  • Install type (ARM, x86): ARM
  • Device (Phone, Tablet, Phablet): Pixel 2 XL
  • Android version: Android 10

Brave version

  • Using 1.5.3 CR: 79.0.3945.136 (current release)

Website problems only

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Is the issue reproducible on the latest version of Chrome? No, not reproducible

Additional information

CCing @srirambv @SergeyZhukovsky @anthonypkeane

@srirambv srirambv transferred this issue from another repository Jan 31, 2020
@srirambv srirambv added android-core-release OS/Android Fixes related to Android browser functionality bug labels Jan 31, 2020
@emerick
Copy link
Contributor

emerick commented Jan 31, 2020

I reproed on my Pixel 3 and it logged the following error:

01-31 13:09:40.428: E/cr_FileUtils(1733): Could not create content uri: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.brave.browser_default/files/Download/bitcoin.pdf
01-31 13:09:40.436: I/ActivityTaskManager(1468): START u0 {flg=0x28000000 cmp=com.brave.browser_default/org.chromium.chrome.browser.download.DownloadActivity (has extras)} from uid 10920

Wondering if it's happening on devices with Android 10...

@emerick emerick self-assigned this Jan 31, 2020
@emerick
Copy link
Contributor

emerick commented Jan 31, 2020

This seems to be broken in browser-android-tabs as well.

@kjozwiak
Copy link
Member Author

kjozwiak commented Feb 1, 2020

@emerick yup, reproduced on browser-android-tabs as well 👍@SergeyZhukovsky probably a good idea to fix this in browser-android-tabs as well. Created #2503 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android-core-release bug OS/Android Fixes related to Android browser functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants