react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
generateShortUrl never resolves or rejects on ios
Environment
react-native: 0.61.4 react-native-branch: 4.2.1 paltform: ios
Problem
It seems like this issue is related to #384, #428. It is working fine on android, but not on ios. I kind of tracked downed and First generateShortUrl is called and it calls _tryFunction and our code is awaiting this promise that is returned by this._tryFunction. For our case, catch logic is not executed. It just returns promise which is like this
So this promise never resolves or rejects so we can't handle the situation. In the end, it seems like RNBranch.generateShortUrl is called with ident , linkProperties and controlParams. Maybe an issue with ios sdk?
hm... I downgraded to v4.1.0
and v4.0.0
and still only ios is not working. Do you think our ios setup has a problem? It seems like we've followed the ios setup instruction on AppDelegate.m
Just feel free to ask anything you need
We recently released an update that addresses several issues on iOS. Could you check if the issue still occurs for you? Thank you.
Actually this problem was occurring to only a few of the developers, it was fixed after someone pushed the working code. Sorry, this sounds totally nonsense and not helpful for anyone having the same problem... just check the local dev build with xcode and prod build are working before debugging this problem
I'm still having this issue. I started using branch on v4.2.1, and this issue was occurring when trying to call generateShortUrl on my BUO while on android it works fine. I found this thread and tried updating to v4.3.0, called pod update Branch and all that good stuff, re-installed the app on the simulator with this new v4.3.0 and the issue still persists. As mentioned above, the promise never seems to resolve or reject. I think I'm doing everything right as it works on Android and correctly generates a URL unique to my object. I suggest re-opening either this issue or #384
@japser36 can you provide a quick code snippet for us to reproduce? Preferably the code snippet would compile and result in the error without needing to reference any of your other code. Then we can test this on SDK v4.2.1 on iOS.
Thanks!
Hi @derrick-branch, I've created a test project repository containing a new react-native project with branch set up in as similar as possible a manner as we have set it up on our main project. During this process, I was actually able to get branch working on both iOS and Android in the test project, so I tried making sure all the exact same steps are taken on our main project. However, still no luck on the main project. The test repo is here, and every step should be well documented.
Unfortunately I cannot post source code from our main project. I have made sure to follow all the same steps I did in this project on our main project, but there is still the difference in results.
Could it be a dependency issue? On our main project we have included several dependencies that required some modifying on the native level, including react-native-firebase, react-native-mapbox-gl, react-native-push-notification, facebook and google O-auth, and another big one is react-viro. Are there any known conflicts with these libraries? The code in our main project on the JS level is basically identical to what is included in the test repo linked above.
Hey @japser36, unfortunately I'm not knowledgeable enough about this to say. @jdee when you get a chance, can you jump in here and see if you have any ideas?
Definitely going to be tough if you see this working just fine in the test repo. Thanks for being so thorough here, @japser36
Hi @japser36. It's hard to know if you can't share the code. Perhaps we could do a screen share? I know that still involves showing me your code, but I'm sure if I could sit in front of your project, I could get it working. I'll be getting a release out for RN < 0.60, hopefully today. That's a big priority for a lot of users, but shouldn't take too much time. After that, I should have some time to dig deeper into your issue.
Hi @jdee, a screen share would work fine. Hopefully you can help us figure out what's causing this issue. What time would work for you, and what com platform?
Hi @japser36. I'm PST. Not sure of your time zone. I'm pretty well free today and Friday, all day both days. Take your pick on com platform. We use Zoom a lot here, but I can also easily use Google Hangouts or FaceTime. Please feel free to use [email protected] for a calendar invite or to make contact any other way. Look forward to chatting and figuring out the issue.
I am on v4.4.0 same issue, promise never resolves. Is there a fix or what was the outcome of the above call?
Still facing this issue. I am using v5.0.0. and tried downgrading to 4.x.0 versions as well. generateShortUrl never resolves or rejects. I changed now to use the same code that was reported here as working but still no success. Any solution for this? Or any other way to share a link? As showShareSheet does not include a link by itself.
I encountered the same issue when using expo-branch
version version "3.0.0"
which looks like it uses react-native-branch "5.0.0"
Ended up using the REST api to generate the short link
This still occurs using 5.0.4
I encountered the same issue when using
expo-branch
versionversion "3.0.0"
which looks like it usesreact-native-branch "5.0.0"
Ended up using the REST api to generate the short link
facing the same issue, thankfully there's a REST api to fallback on
Also happens for me, the only weird thing is that it works on iOS but always hangs generateShortUrl on Android. "expo": "^43.0.1", "expo-branch": "5.1.0",
Originally was identified with expo-branch "5.0.1", tried to upgrade to the lates with the same results. Any help would be greatly appreciated.