Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Open Link to PDF in new tab gives initial “Invalid or corrupted PDF file” #14674

Closed
GeetaSarvadnya opened this issue Jul 6, 2018 · 8 comments
Labels
bug duplicate Issue has already been reported fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. plugin/pdfjs

Comments

@GeetaSarvadnya
Copy link
Collaborator

GeetaSarvadnya commented Jul 6, 2018

Description

Open Link to PDF in new tab gives initial “Invalid or corrupted PDF file”

Steps to Reproduce

  1. Navigate to "https://github.com/tinkertim/StackCOC"
  2. Open the below link in New Tab
    "https://github.com/tinkertim/StackCOC/blob/master/The%20Stack%20Exchange%20Network%20Code%20of%20Conduct%20(R7).pdf"

Actual result:
Open Link to PDF in new tab gives initial “Invalid or corrupted PDF file”
pdf erro issue

Expected result:
Open link to PDF in new tab should open the appropriate PDF file

Reproduces how often:
Easily

Brave Version

0.23.19
about:brave info:

Brave: 0.23.19
V8: 6.7.288.46
rev: 178c3fb
Muon: 7.1.3
OS Release: 10.0.17134
Update Channel: Release
OS Architecture: x64
OS Platform: Microsoft Windows
Node.js: 7.9.0
Tor: 0.3.3.7 (git-035a35178c92da94)
Brave Sync: v1.4.2
libchromiumcontent: 67.0.3396.87

Reproducible on current live release:
Yes

Additional Information

Issue is reported by Community:
https://community.brave.com/t/open-link-to-pdf-in-new-tab-gives-initial-invalid-or-corrupted-pdf-file/27141/2

@hugobuddel
Copy link
Contributor

There are many variations on this issue. E.g. I'm trying to read up on the Semitic sun god (don't ask), for which I found a pay-walled jstor pdf: https://www.jstor.org/stable/pdf/23502986.pdf

Now there are several options:

  • Does work: open link in this tab. Shows login page.
  • Does work: enter "?" + URL in the address bar, click on first/only google result. (Variant on the above; easiest way to create a link if you just have the -pdf URL.)
  • Does not work: copy and paste URL in a new tab. "Invalid or corrupted PDF file."
  • Does not work: open link in new tab. Also "Invalid or corrupted PDF file."
  • Does not work: open link properly with one of the first methods above; close and reopen brave. "Invalid or corrupted PDF file." or even "Your file was not found".

This is especially annoying when searching and your search result contains a pdf link. Then you should open all the other interesting (normal html) results in new tabs, then left-click on the pdf link. And it is even more annoying if you have two or more pdf results, because you have to perform the search another time in a new tab.

I'm sooo happy I found the workaround in the second bullet above. Because I often open many tabs from a Google result, continue searching with different keywords, opening more tabs, etc. Then I go read the tabs, and they are broken pdfs. But by then the original search is long gone, so there is no link to 'left-click' on. Now I just prefix a "?" to the URL and click on the result.

Brave: 0.23.31
V8: 6.7.288.46
rev: 3148ace
Muon: 7.1.5
OS Release: 3.10.0-862.3.2.el7.x86_64
Update Channel: Release
OS Architecture: x64
OS Platform: Linux
Node.js: 7.9.0
Brave Sync: v1.4.2
libchromiumcontent: 67.0.3396.103

@kjozwiak
Copy link
Member

@BrendanEich ran into the same issue mentioned in #14674 (comment) when attempting to load the following link:

https://github.com/Microsoft/MSRC-Security-Research/blob/master/presentations/2018_02_OffensiveCon/The%20Evolution%20of%20CFI%20Attacks%20and%20Defenses.pdf

It looks like browser-laptop is having issues loading URL's that are ending in .pdf but are actually websites that have PDF's embedded. In the example @hugobuddel mentioned above, loading https://www.jstor.org/stable/pdf/23502986.pdf will redirect the user to https://www.jstor.org/stable/pdf/23502986.pdf?seq=1#page_scan_tab_contents which appears to be a website with an embedded PDF.

Loading the data URL's directly in browser-laptop works without any problems, example:

All of the examples within this issue are loading correctly within brave-core so it defniitely seems like it's related to muon.

CCing @bsclifton.

@kjozwiak kjozwiak added the fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. label Jul 17, 2018
@bsclifton
Copy link
Member

Closing as a duplicate of #10554

@tbates
Copy link

tbates commented Oct 1, 2018

here's another

chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://onlinelibrary.wiley.com/doi/pdf/10.1111/cdev.12853

@hugobuddel
Copy link
Contributor

Thanks @tbates

I've added your example to what seems like the corresponding brave-browser issue: brave/brave-browser#1033

@oxfordia
Copy link

Also a problem with eBay shipping label pop-up and/or "Reprint" label
(works in Chrome every time)

Get the same "Invalid or Corrupt PDF file" message (in the red bar across the top)
Clicking "More Info" = PDF.js v2.0.673 (build: 31012570) - Message: Invalid PDF structure

@oxfordia
Copy link

Just got another one while trying to "view" my Chase online statement:

"Unexpected Server Response"
PDF.js v2.0.673 (build: 31012570)
Message: Unexpected server response (401) while retrieving PDF
"https://secure.07a.chase.com/svc/......chase.com"

SAME "PDF.js v2.0.673 (build: 31012570)"

@kjozwiak
Copy link
Member

kjozwiak commented Oct 24, 2018

@oxfordia do you by any chance have the new Brave installed? You can download the latest versions from the following links:

Explanation regarding the difference between the above channels:

https://support.brave.com/hc/en-us/articles/360017916752-What-is-the-difference-between-Beta-Dev-and-Release-builds-

If you do download one of the above versions, could you run through the issues that you mentioned above and see if they're still reproducible? If they are, can you please update brave/brave-browser#1033 with more information? Much appreciated!

@brave brave locked and limited conversation to collaborators Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug duplicate Issue has already been reported fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. plugin/pdfjs
Projects
None yet
Development

No branches or pull requests

7 participants