oni icon indicating copy to clipboard operation
oni copied to clipboard

Oni runs only as root on archlinux

Open daxid opened this issue 8 years ago • 10 comments

Hi, oni --debug reports the following error (with AUR package on Archlinux):

Uncaught (in promise) Error: watch /home/daxid/.config/oni ENOSPC
    at exports._errnoException (util.js:1024)
    at FSWatcher.start (fs.js:1394)
    at Object.fs.watch (fs.js:1420)
    at new _ (vendor.bundle.js:1)
    at O.addConfigurationFile (vendor.bundle.js:1)
    at O.start (vendor.bundle.js:1)
    at bundle.js:1
    at Generator.next (<anonymous>)
    at s (bundle.js:1)
    at <anonymous>

Runing it as root works fine... Any hint ? Best regards ++ David

daxid avatar May 01 '18 09:05 daxid

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar May 01 '18 09:05 oni-bot

Hello @daxid, what is the output of ls -al ~/.config/oni?

Seems like there is some issue with the file watcher, it can be a bug, limit of open file descriptors or disk size.

badosu avatar May 01 '18 10:05 badosu

@daxid @bryphe has recently added a config option to prevent the FSWatcher from being on by default till we work out all the kinks, but I believe the issue you're having is that your config is located in directory where the oni process does not have permission but it is attempting to watch the directory.

Re. solutions the filesystem watcher can take a configuration option (on the development side) to have it ignorePermissionErrors which we can set so it fails silently if it attempts to read a directory it doesn't have permissions for

akinsho avatar May 01 '18 10:05 akinsho

Thanks for your kind answers ! @badosu :

$ ls -al ~/.config/oni
total 20
drwx------  3 daxid users 4096  2 mai   16:44 .
drwxr-xr-x 64 daxid users 4096  2 mai   16:44 ..
drwx------  2 daxid users 4096  2 mai   16:44 GPUCache
-rw-------  1 daxid users   69  2 mai   16:44 Preferences
-rw-r--r--  1 daxid users  106  2 mai   16:44 Settings

I already suspected a permission pb so I did suppress this config folder so it is created anew when relaunching Oni, but no success... I also compared permissions with a working instance on another machine, they seem ok to me but still, oni shows only a black screen when launching and the OP error message when debugging... ++

daxid avatar May 02 '18 14:05 daxid

Well, there's no config.{j,t}s there. Perhaps there is some issue where Oni assumes the file should always be present.

If you run echo "module.exports = {}" > ~/.config/oni/config.js and run Oni as your user, does it work?

badosu avatar May 03 '18 12:05 badosu

Nope, still same symptoms with config.js present (detail of the permissions beneath).

$ ls -al ~/.config/oni
total 28
drwx------  4 daxid users 4096  3 mai   15:08  .
drwxr-xr-x 64 daxid users 4096  2 mai   16:44  ..
-rw-r--r--  1 daxid users   20  3 mai   15:08  config.js
drwx------  2 daxid users 4096  2 mai   16:44  GPUCache
drwx------  2 daxid users 4096  3 mai   15:08 'Local Storage'
-rw-------  1 daxid users  429  3 mai   15:08  Preferences
-rw-r--r--  1 daxid users  105  3 mai   15:08  Settings

daxid avatar May 03 '18 13:05 daxid

This is weird, permissions seem fine, except for group permissions but should not be an issue if processes are spawned with daxid user. Does not seem an issue with the presence of config.js as well.

Does this work for you: https://github.com/facebook/jest/issues/3254#issuecomment-297214395 seems like it's your case.

badosu avatar May 03 '18 13:05 badosu

FYI: I had similar issue (on ubuntu 16.04) when trying to run developmen build i.e. yarn run start and running command from linked issue echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p 'fixed' it for me.

dkns avatar May 16 '18 21:05 dkns

Ho, sorry for late feedback, I was away for a while. The proposed command indeed worked ! Thanks a lot @badosu !

I think I had other inotify related issues on my system (Nautilus file manager not updating folder content and stuff). Well, I'm so happy right now, I finally get to give Oni a shot !

daxid avatar May 17 '18 06:05 daxid

So, the issue here is with the inotify config, the workaround is to increase the file limit as per @dkns's comment.

We'll close this one, reopen if you think there's something we can do on Oni's side.

badosu avatar May 17 '18 13:05 badosu