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

[IJ/AS plugin] Don't crash when ToolingModel method are not present #4942

Closed
Tracked by #4619
BoD opened this issue May 11, 2023 · 2 comments
Closed
Tracked by #4619

[IJ/AS plugin] Don't crash when ToolingModel method are not present #4942

BoD opened this issue May 11, 2023 · 2 comments
Assignees

Comments

@BoD
Copy link
Contributor

BoD commented May 11, 2023

Description

Got this crash:

org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: ServiceInfo.getEndpointUrl().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
	at org.gradle.tooling.model.internal.Exceptions.unsupportedMethod(Exceptions.java:33)
	at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:435)
	at jdk.proxy17/jdk.proxy17.$Proxy391.getEndpointUrl(Unknown Source)
	at com.apollographql.ijplugin.gradle.GradleToolingModelService.computeGraphQLProjectFiles$getGraphQLProjectFiles(GradleToolingModelService.kt:235)
	at com.apollographql.ijplugin.gradle.GradleToolingModelService.computeGraphQLProjectFiles(GradleToolingModelService.kt:244)
	at com.apollographql.ijplugin.gradle.GradleToolingModelService.access$computeGraphQLProjectFiles(GradleToolingModelService.kt:40)
	at com.apollographql.ijplugin.gradle.GradleToolingModelService$FetchToolingModelsTask.run(GradleToolingModelService.kt:187)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

This should be swallowed with a log instead, as this can normally happen when the tooling model evolves.

@BoD BoD self-assigned this May 11, 2023
@BoD BoD changed the title [IJ plugin] Don't crash when ToolingModel method are not present [IJ/AS plugin] Don't crash when ToolingModel method are not present May 11, 2023
@martinbonnin
Copy link
Contributor

This should be swallowed with a log instead, as this can normally happen when the tooling model evolves.

Just making sure I understand here. Is this happening when the AKIJP version is not matching the AKGP version? If that's the case, could we fail nicely and display a message to the user?

@BoD
Copy link
Contributor Author

BoD commented May 11, 2023

Just making sure I understand here. Is this happening when the AKIJP version is not matching the AKGP version?

Exactly. (but I need to dig a bit more because it happened to me while I was on main, so latest AKGP)

Could we fail nicely and display a message to the user?

Yes we could probably gently nudge that they should update AKIJP (although IJ itself already nudges about plugin updates, so would probably be a nice-to-have but not very high priority)

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

No branches or pull requests

2 participants