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

Mixing Robolectric tests with normal tests throws Error on Android with Kotlin multiplatform #1843

Open
Burtan opened this issue Sep 28, 2024 · 1 comment

Comments

@Burtan
Copy link

Burtan commented Sep 28, 2024

How frequently does the bug occur?

Always

Description

Hey,

if you use Kotlin Multiplatform with an Android module and Realm you most likely also use Robolectric. If you run some realm tests with Robolectric and some without, Realm throws the following error. It works with all tests running on Robolectric.

Stacktrace & log output

java.lang.ExceptionInInitializerError
	at io.realm.kotlin.internal.interop.RealmInteropKt.INVALID_CLASS_KEY_delegate$lambda$0(RealmInterop.kt:43)

Can you reproduce the bug?

Always

Reproduction Steps

Here is an example project.

Version

2.3.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Linux Debian testing

Build environment

Android Studio version: 2024.1.2 Patch 2
Android Build Tools version: 8.6.1
Gradle version: 8.10.2

Copy link

sync-by-unito bot commented Sep 28, 2024

➤ PM Bot commented:

Jira ticket: RKOTLIN-1131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant