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

[Bug] samples.dapp always crash when it call pushRequest. #942

Open
ghost opened this issue Jun 22, 2023 · 4 comments
Open

[Bug] samples.dapp always crash when it call pushRequest. #942

ghost opened this issue Jun 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jun 22, 2023

Describe the bug
I'm running examples of this repo: samples.dapp and sample.wallet.
I've added google-services.json and done paring them successfully as in the picture below.
Then I tap the Push request button, the app immediately crashes below:

FATAL EXCEPTION: main
Process: com.walletconnect.sample.dapp, PID: 9212
 java.util.NoSuchElementException: Collection contains no element matching the predicate.
at com.walletconnect.sample.dapp.ui.routes.composable_routes.session.SessionViewModel.pushRequest(SessionViewModel.kt:173)
at com.walletconnect.sample.dapp.ui.routes.composable_routes.session.SessionRouteKt$SessionRoute$6.invoke(SessionRoute.kt:76)
at com.walletconnect.sample.dapp.ui.routes.composable_routes.session.SessionRouteKt$SessionRoute$6.invoke(SessionRoute.kt:76)
at com.walletconnect.sample_common.ui.commons.ButtonsKt$BlueButton$1$1.invoke(Buttons.kt:27)
at com.walletconnect.sample_common.ui.commons.ButtonsKt$BlueButton$1$1.invoke(Buttons.kt:26)
at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke-k-4lQ0M(Clickable.kt:167)
at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke(Clickable.kt:156)
at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)

I've checked and found out that SignClient.getListOfActiveSessions() always be empty.
Please help to check. Did I miss any config?

SDK Version (if relevant)

  • Client: [e.g. JS, Swift, Kotlin]
  • Version [e.g. 22]

To Reproduce
Steps to reproduce the behavior:

  1. Run samples.dapp and sample.wallet
  2. Connect(pair) dapp with wallet
  3. Pair successfully then click to Request push button
  4. See the error

Expected behavior
Send Request push to the wallet to approve. Then Dapp can Notify to Wallet

Screenshots
image

Additional context
Add any other context about the problem here.

@ghost ghost added the bug Something isn't working label Jun 22, 2023
@ghost
Copy link
Author

ghost commented Jun 22, 2023

By the way, I've tried to add FCM API key to Console . But It's not finished.
After debugging, I found that there was an error in this API:

image

image
image
Please help to check!

@ghost
Copy link
Author

ghost commented Jun 23, 2023

Another issue, the WalletApp approves Request Push from Dapp successfully in UI, but I found the error in Logcat here:

java.lang.Throwable: {"status":"FAILURE","error":{"name":"cacao","message":"Unable to verify"},"value":null} at com.walletconnect.android.keyserver.domain.use_case.UtilsKt.unwrapUnit(Utils.kt:17) at com.walletconnect.android.keyserver.domain.use_case.RegisterIdentityUseCase.invoke-gIAlu-s(RegisterIdentityUseCase.kt:11) at com.walletconnect.android.keyserver.domain.use_case.RegisterIdentityUseCase$invoke$1.invokeSuspend(Unknown Source:12) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)

So I think the WalletApp approved Request Push from Dapp failed actually!

@ghost
Copy link
Author

ghost commented Jun 27, 2023

@arein Could you reply to me? Is there any way can I try?

@arein
Copy link
Member

arein commented Jun 27, 2023

@Talhaali00 can you pls take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant