Android standalone app stops responding every two times

I have created an app with Expo and I have built a standalone app. The problem is that the app stops responding every two times I open it. First time it works ok, second time stops responding third time ok etc. I am testing with Android 5 on physical device and Genymotion.

Any advice?


Does this happen when you open the app in the Expo client? Or only in the standalone app?

Does this ever happen on iPhone or just Android?

What is the Expo URL of your app?
And do you have a link to the app in the App Store?

If your code is on github, that would also be helpful.

Does this happen when you open the app in the Expo client?
No, my code works in the Expo client. Only standalone app

Does this ever happen on iPhone or just Android?
I have not tried on Iphone, so only Android

What is the Expo URL of your app?

I detached the app, and now it works every time. Seems to be a problem with the build process at your end?
I can send you the exp.json if you think that can help?

sure. that might help. thanks for letting us know. i’m not sure why it would be different when you detach. that’s very odd.

can you send the link to the apk?

Here is the APK

thanks will look at it

Looks like it’s an issue with the Branch native module we released in SDK 17. I’m pushing out an update to the standalone app builders that will fix this later today. Thanks for letting us know!

1 Like

Update is out. Let me know if it’s not working.

I will try this when I get a change, but at the moment the app is detached so I have to attach it again to test this. By the way, do you have any idea why WebBrowser.openBrowserAsync does not work in a detached Android app? If you still have the APK file you can verify that the links on the third tab does not open.

I’m still facing this issue with SDK 17…

For fix this now. Just detach and building apk manually…

it’s very hard to run adb in my environment setup ( you don’t want to know ).
i have this from google play :

  at android.os.Handler.dispatchMessage(
  at android.os.Looper.loop(
  at java.lang.reflect.Method.invoke(Native Method:0)

if it helps, i can provide the apk. Or if really necessary i will do adb logcat.

@gecatalin can you send me logs?

I’m having the same problem with Branch after update to SDK 19.0.0.

I was using react-native-branch package before and Branch works inside the app, but there are these crashes when I reopen the app for the 2nd time.

Managed to narrow it down to this initialization in

  protected void onStart() {
      RNBranchModule.initSession(this.getIntent().getData(), this);

Doing initSession results in crash on reopening the app, removing this line results in the following error:

Attempt to invoke virtual method 'void io.branch.referral.Branch.setIdentity(javalang.String)' on a null object reference

Any suggestions on how to fix this?

The following changes to seem to fix it:

import io.branch.referral.Branch;
import io.branch.referral.BranchError;

import org.json.JSONObject;


  protected void onStart() {
      Branch branch = Branch.getInstance(getApplicationContext());
      branch.initSession(new Branch.BranchReferralInitListener(){
              public void onInitFinished(JSONObject referringParams, BranchError error) {

          }, this.getIntent().getData(), this);