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

"Error: EPERM: operation not permitted, chown" with Caprine 2.37.0 from Snap on Ubuntu #1062

Closed
tkedwards opened this issue Aug 22, 2019 · 18 comments

Comments

@tkedwards
Copy link

A JavaScript error occurred in the main process
Uncaught Exception:
Error: EPERM: operation not permitted, chown '/home/tim/snap/caprine/28/.config/Caprine/config.json.3051011808'
    at Object.chownSync (fs.js:1104:3)
    at Function.writeFileSync [as sync] (/snap/caprine/28/resources/app.asar/node_modules/conf/node_modules/write-file-atomic/index.js:196:27)
    at ElectronStore.set store [as store] (/snap/caprine/28/resources/app.asar/node_modules/conf/index.js:277:19)
    at ElectronStore.set (/snap/caprine/28/resources/app.asar/node_modules/conf/index.js:152:14)
    at updateVibrancySetting (/snap/caprine/28/resources/app.asar/dist-js/config.js:155:15)
    at migrate (/snap/caprine/28/resources/app.asar/dist-js/config.js:165:5)
    at Object.<anonymous> (/snap/caprine/28/resources/app.asar/dist-js/config.js:168:1)
    at Module._compile (internal/modules/cjs/loader.js:786:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
    at Module.load (internal/modules/cjs/loader.js:645:32)

Looks like #1032 is back. 2.36.0 is not affected so the workaround is 'snap revert caprine'

@bogdan-bodnaruk
Copy link

The same for me

@sindresorhus
Copy link
Owner

This is unfortunately blocked by npm/write-file-atomic#51. This is really Snap's fault as they don't support a common method (chown).

@tminhvu
Copy link

tminhvu commented Aug 24, 2019

Same here. For anyone that cannot revert to the previous version like me can use the AppImage until the problem is fixed.

@wulfalpha
Copy link

Same issue on Solus via Snap.

@folkien
Copy link

folkien commented Aug 27, 2019

same

@tdislay
Copy link

tdislay commented Aug 28, 2019

Hey guys, I've just solved it
I've downloaded the latest version (2.37)
and the trick was to REMOVE the config.json file :)
rm ~/.config/Caprine/config.json
OR
chgrp $USER ~/.config/Caprine/config.json

@PiotrDabrowskey
Copy link

@Remyks snap version of Caprine strores its files in ~/snap/caprine/current/.config/Caprine, not in ~/.config/Caprine/. I tried your solution by removing the file from the directory in ~/snap, but it didn't solved the problem - it recreates the file and causes EPERM error anyway. Are you sure it solves the problem? Am I doing something wrong?

@tdislay
Copy link

tdislay commented Aug 29, 2019

I don't know, for me it worked, I installed it on archlinux with an AUR helper (yay), I downloaded the pkgbuild and updated it (to download the latest version, the pgkbuild file was outdated)
I removed the file (but saw that the group's file was "1001", so I changed it too, and it worked)

I don't know if you're doing wrong..
Try to directly change owner, and group of the file recursively (there should be a -R option with chown and chgrp) ?

@jackwilsdon
Copy link

That sounds like you're not using a snap package at all @Remyks — this is specifically an issue with the snap package.

@tdislay
Copy link

tdislay commented Aug 29, 2019

Hmm .. do not know, but the issue is EXACTLY the same, I've just done : "sudo chgrp 1001 .config/Caprine/config.json" and this is what I get :

A JavaScript error occurred in the main process
Uncaught Exception:
Error: EPERM: operation not permitted, chown '/home/skymer/.config/Caprine/config.json.2941600533'
at Object.chownSync (fs.js:1104:3)
at Function.writeFileSync [as sync] (/usr/lib/caprine/node_modules/conf/node_modules/write-file-atomic/index.js:196:27)
at ElectronStore.set store [as store] (/usr/lib/caprine/node_modules/conf/index.js:277:19)
at ElectronStore.set (/usr/lib/caprine/node_modules/conf/index.js:152:14)
at updateVibrancySetting (/usr/lib/caprine/dist-js/config.js:155:15)
at migrate (/usr/lib/caprine/dist-js/config.js:165:5)
at Object. (/usr/lib/caprine/dist-js/config.js:168:1)
at Module._compile (internal/modules/cjs/loader.js:786:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
at Module.load (internal/modules/cjs/loader.js:645:32)

What is the output if you do "ls -l" on the config file ?

PS : My bad, I didn't read the title "From snap on ubuntu"

@tdislay
Copy link

tdislay commented Aug 29, 2019

Maybe, could you try chmod a+r Caprine/config.json (don't know the exact path of config.json, but you have just to replace it) ?

@skiwichu
Copy link

skiwichu commented Sep 5, 2019

snap revert caprine to the version 2.36 solves the problem only partially. When you suspend your device, Caprine 2.36 crashes.

This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /snap/caprine/27/gnome-platform/usr/share/icons/Humanity/status/16/image-missing.svg: Unable to load image-loading module: /snap/caprine/28/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /snap/caprine/28/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: cannot open shared object file: No such file or directory (gdk-pixbuf-error-quark, 5)
Aborted (core dumped)```

@PiotrDabrowskey
Copy link

@skiwichu I have this problem without suspending the device. To me it looks like a separate from this one. I've reported it as #1071.

@atais
Copy link

atais commented Sep 6, 2019

Download the snap locally and then snap install filename - - dangerous
maybe it will help

@skiwichu
Copy link

skiwichu commented Sep 6, 2019

@atais weird. I will test it.

@sindresorhus
Copy link
Owner

sindresorhus commented Sep 9, 2019

The latest version has a workaround for the Snap issue: https://github.com/sindresorhus/caprine/releases/tag/v2.38.0 Can people try it out and report back?

@skiwichu
Copy link

skiwichu commented Sep 9, 2019

At first sight, it looks like it's working.

@jackwilsdon
Copy link

Yeah this looks fixed since v2.38.0, cheers @sindresorhus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests