chargebee / chargebee-android

MIT License
9 stars 6 forks source link

Crash when building in release mode #34

Closed ojoNetgem closed 2 years ago

ojoNetgem commented 2 years ago

When configuring the library in release mode, our app is crashing at the end of the Chargebee.configure().

For example, using your Example code.

Steps to reproduce: 1/ put valid configuration in ExampleApplication.kt 2/ enable minifyEnabled true in build.gradle 3/ build release variant & sign 4/ sideload & run. It crashes:

I/c: Environment Setup Completed
I/c:  Response :CBAuthResponse(in_app_detail=null)
I/c: Note: pre-requisites configuration is mandatory for SDK to work. Learn more - https://www.chargebee.com/docs/2.0/mobile-playstore-connect.html
E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
    Process: com.chargebee.example, PID: 5802
    java.lang.NullPointerException
        at e.a.a.c$a.g(:5)
        at e.a.a.s.q.i(:6)
        at h.n.j.a.a.e(:2)
        at f.a.c0.run(:2)
        at f.a.m1.a.x(Unknown Source:0)
        at f.a.m1.a$a.run(:7)
I/Process: Sending signal. PID: 5802 SIG: 9
cb-amutha commented 2 years ago

Hi!, thanks for writing here.

Please take the latest version of SDK v1.0.5 and add the signingConfigs details of your app build.gradle file and try, hope this works. Let us know still facing the issue. Thanks.