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

macOS Catalina Clion 2019.2.1 java exertion after install at startup #5

Closed
csitarichie opened this issue Aug 30, 2019 · 8 comments
Closed
Assignees

Comments

@csitarichie
Copy link

csitarichie commented Aug 30, 2019

Plugin 'artsiomch.cmake.plus' failed to initialize and will be disabled. Please restart CLion.

java.lang.RuntimeException: java.io.IOException: Cannot run program ""/Users/csita/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/192.6262.62/CLion.app/Contents/jbr/Contents/Home/bin/java"": error=2, No such file or directory
    at org.avaje.agentloader.AgentLoader.loadAgent(AgentLoader.java:92)
    at org.avaje.agentloader.AgentLoader.loadAgent(AgentLoader.java:70)
    at com.cmakeplugin.agent.CMakeInstrumentationUtils.patchJBclasses(CMakeInstrumentationUtils.java:69)
    at com.cmakeplugin.CMakePlusComponent.initComponent(CMakePlusComponent.java:25)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:503)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:126)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$load$7(ApplicationImpl.java:414)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:414)
    at com.intellij.idea.IdeaApplication.lambda$executeInitAppInEdt$5(IdeaApplication.java:150)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:377)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.io.IOException: Cannot run program ""/Users/csita/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/192.6262.62/CLion.app/Contents/jbr/Contents/Home/bin/java"": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
    at org.avaje.agentloader.load.ExternalLoader.loadAgent(ExternalLoader.java:94)
    at org.avaje.agentloader.AgentLoader.loadAgent(AgentLoader.java:86)
    ... 27 more
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
    ... 30 more
@ArtsiomCh ArtsiomCh self-assigned this Aug 31, 2019
@ArtsiomCh
Copy link
Owner

Hi Richard. Thanks for reporting. Just tried the same CLion build 192.6262.62 on my Linux and everything works. Unfortunately, I have no access to any Mac to reproduce the issue.
From the exception stack trace, it looks like the problem happens inside https://github.com/avaje-common/avaje-agentloader library I've used.
Could you please send me idea.log file for your CLion?
Not sure where its located in Mac, in Linux its located at {home_dir}/.CLion2019.2/system/log/ That articles should help you to locate it:
https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files
https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
Most likely it's something like ~/Library/Logs/CLion2019.2

@ArtsiomCh
Copy link
Owner

Looks like java executable can't be found by AgentLoader.
Could you please go into the directory:
/Users/csita/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/192.6262.62/
And check if next path and file exist CLion.app/Contents/jbr/Contents/Home/bin/java ?
That path looks a bit weird for me... Don't know how it's organized on macOS but on Linux, it's much simpler: jbr/bin/java

@csitarichie
Copy link
Author

csitarichie commented Aug 31, 2019

I have checked : the java runtime in path
/Users/csita/Library/Application\ Support/JetBrains/Toolbox/apps/CLion/ch-0/192.6262.62/CLion.app/Contents/jbr/Contents/Home/bin/java

exist and can be executed in command line: see output in terminal

⌨️  09:12 csita@dem-rzabo-mbp:# /Users/csita/Library/Application\ Support/JetBrains/Toolbox/apps/CLion/ch-0/192.6262.62/CLion.app/Contents/jbr/Contents/Home/bin/java --version
openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+12-b304.39)
OpenJDK 64-Bit Server VM (build 11.0.3+12-b304.39, mixed mode)

But there is a space in the directory path Application Support Which needs to be escaped I'm not familiar with the java os path implementation that the quotes are enough or you need special escape in the path sequence.

But this error might be related to that ...

@csitarichie
Copy link
Author

Hi Richard. Thanks for reporting. Just tried the same CLion build 192.6262.62 on my Linux and everything works. Unfortunately, I have no access to any Mac to reproduce the issue.
From the exception stack trace, it looks like the problem happens inside https://github.com/avaje-common/avaje-agentloader library I've used.
Could you please send me idea.log file for your CLion?
Not sure where its located in Mac, in Linux its located at {home_dir}/.CLion2019.2/system/log/ That articles should help you to locate it:
https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files
https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
Most likely it's something like ~/Library/Logs/CLion2019.2

Here is a log form startup with plugin enabled and after that plugin disabled :

idea_cmake_plus_enable_startup.log.zip

BTW in Clion->help->Show log in Finder menu which points you to the IDEA log location.

I'm happy to assist you fixing this issue
and thanks for the support so far

@ArtsiomCh
Copy link
Owner

ArtsiomCh commented Aug 31, 2019

Yes, you're right. Problem with space symbol. I'm now able to reproduce the issue on my Linux PC too. Looks like quotation doesn't help. Will try to create a patch to the avaje-agentloader library and rebuild the plugin withing few days.
Thank you for your observation and log file, that helps a lot!

PS Shame on Apple developers for putting spaces into the path... Special tank in the Hell should be reserved for that... ;)

@ArtsiomCh
Copy link
Owner

@csitarichie try this beta https://github.com/ArtsiomCh/CMake/releases/download/192.2.dev3/CMake-plus-192.2.dev3.jar
Works on my Linux. Let me know please if issue fixed on your Mac.

@csitarichie
Copy link
Author

@csitarichie try this beta https://github.com/ArtsiomCh/CMake/releases/download/192.2.dev3/CMake-plus-192.2.dev3.jar
Works on my Linux. Let me know please if issue fixed on your Mac.

I can confirm that this fix is working on my Setup as well macOS Catalina with jentbrains toolbox install.

Thanks for the quick response.

@ArtsiomCh
Copy link
Owner

Fixed at 192.2.1

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

No branches or pull requests

2 participants