java.lang.NullPointerException for branch generateShortUrl

BUG FILED: [expo-branch] SDK 43 Android - Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference · Issue #15443 · expo/expo · GitHub

SDK 43 Managed using expo-branch: 5.0.3

On my Android 9 and iOS devices, branch works on the standalone apps. It’s only on my Android 11 device that it’s crashing when calling generateShortUrl with:

Attempt to invoke virtual method ‘android.content.Context android.content.Context.getApplicationContext()’ on a null object reference.

It might have something to do with my intent filters. The documentation on expo-branch is very sparse as to what exactly we need to put in there. An example there would be very helpful. This is what I have so far…it works on Android 9 but maybe not good enough for Android 11?

      "intentFilters": [
          "action": "VIEW",
          "data": [
              "scheme": "highlife"
          "category": [

Can anyone share their configurations from app.json?

This can be closed I’m reopening another discussion with more data.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.