Skip to content

[Android] 2.6.0 Adyen, App crashes when searching for address in Add card flow. #604

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

Open
DaniyalShaikh-0 opened this issue May 6, 2025 · 7 comments
Labels
already fixed an issue is already fixed

Comments

@DaniyalShaikh-0
Copy link

Describe the bug
App works fine with other payment methods, but once we type something in address search bar inside Add Card flow, the App crashes unexpectedy.
This issue occurs on Android app.

To Reproduce
Steps to reproduce the behavior:

  1. Install 2.6.0 Adyen
  2. invoke the start function with "scheme"
  3. Add card details, and search for address
  4. See the App crashing.

Expected behavior
address search should work and behave same as in 2.5.0

Screenshots
Adyen 2.5.0 Screenshots:

Screenshot 1
Image

Screenshot 2
Image

Before getting to the state as Screenshot 2 , the app crashes on Adyen 2.6.0

Environment (please complete the following information):

OS: Mac OS M1
Browser Chrome
Version React native - 0.78
Node - 20
Adyen - 2.5.0
NEW ARCHITECURE - DISABLED
HERMES - ENABLED
FABRIC - ENABLED

Additional context
I am not facing this issue in version 2.4.0, 2.5.0 of Adyen.
Only facing in Android.

@DaniyalShaikh-0 DaniyalShaikh-0 added the bug report when a bug report is created label May 6, 2025
@descorp
Copy link
Contributor

descorp commented May 7, 2025

Hey @DaniyalShaikh-0

Thank you for reporting!

Could you share crashlogs from Android Studio?

@DaniyalShaikh-0
Copy link
Author

Hi @descorp ,

Apologies for late response.

Here are the crash logs for Adyen Search controller issue:

2025-05-13 13:31:43.389 11839-11839 AndroidRuntime          com.myapp.app              E  FATAL EXCEPTION: main
Process: com.myapp.app, PID: 11839
java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.text.StringsKt__StringsKt.isBlank, parameter <this>
	at kotlin.text.StringsKt__StringsKt.isBlank(Unknown Source:2)
	at com.adyen.checkout.ui.core.internal.ui.view.LookupOption.formatTitle(AddressLookupOptionsAdapter.kt:74)
	at com.adyen.checkout.ui.core.internal.ui.view.LookupOption.<init>(AddressLookupOptionsAdapter.kt:66)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate.handleSearchResultEvent(DefaultAddressLookupDelegate.kt:272)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate.makeAddressLookupState(DefaultAddressLookupDelegate.kt:224)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate.access$makeAddressLookupState(DefaultAddressLookupDelegate.kt:40)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate$initialize$1.invokeSuspend(DefaultAddressLookupDelegate.kt:92)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate$initialize$1.invoke(Unknown Source:8)
	at com.adyen.checkout.ui.core.internal.ui.DefaultAddressLookupDelegate$initialize$1.invoke(Unknown Source:4)
	at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:50)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:33)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at kotlinx.coroutines.EventLoop.processUnconfinedEvent(EventLoop.common.kt:65)
	at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:231)
	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:149)
	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:470)
	at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:591)
	at kotlinx.coroutines.channels.BufferedChannelKt.tryResume0(BufferedChannel.kt:2957)
	at kotlinx.coroutines.channels.BufferedChannelKt.access$tryResume0(BufferedChannel.kt:1)
	at kotlinx.coroutines.channels.BufferedChannel$BufferedChannelIterator.tryResumeHasNext(BufferedChannel.kt:1719)
	at kotlinx.coroutines.channels.BufferedChannel.tryResumeReceiver(BufferedChannel.kt:662)
	at kotlinx.coroutines.channels.BufferedChannel.updateCellSend(BufferedChannel.kt:478)
	at kotlinx.coroutines.channels.BufferedChannel.access$updateCellSend(BufferedChannel.kt:33)
	at kotlinx.coroutines.channels.BufferedChannel.send$suspendImpl(BufferedChannel.kt:3150)
	at kotlinx.coroutines.channels.BufferedChannel.send(Unknown Source:0)
	at com.adyen.checkout.dropin.internal.service.BaseDropInService$emitResult$1.invokeSuspend(BaseDropInService.kt:122)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8705)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@90f5714, Dispatchers.Main.

@descorp
Copy link
Contributor

descorp commented May 13, 2025

Hey @DaniyalShaikh-0

Parameter specified as non-null is null

This happens when Android SDK is trying to make a string label out of Address entity from a JSON you are providing.
You sure there is no null values in street or houseNumberOrName in your JSON?

@DaniyalShaikh-0
Copy link
Author

DaniyalShaikh-0 commented May 13, 2025

This happens when I search for Address in the field that I showed you above.

Screenshot 2
Image
Before getting to the state as Screenshot 2 , the app crashes on Adyen 2.6.0

previously it seemed to have filled it automatically.

Now it crashes (adyen 2.6.0).

@descorp
Copy link
Contributor

descorp commented May 14, 2025

Now it crashes (adyen 2.6.0).

There is a change on latest Android SDK - previously it allowed all fields to be null; but now it expects street and houseNumberOrName to be non-null.

We will patch it in #611

In future major version we will update JS/TS specks to make it type- and null-safe.

For now, to solve this crash, please sanitise data you provide in onUpdateAddress callback, so street and houseNumberOrName are non-null (tip: you can use empty string ``).

@descorp descorp added already fixed an issue is already fixed bug Something isn't working to be released Necessary change committed to develop and will be released shortly and removed bug report when a bug report is created labels May 15, 2025
@descorp
Copy link
Contributor

descorp commented May 16, 2025

Hey @DaniyalShaikh-0

Released on 2.6.1
Please confirm the fixes.

@descorp descorp removed bug Something isn't working to be released Necessary change committed to develop and will be released shortly labels May 16, 2025
@DaniyalShaikh-0
Copy link
Author

Hi @descorp ,

Thankyou, I will check these and let you know

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

No branches or pull requests

2 participants