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

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 https://github.com/sindresorhus/caprine/issues/1032 is back. 2.36.0 is not affected so the workaround is ‘snap revert caprine’

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 12
  • Comments: 18 (2 by maintainers)

Most upvoted comments

This is unfortunately blocked by https://github.com/npm/write-file-atomic/pull/51. This is really Snap’s fault as they don’t support a common method (chown).

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

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?

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

@skiwichu I have this problem without suspending the device. To me it looks like a separate from this one. I’ve reported it as https://github.com/sindresorhus/caprine/issues/1071.

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)```

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

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