Crash showing in google play console

Hi Guys I am getting this crash - it is shown on the Android Vitals page of the google play console.

I have no idea how to debug or find this and there is no clue in the trace which call to backendless in my code is calling this. Can you help?!

Today, 00:58 on app version 45

Samsung Galaxy S9 (starlte), Android 9

Report 1 of 3

java.lang.ExceptionInInitializerError :

at com.backendless.HeadersManager.getInstance (

at com.backendless.Invoker.invokeSync (

at com.backendless.Invoker$ (

at java.util.concurrent.ThreadPoolExecutor.runWorker (

at java.util.concurrent.ThreadPoolExecutor$ (

at (

Caused by: java.lang.IllegalStateException :

at com.backendless.AndroidBackendlessPrefs.getAuthKeys (

at com.backendless.AndroidBackendlessPrefs.getApplicationId (

at com.backendless.Backendless.getApplicationId (

at com.backendless.AndroidHeadersManager. (

at com.backendless.AndroidHeadersManager.getInstance (

at com.backendless.HeadersManager. (

Hi Mike,

didn’t you miss to call Backendless.initApp(...) first?


Hi Stanislaw

It is there in onCreate in the home activity class. Does that not cover it? or should it placed somewhere else?

I never get an error when testing on my development device so was surprised to see this, but it has cropped up a few times now on android vitals.


Don’t know where is the best place to put it in android code, but it should be called before any using of Backendless SDK. If home activity class is this place, then put it there.


So your best guess is that this might be caused by not calling backendless.init before a backendless call? In which case I will go through all backendless calls and ensure that backendless must have been initialised. (which I think is the status quo already)

Perhaps it is on some sort of wakeup call or a scenario like that which I haven’t stumbled upon in testing. In ios we put it in app delegate as per docs, but android docs don’t specify an optimum place to put the init call so I am guessing onCreate() is satisfactory ???

Yes, try in onCreate

Hi @mike-turner

The best place to initialize the Backendless is your Application class.
Put Backendless.initApp() into onCreate() method of your Application.

Best Regards,

Thanks guys, but that is where it is already.

Make sure that you initialize the Backendless in the Application, not the Activity.
There may be some cases when the.home activity is not launched by default.

If you follow the stack trace, you can discover that the app throws the IllegalStateException with message "Backendless application was not initialized". And the exception is thrown in AndroidBackendlessPrefs class, when it tries to get authKeys, that should be received from initApp() method.
So it’s indeed the Backendless initialization problem.

Got you, thanks that makes sense now. Thanks

You are welcome!)