Cannot start application with profiler on MacOS Catalina

Questions about YourKit Java Profiler
Post Reply
SandroG
Posts: 4
Joined: Mon Dec 16, 2019 2:21 pm

Cannot start application with profiler on MacOS Catalina

Post by SandroG »

Hi, unfortunately I cannot start application with profiler, and cannot connect to a local app with the profiler without starting the app with the profiler.

MacOS Catalina 10.15 and am trying to profile a Java/Scala application, using AdoptOpenJDK 12.

The error I get is:

Code: Select all

 Error occurred during initialization of VM
Could not find agent library /Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib in absolute path, with error: dlopen(/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib, 1): no suitable image found. Did find:
/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib: code signature in (/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib) not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs
See more details here: https://youtrack.jetbrains.com/issue/ID ... 859478.0-0

Thanks!
SandroG
Posts: 4
Joined: Mon Dec 16, 2019 2:21 pm

Re: Cannot start application with profiler on MacOS Catalina

Post by SandroG »

This is with YourKit 2019-8-b127 (unfortunately I cannot seem to edit my initial post).
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Cannot start application with profiler on MacOS Catalina

Post by Vladimir Kondratyev »

- Can you start profiler UI on your mac?

- What is the output of command

Code: Select all

java -agentpath:/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib -version
Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
SandroG
Posts: 4
Joined: Mon Dec 16, 2019 2:21 pm

Re: Cannot start application with profiler on MacOS Catalina

Post by SandroG »

Vladimir Kondratyev wrote:- Can you start profiler UI on your mac?

- What is the output of command

Code: Select all

java -agentpath:/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib -version
Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Hi,

yes, the Profiler UI works perfectly well and I can normally profile remote servers with no issues at all.

The output of the command is:

Code: Select all

$ java -agentpath:/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib -version
Error occurred during initialization of VM
Could not find agent library /Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib in absolute path, with error: dlopen(/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib, 1): no suitable image found.  Did find:
	/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib: code signature in (/Applications/YourKit-Java-Profiler-2019.8.app/Contents/Resources/bin/mac/libyjpagent.dylib) not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs
I have also tried deleting and reinstalling YourKit Profiler 2019.8-b127, with the same results.

Thanks!
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Cannot start application with profiler on MacOS Catalina

Post by Vladimir Kondratyev »

I suppose that problem is in Adopt JDK, not in YourKit profiler library. Please give us URL where we can download exact JDK which you are using.

Do you have the same issue with Open JDK or Oracle JDK? Please try.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
SandroG
Posts: 4
Joined: Mon Dec 16, 2019 2:21 pm

Re: Cannot start application with profiler on MacOS Catalina

Post by SandroG »

Vladimir Kondratyev wrote:I suppose that problem is in Adopt JDK, not in YourKit profiler library. Please give us URL where we can download exact JDK which you are using.

Do you have the same issue with Open JDK or Oracle JDK? Please try.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Hi,

thank you for the help - the issue was indeed with AdoptOpenJDK 12 installed using brew cask: After updating to AdoptOpenJDK 13, and setting it as the active JDK in IntelliJ IDEA, the issue disappeared and profiling now works.

Thanks!
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Cannot start application with profiler on MacOS Catalina

Post by Anton Katilin »

Thank you for sharing the solution.
Post Reply