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

[KSP2] A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction #1941

Closed
GuilhE opened this issue Jun 2, 2024 · 7 comments · Fixed by #2103
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@GuilhE
Copy link

GuilhE commented Jun 2, 2024

In this and this KMP projects, when I turn on KSP2 it will fail kspKotlinIosSimulatorArm64 with:

e: [ksp] java.lang.NullPointerException: null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl

* What went wrong:
Execution failed for task 'shared:kspKotlinIosSimulatorArm64'.
> A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
   > null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl

using:

kotlin = "2.0.0"
ksp = "2.0.0-1.0.21"
ksp.useKSP2=true

possible duplicate of #1929

@GuilhE
Copy link
Author

GuilhE commented Jun 20, 2024

Still failing:

kotlin = "2.0.20-Beta1"
ksp = "2.0.20-Beta1-1.0.22"
ksp.useKSP2=true

@neetopia neetopia self-assigned this Jun 20, 2024
@neetopia neetopia added the bug Something isn't working label Jun 20, 2024
@neetopia neetopia added this to the 2.1 milestone Jun 20, 2024
@ting-yuan
Copy link
Collaborator

Duplication of #1753

@GuilhE
Copy link
Author

GuilhE commented Sep 3, 2024

Still failing:


kotlin = "2.0.20"
ksp = "2.0.20-1.0.24"
ksp.useKSP2=true

@GuilhE
Copy link
Author

GuilhE commented Sep 6, 2024

@ting-yuan 1.0.25 release notes states that this is fixed but I'm still getting:

* What went wrong:
Execution failed for task ':shared:kspKotlinIosSimulatorArm64'.
> A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
   > null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl

Use this to reproduce.

@ting-yuan ting-yuan reopened this Sep 6, 2024
@Nirav186
Copy link

kotlin = "2.0.20-RC"
room = "2.7.0-alpha01"
ksp = "2.0.20-RC-1.0.24"

and add ksp.useKSP2=true to your gradle.properties (if you are using kotlin 2.x.x)
this will fix your problem and if you still getting the same error then try to remove @TypeConverters(<converter class name>::class)

@GuilhE
Copy link
Author

GuilhE commented Sep 11, 2024

kotlin = "2.0.20-RC"
room = "2.7.0-alpha01"
ksp = "2.0.20-RC-1.0.24"

and add ksp.useKSP2=true to your gradle.properties (if you are using kotlin 2.x.x) this will fix your problem and if you still getting the same error then try to remove @TypeConverters(<converter class name>::class)

check this

@GuilhE
Copy link
Author

GuilhE commented Oct 31, 2024

@ting-yuan :

kotlin = "2.0.21"
ksp = "2.0.21-1.0.26"
ksp.useKSP2=true

and

kotlin = "2.1.0-Beta2"
ksp = "2.1.0-Beta2-1.0.26"
ksp.useKSP2=true

Works with XCFrameworks 🎊 but not with Cocoapods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants