reown-com / reown-kotlin

Apache License 2.0
10 stars 1 forks source link

Error during WalletKit initialization: TimeoutCancellationException: Timed out waiting for 10000 ms #19

Open ShengXiuyan opened 1 week ago

ShengXiuyan commented 1 week ago

I'm using the reown-kotlin library in my Android project with the following dependencies in my build.gradle:

implementation(platform("com.reown:android-bom:1.0.0"))
implementation("com.reown:android-core")
implementation("com.reown:walletkit")

Here is my code:

CoreClient.initialize(
    application = this,
    projectId = projectId,
    connectionType = ConnectionType.AUTOMATIC,
    metaData = WCHelper().getAppMetaData(),
    onError = { error ->
        // Error handling
    }
)
WalletKit.initialize(
    Wallet.Params.Init(core = CoreClient),
    onSuccess = {

    },
    onError = {
        //Error(throwable=kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 10000 ms)
    }
)

When trying to initialize WalletKit, I get the following error: kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 10000 ms

I followed the documentation here: https://docs.reown.com/walletkit/android/usage, but the error occurs every time I call WalletKit.initialize. Are there any known causes of this issue or potential solutions?

jakubuid commented 3 days ago

Hey! What's the application that you're passing? Where do you initialize the SDK? In the Application class?