After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784990 - Installation silently fails because Firefox deletes downloads on close
Installation silently fails because Firefox deletes downloads on close
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
: 751261 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-07-16 02:06 UTC by Bastien Nocera
Modified: 2018-01-12 11:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2017-07-16 02:06:47 UTC
1. Launch firefox
2. Go to Google's Chrome download page
3. Follow the links to download the RPM
4. Select "Open in Software" in Firefox' popup
5. Once Software is launched, click on "Install"
6. During the lengthy installation, close Firefox

Jul 16 04:01:02 macbookpro gnome-software-service.desktop[3166]: 02:01:02:0845 Gs  failed to install google-chrome.desktop: failed to open /tmp/mozilla_hadess0/google-chrome-stable_current_x86_64.rpm

Firefox just cleaned up its temp files before we could finish installing them :(

I would make a hard link in the same partition (usually home or temp dir) to make sure the download file didn't disappear from underneath me. 80 megs still takes a little bit of time to download in the first world, I can't imagine this happening in a more constrained situation.
Comment 1 Scott Cohen 2017-07-16 04:13:32 UTC
(In reply to Bastien Nocera from comment #0)
> 1. Launch firefox
> 2. Go to Google's Chrome download page
> 3. Follow the links to download the RPM
> 4. Select "Open in Software" in Firefox' popup
> 5. Once Software is launched, click on "Install"
> 6. During the lengthy installation, close Firefox
> 
> Jul 16 04:01:02 macbookpro gnome-software-service.desktop[3166]:
> 02:01:02:0845 Gs  failed to install google-chrome.desktop: failed to open
> /tmp/mozilla_hadess0/google-chrome-stable_current_x86_64.rpm
> 
> Firefox just cleaned up its temp files before we could finish installing
> them :(
> 
> I would make a hard link in the same partition (usually home or temp dir) to
> make sure the download file didn't disappear from underneath me. 80 megs
> still takes a little bit of time to download in the first world, I can't
> imagine this happening in a more constrained situation.
Did you try installing another package from another site and installing from there?
Comment 2 Bastien Nocera 2017-07-16 12:15:32 UTC
(In reply to Scott Cohen from comment #1)
> Did you try installing another package from another site and installing from
> there?

Why would that make any difference to this problem?
Comment 3 Scott Cohen 2017-07-16 14:49:15 UTC
The package could be screwed up.(In reply to Bastien Nocera from comment #2)
> Why would that make any difference to this problem?
The package could be screwed up.
Comment 4 Bastien Nocera 2017-07-16 15:52:45 UTC
(In reply to Scott Cohen from comment #3)
> The package could be screwed up.(In reply to Bastien Nocera from comment #2)
> > Why would that make any difference to this problem?
> The package could be screwed up.

It wasn't. And it wouldn't give that error message if it was.
Comment 5 Richard Hughes 2017-12-05 13:24:59 UTC
commit 65e1979127c748ea60c39e5c96ee1e31a2a53a25 (HEAD -> master)
Author: Richard Hughes <richard@hughsie.com>
Date:   Tue Dec 5 12:52:49 2017 +0000

    Copy files installed from /tmp
    
    When downloading a file with a file that is auto-opened in gnome-software, some
    web browsers like Firefox download the file to /tmp rather than ~/Downloads.
    This prompts the user to confirm the installation in gnome-software before it is
    actually deployed onto the system. If Firefox is then closed it deletes all the
    content in /tmp/mozilla, and clicking 'Install' in gnome-software leads to an
    error saying the file can no longer be read.
    
    To fix this, copy files in /tmp to the ~/.cache/gnome-software/downloads
    directory. We could have used a hardlink into the /tmp/mozilla folder, but if
    the directory is deleted or if the mount no longer exists (e.g. for flatpak)
    then this isn't going to work.
    
    Given even 'large' RPMs are only a few Mb, copying sees the pragmatic choice.
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=784990

:100644 100644 1c4c948c... 2883f941... M        src/gs-application.c
Comment 6 Bastien Nocera 2017-12-05 15:42:41 UTC
(In reply to Richard Hughes from comment #5)
<snip>
>     Given even 'large' RPMs are only a few Mb, copying sees the pragmatic
> choice.

aquaria_1.1.3_i386.rpm from the Humble Bundle #1 is 208 megs. I'm not sure this qualifies as small.
Comment 7 Richard Hughes 2018-01-12 11:07:21 UTC
*** Bug 751261 has been marked as a duplicate of this bug. ***