Somewhat related to the message above. I've been j...
# apollo-kotlin
s
Somewhat related to the message above. I've been just using the latest snapshot of the IDE plugin as a consequence of trying to work around the issue above. However now when using 4.3.2-SNAPSHOT.2025-07-27.7a171f0 all of my GQL files are basically red. I of course don't expect every snapshot build to be perfect, but would you say that it's expected that snapshot builds don't necessarily always work, since you may be in the middle of fixing between days or stuff like that? I can just revert to not using the snapshots and wait for the real release of the fix of the bug above if so, it would not be a problem for me. Just asking to know what the expectations are from the snapshot builds.
b
Sorry about that - no, it should work as far as I know πŸ™‚ What do you see in the GraphQL tool window?
s
Do you perhaps mean in this window down here?
b
yes exactly - that almost looks good, except "6 types"... that doesn't seem right, your schema has more than 6 types
s
That is indeed true πŸ˜„
b
can you try a Gradle sync
loading 1
(I have your project open here and no red 😬)
s
Yeah same result. Oh really? Okay I will try to disable and enable the plugin πŸ‘€
b
maybe wait a bit for the gradle tasks to be executed... sorry there's no indicator for them though... except monitoring the AS logs
oh wait a minute, it may work on my end because of a cache - I do see issues in the logs
Gradle doctor complaining about
JAVA_HOME
(you warned about that).
s
Yeah, if you can do this, it works.
If you don't have JAVA_HOME setup, I don't know ngl πŸ˜…
b
I do have a JAVA_HOME though πŸ€”
do you see any exceptions in the AS logs? (Help | Show Logs in Finder)
s
I do see this at one point:
Copy code
2025-07-29 14:51:34,914 [ 126559]   WARN - Apollo - Could not instantiate KotlinFindUsagesHandlerFactory
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.apollographql.ijplugin.navigation.compat.KotlinFindUsagesHandlerFactoryCompat.<init>(KotlinFindUsagesHandlerFactoryCompat.kt:26)
	at com.apollographql.ijplugin.inspection.ApolloUnusedOperationInspectionKt.isUnusedOperation(ApolloUnusedOperationInspection.kt:41)
	at com.apollographql.ijplugin.inspection.ApolloUnusedFieldInspection$buildVisitor$1.visitIdentifier(ApolloUnusedFieldInspection.kt:47)
	at com.intellij.lang.jsgraphql.psi.impl.GraphQLIdentifierImpl.accept(GraphQLIdentifierImpl.java:20)
	at com.intellij.lang.jsgraphql.psi.impl.GraphQLIdentifierImpl.accept(GraphQLIdentifierImpl.java:25)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner$InspectionProblemHolder.visitElement(InspectionRunner.java:587)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processContext$19(InspectionRunner.java:414)
	at com.intellij.codeInsight.daemon.impl.InspectionVisitorOptimizer.acceptElements(InspectionVisitorOptimizer.java:207)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.processContext(InspectionRunner.java:412)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$7(InspectionRunner.java:179)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction$lambda$11(AnyThreadWriteThreadingSupport.kt:522)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:522)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1064)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$executeInImpatientReadAction$16(InspectionRunner.java:393)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:158)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:150)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$executeInImpatientReadAction$17(InspectionRunner.java:384)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:129)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:118)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.executeInImpatientReadAction(InspectionRunner.java:384)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$8(InspectionRunner.java:173)
	at com.intellij.concurrency.ApplierCompleter.processArrayItem(ApplierCompleter.java:121)
	at com.intellij.concurrency.ApplierCompleter.processArray(ApplierCompleter.java:205)
	at com.intellij.concurrency.ApplierCompleter.helpOthers(ApplierCompleter.java:225)
	at com.intellij.concurrency.ApplierCompleter.helpAll(ApplierCompleter.java:183)
	at com.intellij.concurrency.ApplierCompleter.lambda$exec$0(ApplierCompleter.java:111)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction$lambda$11(AnyThreadWriteThreadingSupport.kt:522)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:522)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1064)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$2(ApplierCompleter.java:153)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:680)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:755)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:711)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:77)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:164)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapAndRun$1(ApplierCompleter.java:145)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:197)
	at com.intellij.concurrency.ApplierCompleter.wrapAndRun(ApplierCompleter.java:145)
	at com.intellij.concurrency.ApplierCompleter.exec(ApplierCompleter.java:113)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: com.intellij.openapi.progress.ProcessCanceledException
	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:174)
	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:164)
	at com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator.checkCanceled(DaemonProgressIndicator.java:118)
	at com.intellij.openapi.progress.util.ProgressWrapper.checkCanceled(ProgressWrapper.java:84)
	at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:336)
	at com.intellij.openapi.vfs.CompactVirtualFileSet$2.findNext(CompactVirtualFileSet.java:373)
	at com.intellij.openapi.vfs.CompactVirtualFileSet$2.hasNext(CompactVirtualFileSet.java:365)
	at java.base/java.util.AbstractSet.hashCode(Unknown Source)
	at com.intellij.psi.search.AbstractFilesScope.calcHashCode(AbstractFilesScope.java:57)
	at com.intellij.psi.search.SearchScope.hashCode(SearchScope.java:34)
	at java.base/java.util.HashMap.hash(Unknown Source)
	at java.base/java.util.HashMap.put(Unknown Source)
	at java.base/java.util.HashSet.add(Unknown Source)
	at com.intellij.util.containers.ContainerUtil.addIfNotNull(ContainerUtil.java:2752)
	at com.intellij.psi.search.PredefinedSearchScopeProviderImpl$ScopeCollectionContext$Companion.addRecentlyModifiedFilesScope(PredefinedSearchScopeProviderImpl.kt:280)
	at com.intellij.psi.search.PredefinedSearchScopeProviderImpl$ScopeCollectionContext$Companion.addCommonScopes(PredefinedSearchScopeProviderImpl.kt:224)
	at com.intellij.psi.search.PredefinedSearchScopeProviderImpl$ScopeCollectionContext$Companion.collectContext(PredefinedSearchScopeProviderImpl.kt:196)
	at com.intellij.psi.search.PredefinedSearchScopeProviderImpl.getPredefinedScopes(PredefinedSearchScopeProviderImpl.kt:62)
	at com.intellij.find.findUsages.FindUsagesOptions.findScopeByName(FindUsagesOptions.java:43)
	at com.intellij.find.findUsages.FindUsagesOptions.<init>(FindUsagesOptions.java:32)
	at com.intellij.find.findUsages.FindUsagesOptions.<init>(FindUsagesOptions.java:28)
	at com.intellij.find.findUsages.PersistentFindUsagesOptions.<init>(PersistentFindUsagesOptions.java:13)
	at com.intellij.find.findUsages.JavaFindUsagesOptions.<init>(JavaFindUsagesOptions.java:21)
	at com.intellij.find.findUsages.JavaVariableFindUsagesOptions.<init>(JavaVariableFindUsagesOptions.java:31)
	at com.intellij.find.findUsages.JavaFindUsagesHandlerFactory.<init>(JavaFindUsagesHandlerFactory.java:29)
	at org.jetbrains.kotlin.idea.base.searching.usages.KotlinFindUsagesHandlerFactory.<init>(KotlinFindUsagesHandlerFactory.kt:22)
b
not cool - but probably unrelated
s
I do have a JAVA_HOME though
And is it setup in your IDE settings for that project like the picture shows? Otherwise you can also try to remove the doctor plugin completley tbh. Maybe I should do it, I was not the one who set it up, and I legit don't know what that does besides complain about JAVA_HOME :D
b
yes it shows in the IDE settings - but good idea I'll remove it to see if I can repro
s
Sorry about the inconvenience. One day our repo will truly be ready to do "clone -> build". One day πŸ˜…
b
no worry at all. Your project is already infinitely more useful to repro issues than most πŸ™‚
Yeah it took a few minutes but it worked here.
can you add
Apollo
in Help | Diagnostic Tools | Debug Log settings, and do a sync again and see if you see a bunch of
Fetch tooling model for
lines in the logs.
s
And to confirm, I should be looking into idea.log, correct? From: "Help | Show log in finder" Not getting any hits for "Fetch tooling model for"
So you are saying that this works for you on my project, correct?
b
> And to confirm, I should be looking into idea.log, correct? βœ… > Not getting any hits for "Fetch tooling model for" 😞 That's after adding
Apollo
to the log settings and re-sync, right? > So you are saying that this works for you on my project, correct? βœ…
s
Yes like this, does this look correct?
Also double checking. I am on plugin
4.3.2-SNAPSHOT.2025-07-27.7a171f0
, and on:
Copy code
Android Studio Narwhal Feature Drop | 2025.1.2 Canary 9
Build #AI-251.26094.121.2512.13760328, built on July 10, 2025
If all looks good on your end, I will just attribute this to dark magic, and wait for my IDE to remember what it's like to work properly πŸ˜„
b
Setting and Plugin version βœ… AS Version: I'm trying with the latest stable. Let me try with the Canary πŸ™‚
Looks like it's working for me with the latest Canary too
mysterious
s
Yeah nevermind then. It must be something on my end. If it doesn't resolve itself eventually I will try to nuke whatever caches or whatever I find πŸ˜„ Thanks a lot for the support!
b
Sure thing. Yeah let me know if this persists.