Closed benkuly closed 1 year ago
We need more information to address this.
Are you using !!
in MockKMP? I think this should be replaced with requreNotNull(value){"reason"}
or save navigation ?.
to avoid NullPointerExceptions
, which are really hard to debug.
We really need a reproducer for this.
I know. Our CI did not run much the last month to see the issue again. It is not reliably reproducible, only happens every few times. I remember, that when I tried to debug it the last time it came from a part of MockKMP where !!
is used.
Just wanted to inform you, that the issue still appears randomly. Unfortunately in a non-public project.
java.lang.NullPointerException
at org.kodein.mock.Mocker.process(Mocker.kt:76)
at org.kodein.mock.Mocker.registerSuspend(Mocker.kt:309)
at org.kodein.mock.Mocker.registerSuspend$default(Mocker.kt:148)
...
at org.kodein.mock.Mocker.verifyWithSuspend(Mocker.kt:234)
at org.kodein.mock.Mocker.verifyWithSuspend$default(Mocker.kt:233)
I've removed all !!
in version 1.12.0 and replaced them either with safe access (which should fix this issue) or with more semantic exceptions (which will not fix this issue, but provide a more semantic stack trace).
I'll close this in the hope that the situation is the former.
If it is the later, please re-open this issue.
Thank you very much :)
We have a bunch of tests flickering because sometimes MocKMP throws a NullPointerException: