SDK Version: 39 / Managed / Android
On the Branch.subscribe, I get this as an error when I boot up the app in Android on expo-branch 2.3.1:
error: “Warning. Session initialization already happened. To force a new session, set intent extra, “branch_force_new_session”, to true.” I also do not get the Branch params coming through successfully.
Update
After encountering this issue on my Android (OS Version 9) Phone even on previous versions, I’ve wrote a hack that checks for params = await Branch.getLatestReferringParams();
in the case I get the session initialized error. It’s really ugly…but think it might give me the functionality I need. Really curious if others are not experiencing this…
It has been occuring for users using the react-native-branch library but not in Expo:
Session initialization already happened
Unity android session initialization already happened
Warning. Session initialization already happened…
Some of these guys were doing something specific to cause this…but in my case I literally call the SDK with one require statement:
const Branch = constants.inExpo ? undefined : require("expo-branch").default;
And then just something like:
useEffect(() => Branch.subscribe(({error, params}) => undefined), [])
Nothing fancy, but I get that error when the app opens from a fresh start.