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

Compose Multiplatform wasmJs app crashes when accessed via IPv4/IPv6 #2031

Closed
C0rr4do opened this issue Oct 17, 2024 · 1 comment
Closed
Labels
Milestone

Comments

@C0rr4do
Copy link

C0rr4do commented Oct 17, 2024

Describe the bug
Compose Multiplatform apps targeting Web that use the org.koin.compose.KoinApplication composable work via the loopback interface (http://localhost:8080), but crash when using IPv4 or IPv6 address (e.g. http://192.168.178.57:8080).

The following images show the differences between accessing the app using the loopback interface and IPv4:

To Reproduce

  1. Create a new compose multiplatform project using Kotlin Multiplatform Wizard (https://kmp.jetbrains.com/) and select "Web".
  2. Add Koin Compose dependency to build.gradle.kts (:composeApp):
kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("io.insert-koin:koin-compose:4.0.0")
        }
    }
}
  1. Replace the App composable in App.kt with the following code:
@Composable
fun App() {
    KoinApplication(application = { modules(module {}) }) {
        Text(text = "Hello World")
    }
}
  1. Serve the app by running ./gradlew wasmJsBrowserRun
  2. When opening the app using the loopback interface (http://localhost:8080) the app runs without crashing.
  3. When opening the app using your IPv4 address (e.g. http://192.168.178.57:8080/) the app crashes.

Expected behavior
The app does not crash.

Koin module and version:
koin-compose:4.0.0

Snippet or Sample project to help reproduce
See Step 3.

NOTE: This issue seems similar to #2011

kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
kdroidFilter added a commit to kdroidFilter/koin that referenced this issue Nov 4, 2024
…g the benasher44/uuid library to generate UUIDs for WebAssembly targets.
arnaudgiuliani added a commit that referenced this issue Nov 15, 2024
@arnaudgiuliani arnaudgiuliani added this to the 4.0.1 milestone Nov 15, 2024
@arnaudgiuliani
Copy link
Member

see

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

No branches or pull requests

2 participants