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
[Crash] Koin Logger Measure and Kotlin EAP 1.4-M3 #847
Comments
As part of this update the below changes occurred: 1) 'initKoin' and 'androidLogger()' was updated to 'Level.ERROR' from the default 'Level.INFO'. This is due to the fact that otherwise the app crashes, see: InsertKoinIO/koin#847 2) Coverage numbers were update for both the 'network' and 'core' modules. Mainly on 'instruction' and 'line' levels.
I'm still using Kotlin 1.3.72 and received this error. |
I'm facing the same issue with |
I am facing the same issue with koinVersion = '2.1.6'. This workaround is working btw. |
Kotlin 1.4 becomes stable, waiting new release 🌸 |
FWIW the encapsulated functionality of // Before:
startKoin {
androidLogger()
androidContext(this@MyApplication)
modules(koinModules)
}
// After:
startKoin {
androidLogger()
androidContext(this@MyApplication)
// TODO Await fix for Koin and replace the explicit invocations
// of loadModules() and createRootScope() with a single call to modules()
// (https://github.com/InsertKoinIO/koin/issues/847)
koin.loadModules(koinModules)
koin.createRootScope()
} |
I have to check & help migration to Kotlin 1.4 for Koin 2.2.0. From what I see here, is the time measurement stuff that are still having problems :/ |
Same problem here, updating to stable Kotlin 1.4 bricks loading the modules because the still experimental time API seems to have changed something under the hood, I'm using a modified copy of @arnaudgiuliani Would have been nice to know upfront that Koin is using unstable experimental API under the hood, and in such a core code path even - silently opting in to the |
yep could clearly remove this experimental API that keep moving from release to release 👍 |
I got this crash after updating to stable Kotlin 1.4.0 while everything worked fine before on 1.3.72 Kotlin and 2.1.6 Koin. |
Kotlin 1.3.72 + Koin 2.1.5 - OK |
Would be nice to release 2.1.7 with just this fixed. This is the only way that's stopping my team from updating to Kotlin 1.4. (Sure, there are workarounds, but...) |
Setting the log level to |
See issue: InsertKoinIO/koin#847 Triggered by commit: f918c71
Kotlin 1.4 + 2.2.0-alpha-1 works well. |
Not finished and crashes because of an ongoing Koin bug InsertKoinIO/koin#847
Crashes with Koin because of an ongoing bug: InsertKoinIO/koin#847
- Kotlin 1.4.0 (from 1.3.72): https://blog.jetbrains.com/kotlin/2020/08/kotlin-1-4-released-with-a-focus-on-quality-and-performance/ `stdlib` dependency doesn't need to be explicitly added anymore: https://kotlinlang.org/docs/reference/whatsnew14.html#dependency-on-the-standard-library-added-by-default Had to switch Koin's logger to ERROR for `androidLogger`. See InsertKoinIO/koin#847. - Play Core 1.8.0: mostly for https://developer.android.com/guide/playcore/in-app-review, which may be implemented in a future commit
Can confirm - this works for me. |
… logging crash. Could be changed to stable 2.1.7 when it released. Reference: InsertKoinIO/koin#847
- Kotlin 1.4.10 (from 1.4.0): https://blog.jetbrains.com/kotlin/2020/08/kotlin-1-4-released-with-a-focus-on-quality-and-performance/ Important bugfixes and perf improvements - Koin 2.2.0-rc-2 (from 2.1.6) In 2.1.6, had to switch Koin's logger to ERROR for `androidLogger`. See InsertKoinIO/koin#847 (happens only on Kotlin 1.4+). - Google Play Billing 3.0.1 (from 3.0.0) https://developer.android.com/google/play/billing/release-notes#3-0-1 - Switched to Firebase BoM and KTX-variants Mostly to simplify Firebase versioning
Release Candidate version |
This issue has been around since July and has been fixed since August, but hasn't been released yet in November. I know there have been alpha, beta and rc versions that include this fix, but there is no stable release yet. What is standing in the way of this release? |
Kotlin 1.4.10 + Koin 2.2.1 - this works for me. |
I have the propblem when i adding kotlin datetime lib |
same issue |
same issue androidLogger(Level.INFO) crashed |
Kotlin 1.4.32 + Koin 2.2.2 - worked for me. |
same issue |
Try koin n 3.1.1 |
Yes Koin 3.1.x is upgrading Kotlin compat |
please reopen: |
Add where you configure your koin slf4jLogger(level = Level.ERROR) |
Describe the bug
This is just a heads up on
Koin
andKotlin EAP 1.4-M3
.After upgrading to
Kotlin EAP 1.4-M3
(from previousKotlin EAP 1.4-M2
) when launching the app aNoSuchMethodException
exception is thrown due to theelapseNow()
experimental method.Full exception below:
This is due to the fact that my app is using
androidLogger()
, which default to a Koin log level ofLevel.INFO
and as such when modules are build the duration is measured, which crashes the app. To overcome this I disabled logging for now, but it will be good if that get fixed so that I can enable it again.To Reproduce
Steps to reproduce the behavior:
Kotlin EAP 1.4-M3
as a dependency in your app (or project)Koin
init start with default logging enabled (Level.INFO
)Expected behavior
I except the app to not crash.
Koin project used and used version (please complete the following information):
org.jetbrains.kotlin:kotlin-stdlib:1.4-M3
org.koin:koin-core:2.1.6
org.koin:koin-android:2.1.6
org.koin:koin-androidx-viewmodel:2.1.6
Additional moduleDefinition
No additional moduleDefinition.
The text was updated successfully, but these errors were encountered: