Skip to content

Could not create dynamic link on Android. setDomainURIPrefix couldn't find the relavant key in the ReadableMap. #2262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sauravexodus opened this issue Jun 19, 2019 · 11 comments
Labels
plugin: links Firebase Dynamic Links type: bug New bug report

Comments

@sauravexodus
Copy link

sauravexodus commented Jun 19, 2019

I am using
react-native-firebase: 5.5.2
implementation "com.google.firebase:firebase-invites:17.0.0"
implementation "com.google.firebase:firebase-dynamic-links:17.0.0"

The problem is at line:222 of RNFirebaseLinks.java where the domainURIPrefix is extracted from linkData ReadableMap. It should be dynamicLinkDomain.

@sauravexodus
Copy link
Author

I faced the same issue on iOS as well. The key should be dynamicLinkDomain on Line:206 in RNFirebaseLinks.m

@mikehardy
Copy link
Collaborator

No, this was a breaking change. Sorry it has caused you problems. You should stay on v5.4.x releases, or modify your code to adapt

We had to do it because the support for the key you want was literally removed from the SDK, so to track the SDK in v5.x.x we had to do a breaking change, please follow the release notes: https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#Upgrade-instructions and carefully note the breaking change warning when you install react-native-firebase now, and at the top of the release notes

@mikehardy mikehardy added plugin: links Firebase Dynamic Links Type: Docs labels Jun 19, 2019
@sauravexodus
Copy link
Author

I think you misunderstood the issue. I read the docs and breaking changes. But the changes don't align with code in JS and Native SDKs. That's what I am trying to point out here.

@sauravexodus
Copy link
Author

Unless someone goes and changes the key name in bridge files inside node_modules, creating dynamic links doesn't work at all. I am just pointing out so that it gets fixed in the next releases.

@mikehardy
Copy link
Collaborator

Oh - that's potentially very different then. Let me look more closely and if I didn't get those changes aligned all the way through then yes we'll need a 5.5.3 quickly with the fix.

@mikehardy
Copy link
Collaborator

#2240 is the PR that changed it

Here is where iOS uses the new key

Here is where Android uses it

Here is the Typescript change

Ah but dangit - I thought I got this one but it must have been lost in the git shuffle - I'm not hooking the new key up correctly - you are 100% right. 5.5.3 in just a moment

Sorry for the trouble - this module doesn't have CI / testing support in v5 so it is harder to get the change correct

@mikehardy mikehardy reopened this Jun 19, 2019
@mikehardy mikehardy added type: bug New bug report Version: 5.x.x and removed Type: Docs labels Jun 19, 2019
@mikehardy
Copy link
Collaborator

mikehardy commented Jun 19, 2019

Will you be able to test this? 5.5.3 is out on npmjs.com now @sauravexodus

@mikehardy
Copy link
Collaborator

I believe this is closed, please re-open if it does not work for you - I will do my best to fix it. Thanks for the quick report!

@sauravexodus
Copy link
Author

Thanks for the quick revert. I'll do a quick test and let you know.

mikehardy added a commit that referenced this issue Jun 19, 2019
* [BUGFIX][COMPILE][ANALYTICS] - conform to new config API location, Fixes #2259
* [BUGFIX][LINKS][domainURIPrefix] - correctly pass domainURIPrefix Fixes #2262
@sauravexodus
Copy link
Author

It works. Thanks!

@mikehardy
Copy link
Collaborator

Very happy to hear this! Thanks for the success report so I know the fix was good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: links Firebase Dynamic Links type: bug New bug report
Projects
None yet
Development

No branches or pull requests

2 participants