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

Links from PDF not opening in Brave #17283

Open
galettof opened this issue Aug 1, 2021 · 7 comments
Open

Links from PDF not opening in Brave #17283

galettof opened this issue Aug 1, 2021 · 7 comments
Labels
bug Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix OS/Desktop OS/Linux priority/P5 Not scheduled. Don't anticipate work on this any time soon. QA/Test-Plan-Specified QA/Yes
Projects

Comments

@galettof
Copy link

galettof commented Aug 1, 2021

Description

Links to website in PDF files do not open in Brave.

Steps to Reproduce

  1. Open a PDF file in Evince.
  2. Click on a url link.

Actual result:

Mouse cursor changes to spinning wheel, nothing else happens.

Expected result:

The link should open in Brave.

Reproduces how often:

Every time.

Brave version (brave://version info)

Brave 1.27.109 Chromium: 92.0.4515.115 (Official Build) (64-bit)
Revision 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes.
  • Can you reproduce this issue with the beta channel? Don't know.
  • Can you reproduce this issue with the nightly channel? Don't know.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? Don't know.

Miscellaneous Information:

If I switch default browser to Firefox, then links open as expected.
Opening Evince from terminal and clicking on a link in a PDF file returns the following terminal message:
sh: 1: exec: /usr/bin/brave-browser-stable: Permission denied

@btlechowski
Copy link
Collaborator

btlechowski commented Aug 2, 2021

Thank you for reporting.

Reproduced the issue on

Brave 1.27.109 Chromium: 92.0.4515.115 (Official Build) (64-bit)
Revision 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS Ubuntu 18.04 LTS

image

PDF used: http://www.pdf995.com/samples/pdf.pdf

Note: Opening link from Charles works as expected

Also reproduced on beta and nightly:

Brave 1.28.98 Chromium: 92.0.4515.115 (Official Build) beta (64-bit)
Revision 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS Ubuntu 18.04 LTS
Brave 1.29.42 Chromium: 92.0.4515.115 (Official Build) nightly (64-bit)
Revision 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS Ubuntu 18.04 LTS

cc @rebron @wknapik

@wknapik
Copy link
Contributor

wknapik commented Aug 2, 2021

Can't repro on my system (Arch Linux).

@galettof please take a look here. The instructions were written for Arch, but they apply on any distro. And please paste the outputs from the "Debugging" section.

@galettof
Copy link
Author

galettof commented Aug 2, 2021

Thank you both! I will take a look at the Arch instructions, hopefully later today.

For what it's worth, links used to open from PDF files into Brave. I don't remember when they stopped working nor if there was any major change in my system that could be responsible.

@rebron rebron added this to Untriaged Backlog in General Aug 2, 2021
@galettof
Copy link
Author

galettof commented Aug 3, 2021

I tried following the Arch instructions. Everything appeared to be set correctly, with the exception of the BROWSER variable. Unfortunately, setting that variable did not make a difference in my case.

@kjozwiak kjozwiak added the Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix label Aug 4, 2021
@kjozwiak
Copy link
Member

kjozwiak commented Aug 4, 2021

@simonhong mentioned he could also reproduce the above via Chrome so it seems like an upstream issue.

@rebron rebron added the priority/P5 Not scheduled. Don't anticipate work on this any time soon. label Aug 6, 2021
@rebron rebron moved this from Untriaged Backlog to P5 Backlog in General Aug 6, 2021
@rebron rebron moved this from P5 Backlog to Needs Info/Waiting Upstream in General Aug 6, 2021
@dann-merlin
Copy link

dann-merlin commented Aug 27, 2021

I had the issue too and was able to fix it.
It was due to apparmor not allowing brave to run. This is because for some reason the apparmor configurations were missing for me.
All of the following commands need root privileges, so a sudo might need do be prepended.
To fix them, add this to /etc/apparmor.d/abstractions/ubuntu-browsers:

  /opt/brave.com/brave{,-beta,-dev,-nightly}/brave-browser{,-beta,-dev,-nightly} Cx -> sanitized_helper,
  /opt/brave.com/brave{,-beta,-dev,-nightly}/brave{,-beta,-dev,-nightly} Cx -> sanitized_helper,

and add this to /etc/apparmor.d/abstractions/ubuntu-helpers:

  /opt/brave.com/brave{,-beta,-dev,-nightly}/chrome-sandbox PUxr,
  /opt/brave.com/brave{,-beta,-dev,-nightly}/chrome_crashpad_handler PUxr,
  /opt/brave.com/brave{,-beta,-dev,-nightly}/brave-browser{,-beta,-dev,-nightly} Pixr,
  /opt/brave.com/brave{,-beta,-dev,-nightly}/brave{,-beta,-dev,-nightly} Pixr,
  /opt/brave.com/brave{,-beta,-dev,-nightly}/{,**/}lib*.so{,.*} m,

Either reboot then or execute this command to reload the apparmor profile for evince:

apparmor_parser -r /etc/apparmor.d/usr.bin.evince

The next time evince is started, it worked for me.

Alternatively, though not advised, as it disables a lot of the security added by apparmor, you can set the apparmor profile to complain instead of enforce like this (apparmor-utils need to be installed, if you are on Ubuntu):

aa-complain /usr/bin/evince

Edit:
crashpad_handler was renamed to chrome_crashpad_handler recently. I edited this fix above accordingly.

@galettof
Copy link
Author

This worked for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Chromium/waiting upstream Issue is in Chromium; we'll likely wait for the fix OS/Desktop OS/Linux priority/P5 Not scheduled. Don't anticipate work on this any time soon. QA/Test-Plan-Specified QA/Yes
Projects
General
  
Needs Info
Development

No branches or pull requests

6 participants