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

v5 is not working with SNAP #63

Closed
p3x-robot opened this issue Jun 24, 2019 · 6 comments
Closed

v5 is not working with SNAP #63

p3x-robot opened this issue Jun 24, 2019 · 6 comments

Comments

@p3x-robot
Copy link

patrikx3@bitang:~$ /snap/bin/p3x-onenote 
A JavaScript error occurred in the main process
Uncaught Exception:
Error: EPERM: operation not permitted, chown '/home/patrikx3/snap/p3x-onenote/21/.config/configstore/p3x-onenote.json.994378042'
    at Object.chownSync (fs.js:1064:3)
    at Function.writeFileSync [as sync] (/snap/p3x-onenote/21/resources/app.asar/node_modules/write-file-atomic/index.js:196:27)
    at Configstore.set all [as all] (/snap/p3x-onenote/21/resources/app.asar/node_modules/configstore/index.js:61:20)
    at Configstore.set (/snap/p3x-onenote/21/resources/app.asar/node_modules/configstore/index.js:91:12)
    at Object.<anonymous> (/snap/p3x-onenote/21/resources/app.asar/src/electron/app.js:56:10)
    at Object.<anonymous> (/snap/p3x-onenote/21/resources/app.asar/src/electron/app.js:111:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
/usr/share/libdrm/amdgpu.ids: No such file or directory

When I revert to configstore v4 and install on SNAP it works 100%.
With v5 it tries to chown a file, that is not permitted on SNAP.

@p3x-robot
Copy link
Author

of course this error is, that you cannot use chown in snap...

@p3x-robot
Copy link
Author

npm/write-file-atomic#49

@p3x-robot
Copy link
Author

p3x-robot commented Jun 24, 2019

https://github.com/yeoman/configstore/blame/764ac63d17de9e3d322c1c42180a8d5bec85391a/index.js#L14

that line would work like this:

const writeFileOptions = {mode: 0o0600, chown: false};

actually it is still not work, as if it is chown : false it will build the chown setting, there is no way to disable chown right now

@sindresorhus
Copy link
Owner

I think this could be fixed by switching to use https://github.com/fabiospampinato/atomically

@fregante
Copy link
Contributor

The linked issue has been closed (npm/write-file-atomic#49) and this issue can likely be closed too.

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

No branches or pull requests

3 participants