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

Forbidden to mutate SDK outside of the SdkModificator #3655

Open
gcb opened this issue Oct 7, 2024 · 5 comments
Open

Forbidden to mutate SDK outside of the SdkModificator #3655

gcb opened this issue Oct 7, 2024 · 5 comments

Comments

@gcb
Copy link

gcb commented Oct 7, 2024

Describe the bug
Cannot select detected SDK from new project dropdown, nor select the directory.

throws:

SEVERE - #c.i.o.p.i.ProjectJdkImpl - Forbidden to mutate SDK outside of the SdkModificator. Please, use com.intellij.openapi.projectRoots.Sdk.getSdkModificator
SEVERE - #c.i.o.p.i.ProjectJdkImpl - Plugin to blame: Elixir version: 19.0.

To Reproduce
Steps to reproduce the behavior:

  1. Install clean idea community edition
  2. on WelcomeScreen, install plugin from marketplace.
  3. optionally restart idea.
  4. again on welcomeScreen, create new Elixir project.
  5. select the detected elixir SDK from drop down.

Expected behavior
New project

Screenshots
n/a

Logs

2024-10-07 17:45:54,619 [   7085] SEVERE - #c.i.o.p.i.ProjectJdkImpl - Forbidden to mutate SDK outside of the `SdkModificator`. Please, use `com.intellij.openapi.projectRoots.Sdk.getSdkModificator`
java.lang.Throwable: Forbidden to mutate SDK outside of the `SdkModificator`. Please, use `com.intellij.openapi.projectRoots.Sdk.getSdkModificator`
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
        at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.setHomePath(ProjectJdkImpl.java:122)
        at org.elixir_lang.sdk.elixir.Type$Companion.createDefaultErlangSdk(Type.kt:474)
        at org.elixir_lang.sdk.elixir.Type$Companion.createDefaultErlangSdk(Type.kt:495)
        at org.elixir_lang.sdk.elixir.Type$Companion.defaultErlangSdk(Type.kt:513)
        at org.elixir_lang.sdk.elixir.Type$Companion.configureInternalErlangSdk(Type.kt:341)
        at org.elixir_lang.sdk.elixir.Type$Companion.configureSdkPaths(Type.kt:333)
        at org.elixir_lang.sdk.elixir.Type$Companion.access$configureSdkPaths(Type.kt:251)
        at org.elixir_lang.sdk.elixir.Type.setupSdkPaths(Type.kt:188)
        at com.intellij.openapi.projectRoots.SdkType.setupSdkPaths(SdkType.java:125)
        at com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectSdksModel.lambda$setupSdk$10(ProjectSdksModel.java:533)
        at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:328)
        at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:567)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:85)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
        at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
        at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
        at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
        at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
        at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
        at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
        at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
        at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
        at java.base/java.lang.Thread.run(Thread.java:1583)
2024-10-07 17:45:54,628 [   7094] SEVERE - #c.i.o.p.i.ProjectJdkImpl - IntelliJ IDEA 2024.2.3  Build #IC-242.23339.11
2024-10-07 17:45:54,628 [   7094] SEVERE - #c.i.o.p.i.ProjectJdkImpl - JDK: 21.0.4; VM: OpenJDK 64-Bit Server VM; Vendor: Arch Linux
2024-10-07 17:45:54,628 [   7094] SEVERE - #c.i.o.p.i.ProjectJdkImpl - OS: Linux
2024-10-07 17:45:54,629 [   7095] SEVERE - #c.i.o.p.i.ProjectJdkImpl - Plugin to blame: Elixir version: 19.0.1
2024-10-07 17:45:54,629 [   7095] SEVERE - #c.i.o.p.i.ProjectJdkImpl - Last Action: WelcomeScreen.CreateNewProject
2024-10-07 17:45:54,659 [   7125] SEVERE - #c.i.o.p.Task - current thread is not owner
java.lang.IllegalMonitorStateException: current thread is not owner
        at java.base/java.lang.Object.notify(Native Method)
        at org.elixir_lang.jps.HomePath.eachEbinPath(HomePath.java:50)
        at org.elixir_lang.sdk.Type.addCodePaths(Type.kt:14)
        at org.elixir_lang.sdk.erlang.Type.setupSdkPaths(Type.kt:119)
        at org.elixir_lang.sdk.elixir.Type$Companion.createDefaultErlangSdk(Type.kt:475)
        at org.elixir_lang.sdk.elixir.Type$Companion.createDefaultErlangSdk(Type.kt:495)
        at org.elixir_lang.sdk.elixir.Type$Companion.defaultErlangSdk(Type.kt:513)
        at org.elixir_lang.sdk.elixir.Type$Companion.configureInternalErlangSdk(Type.kt:341)
        at org.elixir_lang.sdk.elixir.Type$Companion.configureSdkPaths(Type.kt:333)
        at org.elixir_lang.sdk.elixir.Type$Companion.access$configureSdkPaths(Type.kt:251)
        at org.elixir_lang.sdk.elixir.Type.setupSdkPaths(Type.kt:188)
        at com.intellij.openapi.projectRoots.SdkType.setupSdkPaths(SdkType.java:125)
        at com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectSdksModel.lambda$setupSdk$10(ProjectSdksModel.java:533)
        at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:328)
        at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:567)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:85)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
        at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
        at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
        at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
        at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
        at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
        at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
        at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
        at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
        at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
        at java.base/java.lang.Thread.run(Thread.java:1583)
2024-10-07 17:45:54,660 [   7126] SEVERE - #c.i.o.p.Task - IntelliJ IDEA 2024.2.3  Build #IC-242.23339.11
2024-10-07 17:45:54,660 [   7126] SEVERE - #c.i.o.p.Task - JDK: 21.0.4; VM: OpenJDK 64-Bit Server VM; Vendor: Arch Linux
2024-10-07 17:45:54,660 [   7126] SEVERE - #c.i.o.p.Task - OS: Linux
2024-10-07 17:45:54,660 [   7126] SEVERE - #c.i.o.p.Task - Plugin to blame: Elixir version: 19.0.1
2024-10-07 17:45:54,661 [   7127] SEVERE - #c.i.o.p.Task - Last Action: WelcomeScreen.CreateNewProject

Desktop:
Operating System: Arch Linux
Kernel Version: 6.11.1-arch1-1 (64-bit)

Erlang:

  • Installer: distro
  • Version: erlang-nox 27.1-1

Elixir:

  • Installer: distro
  • Version: elixir 1.17.3-1

Plugin:

  • Version: 19.0.1

Additional context
n/a

@joshuataylor
Copy link
Collaborator

Which IDE?

@gcb
Copy link
Author

gcb commented Oct 8, 2024

My bad. I think i forgot to paste this block:

IntelliJ IDEA 2024.2.3 (Community Edition)
Build #IC-242.23339.11, built on September 28, 2024
Runtime version: 21.0.4+7 amd64
VM: OpenJDK 64-Bit Server VM by Arch Linux
Toolkit: sun.awt.X11.XToolkit
Linux 6.11.2-arch1-1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3926M
Cores: 12
Registry:
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  Dart (242.22855.32)
  org.elixir_lang (19.0.1)
  IdeaVIM (2.16.0)
  org.jetbrains.android (242.23339.11)
  com.android.tools.design (242.23339.11)
  io.flutter (81.1.3)
Kotlin: 242.23339.11-IJ
Current Desktop: KDE

@joshuataylor
Copy link
Collaborator

Thanks! I'll see what's going on.

@Fgabz
Copy link

Fgabz commented Oct 21, 2024

Hello 👋 ,

any update, or any workaround ?

Edit: Bug on IntellIj Ultimate but plugin works with Webstorm (2024.2.2)

@joshuataylor
Copy link
Collaborator

joshuataylor commented Oct 21, 2024 via email

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

3 participants