apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.74k stars 653 forks source link

[IJ/AS plugin] Internal error: ClassCastException #5476

Open maliksaif070 opened 9 months ago

maliksaif070 commented 9 months ago

An internal error happened in the IDE plugin.

Message: Error executing task com.apollographql.ijplugin.project.ApolloProjectManagerListener$$Lambda$1533/0x00000008010c4288@42ebd1e

Stack trace

java.lang.ClassCastException: class com.apollographql.ijplugin.project.ApolloProjectServiceImpl cannot be cast to class com.apollographql.ijplugin.project.ApolloProjectService (com.apollographql.ijplugin.project.ApolloProjectServiceImpl is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @5fd76ebf; com.apollographql.ijplugin.project.ApolloProjectService is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @6e0f25c9)
    at com.apollographql.ijplugin.project.ApolloProjectServiceKt.getApolloProjectService(ApolloProjectService.kt:25)
    at com.apollographql.ijplugin.project.ApolloProjectManagerListener.projectOpened$lambda$0(ApolloProjectManagerListener.kt:23)
    at com.intellij.openapi.project.SmartModeScheduler.doRun(SmartModeScheduler.kt:124)
    at com.intellij.openapi.project.SmartModeScheduler.runAllWhileSmart(SmartModeScheduler.kt:117)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:454)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
    at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571)
    at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1444)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Environment

Additional information

BoD commented 9 months ago

Thanks for reporting this!

I haven't seen this one before. I am understanding you got this right after opening your project, is that correct? Do you get it consistently or was that a one time thing?

maliksaif070 commented 9 months ago

It was one time thing for now it appeared as soon i updated the latest Apollo plugin version on Android Studio.

BoD commented 9 months ago

I see. Likely related to the update process then. I'll see if I can reproduce it, thanks for the info!