You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This already happended to us twice. This time we had to release production build with more debugging to realize what is actually happening, because the current stack trace is not sufficient for us.
The root cause is implementation of getOrNull and findInOtherScope where getOrNull silences all possible exceptions.
To Reproduce
Steps to reproduce the behavior:
Have a scope and MAIN dependency in it.
The MAIN dependency requires ANOTHER dependency in root scope.
Constructor of the ANOTHER depency throws.
Actual behavior
Caused by org.koin.core.error.NoBeanDefFoundException
No definition found for class:'xxx.AnotherDependency'. Check your definitions!
Expected behavior
Caused by xxx.CustomException
How to fix
Catch only NoBeanDefFoundException exceptions in getOrNull.
This may introduce BC break since somebody may rely on this behaviour. So alternatively also findInOtherScope should be reworked not to utilize getOrNull.
Koin project used and used version (please complete the following information):
Describe the bug
This already happended to us twice. This time we had to release production build with more debugging to realize what is actually happening, because the current stack trace is not sufficient for us.
The root cause is implementation of getOrNull and findInOtherScope where getOrNull silences all possible exceptions.
To Reproduce
Steps to reproduce the behavior:
Actual behavior
Expected behavior
How to fix
Catch only NoBeanDefFoundException exceptions in getOrNull.
This may introduce BC break since somebody may rely on this behaviour. So alternatively also findInOtherScope should be reworked not to utilize getOrNull.
Koin project used and used version (please complete the following information):
The text was updated successfully, but these errors were encountered: