-
Notifications
You must be signed in to change notification settings - Fork 278
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
java.lang.IllegalStateException: Storage for [...] is already registered
with 2.0.20-1.0.24
#2072
Comments
I am getting this error as well. I managed to put ksp and hilt in my project and now this error. I don't know what to do as i am new developer |
Found out this exception in Android while trying to use Room in project. What I would do is use a tested version, for me 2.0.10-1.0.24 works as expected. |
I've got Room in my project and version 2.0.10-1.0.24 with Kotlin version 2.0.10 also worked for me. |
It works for me |
got this exception after incorrect (or unfinished) automigration in android room. after define manual migration it throw this on build |
for those who face this issue, killing the Kotlin daemons workaround from Slack worked for me:
|
Or just |
KSP 2.0.20-1.0.25 is just released and may have fixed this issue. Would you mind to give it a try? |
Unfortunately, I can confirm that the issue still persists in KSP 2.0.20-1.0.25 |
@ychescale9 how come you closed this issue if @thejufo was able to reproduce it with the latest ksp release? |
sorry, re-opened |
It fixed the issue for me. I've cleaned the project and tried with Kotlin version 2.0.20. |
I noticed before it was an issue but now I confirm that with version 2.0.20-1.0.25 everything works. Just rebuilding the project even without its cleaning. |
I confirm that after updating ksp to 2.0.20-1.0.25 and invalidating the cache the build was successful |
after updating ksp to 2.0.20-1.0.25 , it works , try to delete build folder and rebuilding the project |
@ychescale9 looks like people are saying it's resolved for them, so maybe it's ok to close it after all! Fwiw I've been using latest KSP since yesterday without issue, although I never used the previous version that people were complaining about so I wasn't 100% sure if my experience mattered. |
It still happens when compiling after a processor raised an exception. # A project with a sample using its own processor
git clone https://github.com/r0adkll/kimchi.git
cd kimchi
# Add invalid code from the processor's point of view
echo "@com.r0adkll.kimchi.annotations.ContributesBinding(com.r0adkll.kimchi.restaurant.common.scopes.AppScope::class) object Test" > sample/desktopApp/src/main/kotlin/com/r0adkll/kimchi/restaurant/di/Test.kt`
# The processor raises its error
# (here `e: [ksp] KimchiException: Bound implementation must have a single supertype, or specify a 'boundType' if extending more than one supertype.`)
`./gradlew :sample:desktopApp:run`
# Remove the "invalid" code
`rm sample/desktopApp/src/main/kotlin/com/r0adkll/kimchi/restaurant/di/Test.kt`
# The storage error is raised, the kotlin daemon needs to be killed.
`./gradlew :sample:desktopApp:run` |
What worked for us is to also kill the daemon (found this in a slack discussion) |
I am also suffering this with version 2.0.20-1.0.25. In my case using androidx Room in a KMP project. Seems like it starts to throw after a build error happened. For example, I had a non-suspending function in my database DAO, in KMP, Room requires all functions to be suspending, so it threw an error whem building. After that the error mentioned in this issue started to happen. However, after restarting the IDE (Android Studio) it was fixed |
same here while changing some classes that caused recompilation of several modules, it's still happening with |
I'm specifically talking about Gradle file system watching |
Says that it is enabled by default since Gradle 7 and i'm using 8 so i believe answer is yes in my case atleast. |
Worked perfectly for me. Thanks! |
I could repro the issue in the Feel free to remix/take inspiration from them |
We are also seeing this issue. |
I have the same issue with the version 2.0.20-1.0.25 |
Please stop spamming this issue |
Worked on version 2.0.20-1.0.25
|
Thank you worked! |
@raquezha yes worked but I changed something on Room Database again reproduce this error, so I'm fixing this issue with "git stash". I did the steps that you wrote on the comment again but not working again |
(cherry picked from commit 3bdcb1e)
(cherry picked from commit 9bb1c27)
@ting-yuan given the scale of the impact are we planning to do a release with the fix soon? |
Same issue on |
2.0.21-1.0.26, which contains the fix, was just released! |
I am using the latest 2.0.21-1.0.26 version and I still get this error after modifying one of the Type Converters for the Room Database |
Had the same error. Look it up at stackoverflow. This worked for me. Added it to gradle.properties file |
Since updating to
2.0.20-1.0.24
our devs started getting the following occasionally:Our workaround has been killing the Kotlin daemons.
Others have experienced the same issue as reported in the kotlinlang slack.
There are reports on both Android and JS projects so doesn't look like it's specific to a target.
We're still on KSP 1.
The text was updated successfully, but these errors were encountered: