Download fails silently after choosing location to download - fixed in Ubuntu by installing xdg-desktop-portal

fmarier wrote:

I have also run into this problem on my bank’s site. I can reproduce consistently and the only thing that works is the “print to PDF” work-around you’ve described above. Other sites I’ve tried work fine though, only this one is broken. Last time I looked, it appeared to be either a site problem or an upstream Chromium issue because I could reproduce the problem on that bank’s site in Chrome.

Banking sites sometimes are coded so that it seems you can’t right click (to select open in a new tab, or to select save as). I have run into that problem before, but it was along time ago. My workaround was to use a different browser at that time.

fmarier wrote:

So two questions for you (to see if we’re talking about the same problem):

  1. Are you seeing this problem on just one or two sites? Or is it everywhere where you are trying to save a PDF?
  2. On affected sites, can you try to see if it always fails in Chrome?

It is consistent across all sites, including the test download links provided in this discussion thread.

With the w3.org dummy.pdf link above the download silently failed using both Brave and Chrome.

It did NOT fail using Vivaldi which sits on chrome, but has created more of it’s own user interface software.

Hm. That one works fine for me, which means you’re seeing a different problem from me. (I’m also on Ubuntu 22.04.)

What if you try in a new browser profile? You can create one temporarily using this command (change to point to your own home directory):

brave-browser-stable --user-data-dir=/home/francois/brave-temp-profile

Hmmm.

I did the steps given here:

That should be similar to a new profile at same account?

I’m likely going to do a fresh Ubuntu 24 install and install a fresh standard Brave (without migration of a profile) and will test again.

BTW, for files that you want to download that have a clean link, it is possible to use a command line in the Terminal app like so:

wget https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

Indeed. It’s a more complicated way (though also more thorough) of doing this check. Thanks.

It’s hard to say what’s wrong in your case (or even investigate the problem) because I can’t reproduce this general “can’t download any PDFs” problem.

1 Like

I may have the same problem, and I’m using Ubuntu 22.04.
After some research, I guess the problem is not caused by the browser but by the OS.
I take the suggestion from https://askubuntu.com/questions/1545188/unable-to-save-images-from-web-browsers-firefox-and-chromium-based-to-local-ma
In my case, I fixed the problem by installing the following packages:
sudo apt install xdg-desktop-portal xdg-desktop-portal-gtk
Remember to close all browser windows before retry.

2 Likes

Very interesting @Herol . I take it you’re also using Wayland?

Are you using the native packages or the Snap?

This solution worked for me as well.

Steps taken:

  1. run command in terminal window:
    sudo apt install xdg-desktop-portal xdg-desktop-portal-gtk
  2. reboot computer
  3. relaunch Brave
  4. click on the test (dummy) PDF link above
  5. verify that file downloads and also shows in the download history

THANK YOU!!!

No, I’m using Xorg, and I install the Brave browser via the source repository.
Because since everyone had this problem almost on the same day, I guess the Ubuntu LTS team had pushed some bugged packages.

1 Like

Yes, this problem was present for me testing with either Xorg and Wayland.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.