Open shihanMS opened 3 weeks ago
Thanks for reporting, @shihanMS!
A few questions:
Which SDK have you set in your IDE in the Project Settings?
corretto 17
Is your MacOS based on Intel or Apple Silicon chipset?
We run github actions using macos-latest
, and it is based on Apple Silicon (M1). However, we also reproduce this error on mac mini based on 3 GHz 6-Core Intel Core i5
Thanks for your reply @hsz , if need any other information please let me know.
Which task is failing for you, runIde
or buildSearchableOptions
?
Please register and call the following task so we'll see what IntelliJ Platform distribution you use:
tasks.register("printInfo") {
val data = provider {
intellijPlatform.productInfo.launch.joinToString(";") { "os=${it.os} arch=${it.arch}" }
}
doLast {
println(data.get())
}
}
Test
we registered
> Configure project :
Kotlin DSL property assignment is an incubating feature.
Loading platform config from /Users/vscjava/repos/***
Setting ideVersion to 2024.1
Setting ideType to IC
Task :printInfo os=macOS, arch=amd64
Besides, we find some jna clues in logs, it seems there is dependency conflict, do not know if it helps:
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.Error:
There is an incompatible JNA native library installed on this system
Expected: 6.1.4
Found: 7.0.0
(at /Users/vscjava/.gradle/caches/transforms-3/a76f981706ac2d10c4f245ca617352c2/transformed/ideaIC-2024.1/lib/jna/amd64/libjnidispatch.jnilib).
To resolve this issue you may do one of the following:
- remove or uninstall the offending library
- set the system property jna.nosys=true
- set jna.boot.library.path to include the path to the version of the
jnidispatch library included with the JNA jar file you are using
at com.sun.jna.Native.<clinit>(Native.java:230)
at com.intellij.jna.JnaLoader.load(JnaLoader.java:19)
at com.intellij.jna.JnaLoader.isLoaded(JnaLoader.java:35)
To add some more facts:
net.java.dev.jna:jna:5.12.1
1.17.2
, the class loader of class com.sun.jna.Native
is com.intellij.util.lang.PathClassLoader
, when calling to getUris()
from this class loader, the output is below:
[..., file:/Users/vscjava/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/241.14494.240/181fa36f74690e64a81a8e06ceda9480d2a6c626/ideaIC-241.14494.240/lib/util-8.jar, ..., file:/Users/vscjava/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.12.1/b1e93a735caea94f503e95e6fe79bf9cdc1e985d/jna-5.12.1.jar]
2.0.1
, the class loader is same, and the order of above 2 jar files are exchanged like below
[...file:/Users/vscjava/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.12.1/b1e93a735caea94f503e95e6fe79bf9cdc1e985d/jna-5.12.1.jar, ..., file:/Users/vscjava/.gradle/caches/transforms-3/a76f981706ac2d10c4f245ca617352c2/transformed/ideaIC-2024.1/lib/util-8.jar]
util-8.jar
, I can find the classes from net.java.dev.jna:jna
@hsz Hope above information can help draw the conclusions.
What happened?
MacOS throw errors like
JNA library is not available
after upgrade to 2.x in IDEA Community 2024.1. However, it works well with pairs1.17.3, IC 2024.1
and2.x, IC 2023.3
. Similar problems with https://youtrack.jetbrains.com/issue/IJPL-1467/macOs-Could-not-initialize-class-com.intellij.ui.mac.foundation.Foundation-on-223.6160.11-build It also happens to windows with 2.x and IC 2024.2Relevant log output or stack trace
Steps to reproduce
Not able to provide whole build configuration, let me know if you need some extra information
Gradle IntelliJ Plugin version
2.x
Gradle version
8.2
Operating System
macOS
Link to build, i.e. failing GitHub Action job
No response