const link =
new firebase.links.DynamicLink('https://linkify.page.link', 'linkify.page.link')
.android.setPackageName('com.linky')
.ios.setBundleId('com.example.ios');
firebase.links()
.createShortDynamicLink(link, 'UNGUESSABLE')
.then((url) => {
console.log(url,"the url")
// ...
});
The above code works fine in case if i downgrade to 5.4.3 as i am able to generate the dynamic short link but if I upgrades to 5.5.3 i got an error saying:
Error 400: long link is not parsable:
Also i am able to generate long dynamic links using method createDynamicLink but i am not able to create short dynamic link while upgrading to 5.5.3
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:
# N/A
#### `AppDelegate.m`:
// N/A
I have compared the two java files RNFirebaseLinks.java of version 5.4.3 and 5.5.3 and found a difference in the files which is as follow:
In version 5.4.3 the line at 222 is
builder.setDynamicLinkDomain(linkData.getString("dynamicLinkDomain"));
but in version 5.5.3 the line at 222 is
builder.setDomainUriPrefix(linkData.getString("domainURIPrefix"));
I tried changing this line 5.5.3 but then it gives another error
Error: dynamicLinkDomain
Click To Expand
#### `android/build.gradle`:
// N/A
#### `android/app/build.gradle`:
// N/A
#### `android/settings.gradle`:
// N/A
#### `MainApplication.java`:
// N/A
#### `AndroidManifest.xml`:
<!-- N/A -->
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-firebase": "^5.5.3"
Click To Expand
**`react-native info` output:**
OUTPUT GOES HERE
- **Platform that you're experiencing the issue on**:
- [ ] **Android** but have not tested behavior on iOS
- **`Firebase` module(s) you're using that has the issue:**
- Dynamic Links
- **Are you using `TypeScript`?**
- `Y/N`No
Think react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
React Native Firebase
and Invertase
on Twitter for updates on the library.Didn't follow template so I don't know what pods you use. The change you mentioned in the module code here is quite specifically most of the breaking change between the two versions 5.4 and 5.5. Have you updated your code to match the release notes publicized with each npm install for 5.4 and 5.5?
What is the difference between version 5.4 to 5.4 on createShortDynamicLink?
I can't create link also
Please be precise - 5.4 to 5.4 is no difference
5.4 to 5.5 you must migrate how you do your custom domain
https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#Upgrade-instructions
Without precise information on what version you use I can鈥檛 offer any guidance
I done all the upgrades
but unfortunately not working
I see 5.4 to 5.4 is no difference but on 5.4 is working and on 5.5 not
at the same code
at new firebase.links.DynamicLink(link, dynamicLinkDomain);
you need to update the dynamicLinkDomain from 'something.page.link' into 'https://something.page.link'
@minhtc
Thanks your suggested solution worked for me !!.
I Changed my code from:
const link =
new firebase.links.DynamicLink('https://linkify.page.link', 'linkify.page.link')
.android.setPackageName('com.linky')
.ios.setBundleId('com.example.ios');
firebase.links()
.createShortDynamicLink(link, 'UNGUESSABLE')
.then((url) => {
console.log(url,"the url")
// ...
});
to:
const link =
new firebase.links.DynamicLink('https://linkify.page.link', 'https://linkify.page.link')
.android.setPackageName('com.linky')
.ios.setBundleId('com.example.ios');
firebase.links()
.createShortDynamicLink(link, 'UNGUESSABLE')
.then((url) => {
console.log(url,"the url")
// ...
});
Changing the line
new firebase.links.DynamicLink('https://linkify.page.link', 'linkify.page.link')
to
new firebase.links.DynamicLink('https://linkify.page.link', 'https://linkify.page.link')
Worked for me.
Just to note that I鈥檓 sorry this took your time, but it is exactly as documented in the upgrade notes: https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#Upgrade-instructions
Just to note that I鈥檓 sorry this took your time, but it is exactly as documented in the upgrade notes: https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#Upgrade-instructions
@mikehardy yes it is mentioned in the change log but i followed the documentation for dynamic links and selected the version 5.x.x and tried using that .No where it's mentioned in documentation that there is change in code when you migrate from 5.4 to 5.5 or step to follow for 5.5. Now in future i will also follow the change log along with documentation so that i won't face these kind of issues.
Thanks for the this library and for a quick reply
I understand that is frustrating. I needed to do a breaking change in order to support the newer SDKs, and attempted to message the same at postinstall time every postinstall. Is there some other way to communicate that people need to check the release notes? If you can think of one, I鈥檒l try to put more notice up
at
new firebase.links.DynamicLink(link, dynamicLinkDomain);
you need to update the dynamicLinkDomain from 'something.page.link' into'https://something.page.link'
I love you man after 3 hours of research, this worked!
Hope help for anyone like me
This link is working 'https://example.page.link'
This link is not working 'https://example.page.link/'
different '/'
Most helpful comment
at
new firebase.links.DynamicLink(link, dynamicLinkDomain);
you need to update the dynamicLinkDomain from 'something.page.link' into 'https://something.page.link'