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

Snap on Linux: EACCES: permission denied (..) .config/IPFS Desktop/config.json #1906

Open
2br-2b opened this issue Sep 8, 2021 · 4 comments
Assignees
Labels
area/linux Linux help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@2br-2b
Copy link

2br-2b commented Sep 8, 2021

I had IPFS desktop running in my taskbar. I told it to show the status, and the app crashed. Now, it just says "IPFS has errored" and won't connect to the network.

Before the crash, I had the IPFS and IPFS Desktop snaps installed. I removed the IPFS snap and this happened soon after. I re-installed IPFS, but that hasn't fixed the problem

This bug seems to occur when upgrading .snap to the new version. – #1906 (comment)

Specifications

  • OS: linux
  • IPFS Desktop Version: 0.16.2
  • Electron Version: 13.1.7
  • Chrome Version: 91.0.4472.124

Error

Error: EACCES: permission denied, open '/home/john/snap/ipfs-desktop/28/.config/IPFS Desktop/config.json'
    at Object.openSync (fs.js:476:3)
    at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
    at Object.writeFileSync (fs.js:1467:35)
    at ElectronStore._write (/snap/ipfs-desktop/28/resources/app.asar/node_modules/conf/dist/source/index.js:370:16)
    at ElectronStore.set store [as store] (/snap/ipfs-desktop/28/resources/app.asar/node_modules/conf/dist/source/index.js:296:14)
    at ElectronStore.set (/snap/ipfs-desktop/28/resources/app.asar/node_modules/conf/dist/source/index.js:189:20)
    at BrowserWindow.<anonymous> (/snap/ipfs-desktop/28/resources/app.asar/src/webui/index.js:48:11)
    at BrowserWindow.emit (events.js:315:20)
@2br-2b 2br-2b added the need/triage Needs initial labeling and prioritization label Sep 8, 2021
@lidel lidel added area/linux Linux help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) labels Sep 8, 2021
@lidel lidel changed the title [gui error report] IPFS Crashed when opening Snap on Linux: EACCES: permission denied (..) .config/IPFS Desktop/config.json Sep 8, 2021
@ipfs ipfs deleted a comment from welcome bot Sep 8, 2021
@lidel
Copy link
Member

lidel commented Sep 8, 2021

Sounds like a bug caused by Snap isolation (installing executable in different slots/dirs) breaking your setup.

@2br-2b some questions and things to try:

  • Why are you using both IPFS Daemon and Desktop snaps? (Desktop ships with a built-in node)
  • Does the issue go away when you reinstall Desktop snap?
    • If not, try removing ~/.ipfs-desktop

lmk if any of this helped.

@lidel lidel added the need/author-input Needs input from the original author label Sep 8, 2021
@2br-2b
Copy link
Author

2br-2b commented Sep 8, 2021

I was using both because I wanted to use the CLI for IPFS in addition to IPFS Desktop. I wanted to do some bulk commands, plus I wanted to try it out. I had assumed they would store their data in the same place (so I could use IPFS Daemon to add files to IPFS Desktop), but when IPFS Daemon said it hadn't been initialized, I realized they didn't share storage, so having no further use for IPFS Daemon, I removed it.

Uninstalling and reinstalling did the trick! It's now up and running again! As a note to anyone in the future, this will remove all pinned objects from IPFS!

@lidel
Copy link
Member

lidel commented Sep 9, 2021

Thank you. Seems that Snap package isolates each install in the own sandbox, severely limiting its capabilities.
For now, reinstall does the trick, but you need to manually migrate your data.

If someone familiar with Snap intricacies has any suggestions how to solve this, it would be highly appreciated. Our current config for generating .snap is in electron-builder.yml.

@lidel lidel added P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Sep 9, 2021
@lidel lidel removed the need/author-input Needs input from the original author label Oct 4, 2021
@lidel
Copy link
Member

lidel commented Jan 28, 2022

I requested safelisting ipfs-desktop snap to use --classic confinement:
https://forum.snapcraft.io/t/ipfs-desktop-classic-review/28517?u=lidel

When we get 👍 there I will flip

confinement: strict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/linux Linux help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Needs Grooming
Development

No branches or pull requests

2 participants