Hi everyone! Once I got updated to Expo 43 and expo-branch 5.0.3, I started getting this error on startup in the Expo Go app. I have already tried to remove the node_modules directory, package-lock, and called npm install again, but the issue does not go away.
This is how I import Branch: import Branch from "expo-branch";
This is what I do with it (just trying to catch bundle params and log in the Amplitude):
Hey @unit37akasrd, to clarify is this occurring on both Android and iOS for you? Also, can you share a public github repo with a minimal implementation of this that reproduces the error? Two code snippets while helpful do not give us the full context and leaves a lot to assumption.
I have the same issue with “expo-branch”: “~5.0.3” and “expo”: “^43.0.0”
I followed the guide here https://docs.expo.dev/versions/latest/sdk/branch/ and did those steps since I only need it to work on Android
Add the Branch Key to your app.json in the section android.config.branch.apiKey and ios.config.branch.apiKey . You can find your key on this page of the Branch Dashboard.
Add a linking scheme to your app.json in the scheme section if you don’t already have one.
For Android, add a new intent filter that registers the Branch link-domain , under android.intentFilters in app.json .
The minimal example is very simple: with just the two prerequisites above, all I need to do is in any component in the Android app
The minimal example would be something like this
import Branch from "expo-branch";
...
console.log(Branch)
Is there any additional setup required from expo before adding those imports?
I think if I’m not mistaken the issue is that Branch is only supported on builds, so I had to do something like this (Platform specific imports - #3 by raphaelrk) to prevent the issue