Closed ShengXiuyan closed 4 weeks ago
Hey! What's the application that you're passing? Where do you initialize the SDK? In the Application class?
Hi! Yes, I'm using MyApplication : Application() for SDK initialization. If I use the following dependencies:
implementation(platform("com.reown:android-bom:1.0.0"))
implementation("com.reown:android-core")
implementation("com.reown:sign")
and initialize like this:
MyApplication : Application() {
CoreClient.initialize(
relayServerUrl = serverUrl,
connectionType = connectionType,
application = this,
metaData = getAppMetaData()
) { throwable ->
// Error handling
}
SignClient.initialize(
Sign.Params.Init(core = CoreClient),
onSuccess = {},
onError = {}
)
}
everything works as expected. But if I switch to these dependencies:
implementation(platform("com.reown:android-bom:1.0.0"))
implementation("com.reown:android-core")
implementation("com.reown:walletkit")
and use this initialization:
CoreClient.initialize(
application = this,
projectId = projectId,
connectionType = ConnectionType.AUTOMATIC,
metaData = getAppMetaData(),
onError = { error ->
// Error handling
}
)
WalletKit.initialize(
Wallet.Params.Init(core = CoreClient),
onSuccess = {
// Success handling
},
onError = {
// Error handling
//Error(throwable=kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 10000 ms)
}
)
I encounter this error:
kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 10000 ms
I hope this information will be helpful in identifying the cause of the issue.
Thanks for providing more details, unfortunately, I cannot reproduce it. Could you check our Kotlin Sample Wallet as a reference integration? See: https://github.com/reown-com/reown-kotlin/blob/develop/sample/wallet/src/main/kotlin/com/reown/sample/wallet/WalletKitApplication.kt#L74
I'm using the reown-kotlin library in my Android project with the following dependencies in my build.gradle:
Here is my code:
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?