react-nativereact-native-firebase

Error: 400: Your project does not own Dynamic Links domain


I'm using react-native-firebase to create dynamic links, when I create standard link everything works fine, but when I'm creating short link, it gives an error:

"Error: 400: Your project does not own Dynamic Links domain".

Any ideas how is possible to fix that?

UPDATE: problem occurs only in Android, in IOS works fine

Code for the creating short dynamic link:

onClickShare= () => {
const link =
    new firebase.links.DynamicLink(redirectLink , Config.FIREBASE_CONFIG.dynamicLink)
      .android.setPackageName(Config.ANDROID_PACKAGE_NAME)
      .ios.setBundleId(Config.IOS_BUNDLE_ID)
      .ios.setAppStoreId(Config.IOS_APP_STORE_ID)
      .social.setDescriptionText(description)
      .social.setTitle(this.props.event.title)

      firebase.links()
      .createShortDynamicLink(link, 'SHORT')
      .then((url) => {
      Share.share({
        message: _('shareLinkMessage') + " " + url,
        title: _('shareLinkTitle'),
       }, {
        // Android only:
        dialogTitle:  _('shareLinkAndroid'),
        })
      }) 

Solution

  • If you get such error, update your google-services.json file!