Skip to content

NullPointerException: com.braintreepayments.api.TLSCertificatePinning.getCertInputStream (TLSCertificatePinning.java:719) #1020 #1300

@amijsul

Description

@amijsul

Braintree SDK Version

6.16.0

Environment

Production

Android Version & Device

Samsung and TCL, Android 13 & 14

Braintree dependencies

com.braintreepayments.api:drop-in

Describe the bug

I am seeing this crash occur for a few users in production. I have not been able to reproduce it. It is mainly on Samsung phones but also happening on TCL phones too.

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.nio.charset.Charset)' on a null object reference
at com.braintreepayments.api.TLSCertificatePinning.getCertInputStream(TLSCertificatePinning.kt:719)
at com.braintreepayments.api.BraintreeGraphQLClient$Companion.createDefaultHttpClient(BraintreeGraphQLClient.kt:82)
at com.braintreepayments.api.BraintreeGraphQLClient$Companion.access$createDefaultHttpClient(BraintreeGraphQLClient.kt:79)
at com.braintreepayments.api.BraintreeGraphQLClient.(BraintreeGraphQLClient.kt:6)
at com.braintreepayments.api.BraintreeClientParams.(BraintreeClientParams.kt:13)
at com.braintreepayments.api.BraintreeClientParams.(BraintreeClientParams.kt:22)
at com.braintreepayments.api.BraintreeClient.(BraintreeClient.kt:70)
at com.braintreepayments.api.DropInClient.createDefaultParams(DropInClient.java:50)
at com.braintreepayments.api.DropInClient.(DropInClient.java:140)

To reproduce

I have not been able to reproduce

Expected behavior

N/A

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions