ipfs-desktop
ipfs-desktop copied to clipboard
Snap on Linux: EACCES: permission denied (..) .config/IPFS Desktop/config.json
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. – https://github.com/ipfs/ipfs-desktop/issues/1906#issuecomment-916033324
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)
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
- If not, try removing
lmk if any of this helped.
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!
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.
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 :+1: there I will flip https://github.com/ipfs/ipfs-desktop/blob/3b138478835117469a4dcd89fca59e3fb25e5e18/electron-builder.yml#L67