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

Reference to the app's current Activity is missing. Did you call TerminalApplicationDelegate::onCreate before calling initTerminal #551

Open
bhupalreddy-kokkanti opened this issue Feb 5, 2025 · 4 comments

Comments

@bhupalreddy-kokkanti
Copy link

PlatformException(mek_stripe_terminal, mek_stripe_terminal, [null, 0, Reference to the app's current Activity is missing. Did you call TerminalApplicationDelegate::onCreate before calling initTerminal? See https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=android#initialize for more details., null, com.stripe.stripeterminal.external.models.TerminalException: Reference to the app's current Activity is missing. Did you call TerminalApplicationDelegate::onCreate before calling initTerminal? See https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=android#initialize for more details.
at com.stripe.stripeterminal.handoffclient.HandoffReaderController.createMissingActivityException(HandoffReaderController.kt:1090)
at com.stripe.stripeterminal.handoffclient.HandoffReaderController.startReader(HandoffReaderController.kt:1020)
at com.stripe.stripeterminal.handoffclient.HandoffReaderController.startPaymentCollection(HandoffReaderController.kt:694)
at com.stripe.stripeterminal.internal.common.remotereadercontrollers.DefaultProxyRemoteReaderController$startPaymentCollection$1.invoke(ProxyRemoteReaderController.kt:240)
at com.stripe.stripeterminal.internal.common.remotereadercontrollers.DefaultProxyRemoteReaderController$startPaymentCollection$1.invoke(ProxyRemoteReaderController.kt:239)
at com.stripe.stripeterminal.internal.common.remotereadercontrollers.DefaultProxyRemoteReaderController.withCurrentController(ProxyRemoteReaderController.kt:351)
at com.stripe.stripeterminal.internal.common.remotereadercontrollers.DefaultProxyRemoteReaderController.withCurrentController$default(ProxyRemoteReaderController.kt:346)
at com.stripe.stripeterminal.internal.common.remotereadercontrollers.DefaultProxyRemoteReaderController.startPaymentCollection(ProxyRemoteReaderController.kt:239)
at com.stripe.stripeterminal.internal.common.adapter.RemoteReaderAdapter$CollectPaymentMethodOperation.execute(RemoteReaderAdapter.kt:321)
at com.stripe.stripeterminal.internal.common.adapter.RemoteReaderAdapter.collectPaymentMethod(RemoteReaderAdapter.kt:108)
at com.stripe.stripeterminal.internal.common.adapter.ProxyAdapter.collectPaymentMethod(ProxyAdapter.kt:102)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$CollectPaymentMethodOperation.executeIfNotCanceled(TerminalSession.kt:1624)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$CancelableOperation.execute(TerminalSession.kt:1290)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$ExternalOperation.run$terminalsession_release(TerminalSession.kt:1245)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.enqueueOperation$lambda$6(TerminalSession.kt:1052)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.$r8$lambda$6lM7341_XI6PEqXfOM-yc2U5tkQ(Unknown Source:0)
at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
], null)

I am getting this exception in s700 device for handoff mode. please advise on it to resolve it.

@dmatthews-stripe
Copy link
Collaborator

Hi @bhupalreddy-kokkanti Did you call TerminalApplicationDelegate::onCreate before calling initTerminal ?

@bhupalreddy-kokkanti
Copy link
Author

yeah. @dmatthews-stripe I am calling TerminalApplicationDelegate::onCreate before calling initTerminal. this issue is happening when we do the collect payment api calling time.

@dmatthews-stripe
Copy link
Collaborator

Hi @bhupalreddy-kokkanti can you provide the version of the RN SDK that you are using so we can attempt to reproduce?

@bhupalreddy-kokkanti
Copy link
Author

@dmatthews-stripe I am using 4.1.0 version sdk in the project.

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

No branches or pull requests

2 participants