javaplayframeworkmacos-catalinaadoptopenjdkjnotify

Error when trying to run a Play Scala app with sbt after fresh install on Catalina: "Error loading JNotify watch service: null"


After moving to Catalina and re-installing everything, no way to run my Play Scala app.

After doing sbt then run, I get this error:

[warn] Error loading JNotify watch service: null

Everything was installed with brew from this brewfile (I didn't paste the complete file):

tap "AdoptOpenJDK/openjdk"

# Mac apps
cask "adoptopenjdk8"

brew "sbt@0.13"
brew "jenv"

Java version:

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

sbt: 0.13.18 play: 2.6.20 os x: 10.15.3 (19D76)


Solution

  • I can't technically explain why JNotify is not working well on your environment but I can definitely say it's linked to the latest update of openjdk8.

    So I succeeded to reproduce the issue with adoptopenjdk8 version 242, my workaround is to uninstall this version of openjdk and force brew to install a previous version (232) :

    brew cask install "https://raw.githubusercontent.com/AdoptOpenJDK/homebrew-openjdk/19d716f1c9ebc325ed23c5df580e0d2b027285a1/Casks/adoptopenjdk8.rb"