I used to have a working installation of bloop up-to milestone 1.0.0-M10 of the plugin.
I didn't use it for about 1 month and I tried today and to my dismay found that it doesn't work as it used to.
I installed it using brew and kept it up-to-date and the server worked as a registered service using brew services start bloop.
Now, even though brew seem to confirm the server is running, if I run the client (I upgraded the sbt version to latest) I get the usual error message for no server running.
Everything works if I manually run bloop server from the shell, so it must be something related to the brew service.
I tried reinstalling with brew from scratch with no avail. I also found something unusual: I have no $HOME/.bloop folder, though I would expect one to exist from reading the docs.
brew installed the bloop script under /usr/local/bin if it might help
Could this be a duplicate of #596? Apparently reinstallation of Bloop helped in that case. Either way it would be nice to fix this, or at least add some warning/FAQ entry/doc for other users running into this problem.
I think the problem has to do with write permissions to log directory.
I chmod 777 /usr/local/Cellar/bloop/1.0.0/log/bloop/ and it solved the problem.
Thanks @mchataigner
log subfolderbrew reinstall)it seemed that ~/.bloop directory was missing and I had a ~/.bloop-old (possibly my own backup I forgot?)
after some fiddling, I managed to figure out that now bloop only works in the folder with a bloop project, because it look for the .bloop folder in the PWD
Is this how it's supposed to work and I missed this change along the way?
Or is there some underlying problem going on?
Hey @ivanopagano, that鈥檚 the way it鈥檚 supposed to work, bloop cannot work without knowing where to find the configuration files. However you can also point bloop to the folder that contains the files directly with 鈥攃onfig-dir.
The permissions problem will be fixed tomorrow when I鈥檒l cut a new release. It鈥檚 already ficed in master.
Thanks, don't know why I thought it would work any other way. I can confirm that changing the rights, +rw is enough, will solve
Apparently the owner is wrong (it's root instead of your normal user) so using chown instead of chmod 777 is a much more secure workaround :wink:
Yeah, that would be a better solution, PR welcome :wink: This is already fixed in scalacenter/homebrew-bloop (which is usually updated automatically on every release, but this time I decided to push it directly to avoid doing a new release). Therefore, I'm closing.
@falconepl was working on this during last Scala Spree, but apparently he didn't finish it so I guess I'll try to fix it instead. We really shouldn't do chmod 777 as it's a security risk - some users might be very unhappy about this.
@tues Yes, I've looked at this issue during Scala Spree. I haven't finished then, as I wanted to make sure that I understand how Homebrew handles basic routines. I can send you a PR that addresses the issue by changing the ownership. Is that fine or have you found some better approach @tues?
When it comes to chmod 777 - yeah, that looks like a rather suboptimal solution.
@falconepl That would be great! chown should be good enough, thank you very much :slightly_smiling_face: I've created a separate issue: #646.
Sorry, but the updated formula still doesn't work for me (install doesn't create log directory, it's created when doing brew services start bloop, but still with wrong owner/permissions). Details in #646. Can anyone confirm this?
^ Here is a fix which works for me and doesn't involve chmod. However, it's still quite fragile: if someone removes these log files manually and then restarts Bloop using launchctl (or brew services), they'll be recreated with wrong owner.
Most helpful comment
I think the problem has to do with write permissions to log directory.
I
chmod 777 /usr/local/Cellar/bloop/1.0.0/log/bloop/and it solved the problem.