Skip to content

[BUG] [P1] NPE crash in CardReaderPaymentAPIDrivenPageActivity on next checkout after transaction cancelled on reader while app backgrounded #286

Description

@paulneesham-autocab

Dependency Versions

  • SumUp SDK: 7.0.0 (com.sumup:merchant-sdk)
  • Kotlin: 2.4.0
  • Android Gradle Plugin: 9.2.1
  • Gradle: 9.5.1

Steps to reproduce

  1. Start checkout → SDK payment screen opens, reader waits for card
  2. Press Home/Back on phone (app moves to background)
  3. Cancel the transaction on the reader
  4. Return to the app
  5. Start a new checkout → crash (NPE in CardReaderPaymentAPIDrivenPageActivity.onResume)

Video / Screenshot

N/A — crash log above; happy to provide a screen recording of the repro steps if helpful.

Other Information

  • The sticky-event mechanism is visible in the stack trace: EventBus.checkPostStickyEventToSubscription → the subscriber is invoked immediately upon register() in onResume(), before any state for the new checkout exists.
  • Possibly related to [BUG] Random Crash on android 15 #264, which shows the same NPE signature (CardReaderPaymentFlowState.addScreens on null) via a different trigger — in our case it is 100% reproducible with the steps above: background the app mid-transaction, cancel on the reader, then start a new checkout.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions