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

The upload location is incorrect in the activity log when uploading files/importing entities if Storage Explorer is installed by snap on Ubuntu 20.04 #6539

Closed
v-kellyluo opened this issue Feb 9, 2023 · 4 comments
Assignees
Labels
💻 linux Related to Linux platforms 📦 snaps Related to Linux snaps 🧪 testing Found through regular testing ✅ won't fix Will not be worked on
Milestone

Comments

@v-kellyluo
Copy link

Storage Explorer Version: 1.28.0
Build Number: 20230209.2
Branch: rel/1.28.0
Platform/OS: Linux Ubuntu 20.04
Architecture: x64
How Found: From running test case
Regression From: Not a regression

Steps to Reproduce

  1. Install Storage Explorer on Ubuntu 20.04 by snap.
  2. Expand one storage account -> Blob Containers.
  3. Create a blob container.
  4. Click 'Upload-> Upload Files...' -> Click 'No files selected' box.
  5. Select a file from the default location (under /home//Downloads).
  6. Click 'Open' -> Observe the upload activity log.
  7. Check whether the upload location is correct.

Expected Experience

The upload location is correct.
image

Actual Experience

The upload location is incorrect.
image

Additional Context

  1. This issue doesn't reproduce when downloading files/blobs.
  2. This issue doesn't reproduce when Storage Explorer is installed by tar.gz.
  3. This issue doesn't reproduce when uploading folders.
  4. This issue doesn't reproduce on Ubuntu 22.04.
@v-kellyluo v-kellyluo added 🧪 testing Found through regular testing 💻 linux Related to Linux platforms 📦 snaps Related to Linux snaps labels Feb 9, 2023
@v-kellyluo v-kellyluo changed the title The upload location is incorrect in the activity log when uploading files/importing entities The upload location is incorrect in the activity log when uploading files/importing entities if Storage Explorer is installed by snap on Ubuntu 20.04 Feb 9, 2023
@MRayermannMSFT
Copy link
Member

@v-kellyluo, is the uploaded file the correct file?

@v-kellyluo
Copy link
Author

@MRayermannMSFT , yes, the uploaded file is a correct file under the default location (/home//Downloads).

@MRayermannMSFT MRayermannMSFT added this to the 1.29.0 milestone Feb 17, 2023
@MRayermannMSFT
Copy link
Member

@richardMSFT , please research if this is expected on this version of ubuntu. Perhaps the file path the app sees is odd because of some sort of containerization the app is placed in by the snap runtime?

@richardMSFT
Copy link

richardMSFT commented Apr 21, 2023

From what I've researched, this seems to be the expected behavior for a confined application in snap using xdg desktop portals (https://forum.snapcraft.io/t/home-path-is-translated-into-run-user-1000/15415/6).

From the snapcraft documentation on portals: "Files are fuse-mounted to /run/user//doc// in order to give your application access to it. So the path your application sees is different from the path a user chose, even though both are the same file." (https://snapcraft.io/docs/xdg-desktop-portals). This seems to be inline with what we're seeing for the upload location.

I don't see anywhere we're explicitly enabling portal support in our snap, but electron supports native file chooser dialogs using XDG Desktop Portal (electron/electron#19159). Since we use electron's dialog module (which displays native system dialogs) and showOpenDialog function for our file picker during uploads, this could be why we are getting these paths.

As for why this is reproducing for ubuntu 20.04 and not 22.04, I'm not sure. That requires further research.

@richardMSFT richardMSFT added the ✅ won't fix Will not be worked on label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 linux Related to Linux platforms 📦 snaps Related to Linux snaps 🧪 testing Found through regular testing ✅ won't fix Will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants