Launchpad has imported 7 comments from the remote bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=1733750.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2021-10-02T04:43:17+00:00 Douglas Silva wrote:

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101
Firefox/92.0

Steps to reproduce:

1. Install Ubuntu 21.10 (impish). It ships with Firefox installed as a Snap 
that is maintained by Mozilla.
2. Check the ~/Downloads directory, it should be empty
3. Run Firefox.
4. Check the ~/Downloads directory, it should now have an empty directory named 
"firefox.tmp".


Actual results:

An empty directory is being created at ~/Downloads and I believe this is
not the intended behavior. The directory never goes away, it just stays
there. If you delete it, it will be recreated when you run Firefox
again.


Expected results:

It shouldn't create temporary files in my Downloads directory.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/0

------------------------------------------------------------------------
On 2021-10-02T05:17:38+00:00 Release-mgmt-account-bot wrote:

The [Bugbug](https://github.com/mozilla/bugbug/) bot thinks this bug
should belong to the 'Core::Widget: Gtk' component, and is moving the
bug to that component. Please revert this change in case you think the
bot is wrong.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/1

------------------------------------------------------------------------
On 2021-10-22T15:13:36+00:00 Sygczsjy wrote:

User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101
Firefox/91.0

I have observed the same problem. Ubuntu 21.10, default installed
Firefox, Snap version 93.0 according to About Firefox.

If the user deletes the directory ~/Downloads/firefox.tmp/ while Firefox
is running, Firefox may recreate it at a later point. In some cases the
directory is empty. In other cases, it contains temporary files.

My best guess is that it has to do with a change noted in [this
thread](https://forum.snapcraft.io/t/xdg-open-not-working-on-
firefox/17670/14):

> There’s no `mimeapps.list` file any more, and the `snapcraft.yaml` now sets 
> `GTK_USE_PORTAL=1` in the environment. This causes the GLib APIs to ask 
> `xdg-desktop-portal` to open any files it can’t otherwise find a handler for.
>
> The other change in tip is to set `$TMPDIR` to somewhere other than `/tmp` 
> (specifically, it sets it to `~/Downloads/firefox.tmp`). When Firefox tries 
> to open a file of a type it doesn’t understand, it downloads and saves a copy 
> of it to the temp files directory, and then tries to open that file with its 
> associated handler. This is a problem for snaps, since `/tmp` inside the 
> sandbox is different to `/tmp` outside of the sandbox. Using a different 
> location allows the file to be passed to the helper outside the sandbox.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/2

------------------------------------------------------------------------
On 2021-10-22T15:18:35+00:00 Olivier Tilloy wrote:

This is actually intended: it was added in
https://hg.mozilla.org/mozilla-central/rev/015f42782c5e, to ensure that
other snaps can open files downloaded by firefox. See
https://forum.snapcraft.io/t/sharing-files-via-tmp/1613 for details.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/3

------------------------------------------------------------------------
On 2021-10-22T15:36:15+00:00 Olivier Tilloy wrote:

And with https://git.launchpad.net/~mozilla-snaps/+git/firefox-
snap/commit/?id=f7022494b8d02835617be47226cd55d455ee84fd I moved the
workaround and added a comment to make the intent clearer.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/4

------------------------------------------------------------------------
On 2021-10-22T21:55:48+00:00 Sygczsjy wrote:

"Downloads" seems like an inelegant place for the firefox tmp dir.
Downloads is normally the directory for files the user downloads,
whereas software usually stores its temporary files in a hidden
directory like `.cache` or `.local/share/`. The effect is that the
user's Downloads directory is intruded upon by the seemingly random
files like a `mesa_shader_cache` directory. Perhaps the firefox
temporary directory could be placed in a less obtrusive location.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/5

------------------------------------------------------------------------
On 2021-10-25T15:36:56+00:00 Olivier Tilloy wrote:

Of interest, is bug 1710926 : if I set
`browser.download.improvements_to_download_panel` to `true`, then files
are downloaded to the default Downloads directory, instead of a
temporary directory, and the downloads panel is shown, instead of a
dialog to ask the user what to do with the file.

Once that setting becomes true by default, we can simply remove the
`TMPDIR` hack.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813/comments/6


** Changed in: firefox
       Status: Unknown => New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to thunderbird in Ubuntu.
https://bugs.launchpad.net/bugs/1958813

Title:
  [snap] I have on clean install some weird folder
  /home/user/Downloads/firefox.tmp/

Status in Mozilla Firefox:
  New
Status in firefox package in Ubuntu:
  Confirmed
Status in thunderbird package in Ubuntu:
  Confirmed

Bug description:
  I have on clean install some weird folder /home/user/Downloads/firefox.tmp/
  Downloads/
  └── firefox.tmp
      ├── security_state
      ├── Temp-efca5f30-b773-40f3-afd2-fb29f7ca2d30
      │   └── mesa_shader_cache
      │       ├── 5a
      │       │   └── a12b397653d94da952e9174b48042792d0b5b5
      │       ├── 86
      │       │   └── 658cd26a8a5c083a0d01153d2d26eb349759ce
      │       ├── c2
      │       │   └── 6957f33af79c866d74f0dd37b47ef18e57d431
      │       └── index
      └── tmpaddon

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: ubuntu-release-upgrader-core 1:22.04.3
  ProcVersionSignature: Ubuntu 5.15.0-17.17-generic 5.15.12
  Uname: Linux 5.15.0-17-generic x86_64
  ApportVersion: 2.20.11-0ubuntu75
  Architecture: amd64
  CasperMD5CheckResult: pass
  CrashDB: ubuntu
  CurrentDesktop: KDE
  Date: Mon Jan 24 03:49:13 2022
  InstallationDate: Installed on 2022-01-21 (2 days ago)
  InstallationMedia: Kubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 
(20220121)
  PackageArchitecture: all
  SourcePackage: ubuntu-release-upgrader
  Symptom: dist-upgrade
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/1958813/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to