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

"Cannot resolve runtime with ideDir" #849

Closed
olance opened this issue Nov 28, 2021 · 12 comments
Closed

"Cannot resolve runtime with ideDir" #849

olance opened this issue Nov 28, 2021 · 12 comments
Assignees
Milestone

Comments

@olance
Copy link

olance commented Nov 28, 2021

Using plugin version 1.3.0 with Gradle 7.3, when I'm building my plugin I'm getting the following output during the buildSearchableOptions task:

> Task :buildSearchableOptions
[gradle-intellij-plugin :intellij-prisma:buildSearchableOptions] Cannot resolve runtime with ideDir='/Users/olance/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2020.1/cbeeb1f1aebd4c9ea8fb5ab990c5904a676fc41a/ideaIC-2020.1'

The path does exist, and in the end the build does succeed.

I'm also seeing this error during the same task:

Searchable options index builder completed
2021-11-28 22:18:22,724 [  19267]  ERROR - tellij.openapi.util.ObjectTree - Already shutdown 
java.util.concurrent.RejectedExecutionException: Already shutdown
	at com.intellij.util.concurrency.BoundedTaskExecutor.execute(BoundedTaskExecutor.java:133)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
	at com.intellij.openapi.vfs.impl.local.FileWatcher.setWatchRoots(FileWatcher.java:165)
	at com.intellij.openapi.vfs.impl.local.WatchRootsManager.updateFileWatcher(WatchRootsManager.java:151)
	at com.intellij.openapi.vfs.impl.local.WatchRootsManager.replaceWatchedRoots(WatchRootsManager.java:75)
	at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.replaceWatchedRoots(LocalFileSystemImpl.java:135)
	at com.intellij.openapi.vfs.LocalFileSystem.removeWatchedRoots(LocalFileSystem.java:91)
	at com.intellij.compiler.CompilerManagerImpl.lambda$new$0(CompilerManagerImpl.java:103)
	at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:111)
	at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:184)
	at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
	at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:95)
	at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:184)
	at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:134)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:116)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:106)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.dispose(ProjectManagerImpl.java:168)
	at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:111)
	at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:184)
	at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
	at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:95)
	at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:184)
	at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:134)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:116)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:106)
	at com.intellij.serviceContainer.ComponentManagerImpl.dispose(ComponentManagerImpl.kt:846)
	at com.intellij.openapi.application.impl.ApplicationImpl.dispose(ApplicationImpl.java:350)
	at com.intellij.openapi.util.ObjectNode.lambda$execute$0(ObjectNode.java:111)
	at com.intellij.openapi.util.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:184)
	at com.intellij.openapi.util.ObjectNode.execute(ObjectNode.java:71)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:134)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:116)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:106)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$disposeContainer$3(ApplicationImpl.java:181)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976)
	at com.intellij.openapi.application.impl.ApplicationImpl.disposeContainer(ApplicationImpl.java:179)
	at com.intellij.openapi.application.impl.ApplicationImpl.disposeSelf(ApplicationImpl.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:621)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:589)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:578)
	at com.intellij.ide.ui.search.TraverseUIStarter.main(TraverseUIStarter.java:81)
	at com.intellij.openapi.application.ApplicationStarter.main(ApplicationStarter.java:62)
	at com.intellij.idea.ApplicationLoader$startApp$8$1$1.run(ApplicationLoader.kt:228)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.idea.ApplicationLoader$startApp$8$1.run(ApplicationLoader.kt:227)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:310)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:80)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:128)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:184)
	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.defaultDispatchEvent(IdeEventQueue.java:974)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847)
	at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:739)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
	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)
2021-11-28 22:18:22,726 [  19269]  ERROR - tellij.openapi.util.ObjectTree - IntelliJ IDEA 2020.1  Build #IC-201.6668.121 
2021-11-28 22:18:22,726 [  19269]  ERROR - tellij.openapi.util.ObjectTree - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2021-11-28 22:18:22,726 [  19269]  ERROR - tellij.openapi.util.ObjectTree - OS: Mac OS X 

Since the build succeeds after this, I don't know what to make of it.
Should I just ignore those errors? Will my plugin be built but incorrectly so?

@lyhisproving
Copy link

same warning

@fan-tom
Copy link

fan-tom commented Dec 8, 2021

Same for me, but for :runIde task

@intgr
Copy link

intgr commented Dec 12, 2021

The output for me is

> Task :setupDependencies
> Task :patchPluginXml
> Task :processResources UP-TO-DATE
> Task :classes
> Task :instrumentCode
> Task :postInstrumentCode
> Task :jar
> Task :prepareSandbox

> Task :buildSearchableOptions FAILED
[gradle-intellij-plugin :mypy-pycharm:buildSearchableOptions] Cannot resolve runtime with ideDir='/home/XXX/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm/pycharmPC/2021.2.3/f1b19075625b582c9a33c480e64488645cc50a9/pycharmPC-2021.2.3'
Only one instance of PyCharm can be run at a time.   <-- (!!!!)
9 actionable tasks: 8 executed, 1 up-to-date

And also a pop-up window appears in the running IDE

image

@ZooDoz
Copy link

ZooDoz commented Dec 16, 2021

Same warning, but wait a few seconds it succeeded. Where is wrong

@YannCebron
Copy link
Member

YannCebron commented Jan 5, 2022

same with 2020.3.4

Gradle 7.3.3
gradle-intellij-plugin 1.3.0

> Task :runIde
[gradle-intellij-plugin :m68kplugin:runIde] Cannot resolve runtime with ideDir='/Users/yann/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2020.3.4/b86eac6c6a0550d0f4deca1e3592f7d675034e11/ideaIC-2020.3.4'

@gfleming1992
Copy link

Same here, is this a bug?

@nadia-tarashkevich
Copy link

nadia-tarashkevich commented Jan 19, 2022

I saw the same issue today.
S2R:

  1. Open project https://github.com/mcritic/IntelliJIdeaPluginExample from GitHub
  2. Build
  3. Add new "Run" configuration of the "Gradle" type.
  4. In the configuration properties, in "Run" section type "runIde" and click "OK"
  5. Try build and run.

The issue got resolved by itself then I opened a terminal and type "cd $FOLDER_FROM_THE_ERROR_MESSAGE". It is no longer reproduced for me.

Gradle bundled 213.6461.79, version 7.1
IntelliJ IDEA 2021.3.1 (Ultimate Edition)
Build #IU-213.6461.79, built on December 28, 2021
Runtime version: 11.0.13+7-b1751.21 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6.1

@fcurts
Copy link

fcurts commented Jan 20, 2022

I'm getting a hard error for task runPluginVerifier:

> Task :runPluginVerifier FAILED
[gradle-intellij-plugin :xxx:runPluginVerifier] Cannot resolve runtime with ideDir='/Users/xxx/ide/GO-2021.3.2'

Directory '/Users/xxx/ide/GO-2021.3.2' exists and contains an exploded GoLand.

This makes 1.3.1 unusable for me. 1.3.0 was unusable too, so I'm stuck on 1.2.1.

Gradle 7.3.3

PS: 1.2.1 prints the same "Cannot resolve runtime" message, but the :runPluginVerifier task nevertheless succeeds.

@hsz hsz added this to the next milestone Feb 9, 2022
@hsz
Copy link
Member

hsz commented Feb 9, 2022

Hey, folks! It turned out an incorrect log level was set – it should be debug instead of warning.
In general, JbrResolver searches for Java Runtime in several places and stops with the first non-null result.
For the cases when it's not available, the mentioned warning was printed.

I've moved that logging to the debug group – there's nothing you should worry about.
Sorry for this noise!

@hsz hsz closed this as completed Feb 9, 2022
@fcurts
Copy link

fcurts commented Feb 9, 2022

@hsz Why is it logging Cannot resolve runtime with ideDir='xxx' even though directory xxx exists and contains a complete exploded IntelliJ with jbr subdirectory?

Edit: Apparently, directory 'xxx' (created by gradle-intellij-plugin) contains a Linux IntelliJ distribution even though I'm on macOS (?!). Still, the log message is confusing.

@hsz
Copy link
Member

hsz commented Feb 10, 2022

@fcurts Your case was slightly different – but fixed. Thanks for reporting it in a separate issue!

Salomon88 pushed a commit to Salomon88/gradle-intellij-plugin that referenced this issue Feb 18, 2022
@intgr
Copy link

intgr commented Feb 20, 2022

For the record, the "Only one instance of PyCharm can be run at a time." message I had can be fixed by adding to build.gradle:

buildSearchableOptions.enabled = false

However if your plugin has any settings, it's not recommended to keep this in release builds.

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

10 participants