Firebase dynamic link request contains an invalid argument
Am trying to build a dynamic url, using Firebase dynamic links but i get a exception.
private void sendNativeInvites(){
String email = UserUtils.getCurrentUser(this).getEmail();
String link = "https://play.google.com/store/apps/details?id=com.mindedges.beephourly?invitedby=" + email;
FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse(link))
.setDomainUriPrefix("https://c6yge.app.goo.gl")
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
.buildShortDynamicLink()
.addOnSuccessListener(new OnSuccessListener<ShortDynamicLink>() {
@Override
public void onSuccess(ShortDynamicLink shortDynamicLink) {
Log.e(TAG, "Successfully built build dynamic link");
Uri invitationUrl = shortDynamicLink.getShortLink();
doSendInvite(invitationUrl);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.e(TAG, "failed to build dynamic link", e);
}
});
}
failed to build dynamic link
com.google.android.gms.common.api.ApiException: 400: Request contains an invalid argument.
at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(Unknown Source:12)
at com.google.firebase.dynamiclinks.internal.zzi.zza(Unknown Source:4)
at com.google.firebase.dynamiclinks.internal.zzn.dispatchTransaction(Unknown Source:10)
at com.google.android.gms.internal.firebase_dynamic_links.zzb.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:697)
Am not getting what wrong param am passing. I own the domain "https://c6yge.app.goo.gl" as per firebase console.
android firebase firebase-dynamic-links
add a comment |
Am trying to build a dynamic url, using Firebase dynamic links but i get a exception.
private void sendNativeInvites(){
String email = UserUtils.getCurrentUser(this).getEmail();
String link = "https://play.google.com/store/apps/details?id=com.mindedges.beephourly?invitedby=" + email;
FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse(link))
.setDomainUriPrefix("https://c6yge.app.goo.gl")
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
.buildShortDynamicLink()
.addOnSuccessListener(new OnSuccessListener<ShortDynamicLink>() {
@Override
public void onSuccess(ShortDynamicLink shortDynamicLink) {
Log.e(TAG, "Successfully built build dynamic link");
Uri invitationUrl = shortDynamicLink.getShortLink();
doSendInvite(invitationUrl);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.e(TAG, "failed to build dynamic link", e);
}
});
}
failed to build dynamic link
com.google.android.gms.common.api.ApiException: 400: Request contains an invalid argument.
at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(Unknown Source:12)
at com.google.firebase.dynamiclinks.internal.zzi.zza(Unknown Source:4)
at com.google.firebase.dynamiclinks.internal.zzn.dispatchTransaction(Unknown Source:10)
at com.google.android.gms.internal.firebase_dynamic_links.zzb.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:697)
Am not getting what wrong param am passing. I own the domain "https://c6yge.app.goo.gl" as per firebase console.
android firebase firebase-dynamic-links
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58
add a comment |
Am trying to build a dynamic url, using Firebase dynamic links but i get a exception.
private void sendNativeInvites(){
String email = UserUtils.getCurrentUser(this).getEmail();
String link = "https://play.google.com/store/apps/details?id=com.mindedges.beephourly?invitedby=" + email;
FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse(link))
.setDomainUriPrefix("https://c6yge.app.goo.gl")
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
.buildShortDynamicLink()
.addOnSuccessListener(new OnSuccessListener<ShortDynamicLink>() {
@Override
public void onSuccess(ShortDynamicLink shortDynamicLink) {
Log.e(TAG, "Successfully built build dynamic link");
Uri invitationUrl = shortDynamicLink.getShortLink();
doSendInvite(invitationUrl);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.e(TAG, "failed to build dynamic link", e);
}
});
}
failed to build dynamic link
com.google.android.gms.common.api.ApiException: 400: Request contains an invalid argument.
at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(Unknown Source:12)
at com.google.firebase.dynamiclinks.internal.zzi.zza(Unknown Source:4)
at com.google.firebase.dynamiclinks.internal.zzn.dispatchTransaction(Unknown Source:10)
at com.google.android.gms.internal.firebase_dynamic_links.zzb.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:697)
Am not getting what wrong param am passing. I own the domain "https://c6yge.app.goo.gl" as per firebase console.
android firebase firebase-dynamic-links
Am trying to build a dynamic url, using Firebase dynamic links but i get a exception.
private void sendNativeInvites(){
String email = UserUtils.getCurrentUser(this).getEmail();
String link = "https://play.google.com/store/apps/details?id=com.mindedges.beephourly?invitedby=" + email;
FirebaseDynamicLinks.getInstance().createDynamicLink()
.setLink(Uri.parse(link))
.setDomainUriPrefix("https://c6yge.app.goo.gl")
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
.buildShortDynamicLink()
.addOnSuccessListener(new OnSuccessListener<ShortDynamicLink>() {
@Override
public void onSuccess(ShortDynamicLink shortDynamicLink) {
Log.e(TAG, "Successfully built build dynamic link");
Uri invitationUrl = shortDynamicLink.getShortLink();
doSendInvite(invitationUrl);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.e(TAG, "failed to build dynamic link", e);
}
});
}
failed to build dynamic link
com.google.android.gms.common.api.ApiException: 400: Request contains an invalid argument.
at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(Unknown Source:12)
at com.google.firebase.dynamiclinks.internal.zzi.zza(Unknown Source:4)
at com.google.firebase.dynamiclinks.internal.zzn.dispatchTransaction(Unknown Source:10)
at com.google.android.gms.internal.firebase_dynamic_links.zzb.onTransact(Unknown Source:12)
at android.os.Binder.execTransact(Binder.java:697)
Am not getting what wrong param am passing. I own the domain "https://c6yge.app.goo.gl" as per firebase console.
android firebase firebase-dynamic-links
android firebase firebase-dynamic-links
edited Jan 26 at 11:00
Xenolion
3,23531231
3,23531231
asked Jan 19 at 20:56
user93796user93796
4,9342271116
4,9342271116
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58
add a comment |
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58
add a comment |
2 Answers
2
active
oldest
votes
I can see a minor error in your code. That have been caused by mistakenly copying some codes from the documentation without editing them.
Here is the lines that has caused your problems:
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
Instead of "com.example.android"
you were supposed to replace that with your own package name which I think it is "com.mindedges.beephourly"
. So in the documentation they wrote that just like an example but you were expected to change it to your own package name.
Also in the same code above instead of (125)
you are supposed to change that to your own version code. In android there are version codes for Apps and when you update an app you will have to change version code (integer) and version name (String) so you may have a number of App versions but in there you were supposed to pass the minimum the lowest version code that can open that dynamic link. I am forced not to believe you have ever made 125 updates in your app in Playstore. So if you want all your apps old and new version to open you could replace (125)
with (1)
. You can find the current version code in your build.gradle
files. In your project.
Let me know if you still face some difficulties.
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
add a comment |
Can you double check if you got the correct domain? Based on your code, it looks like everything works fine. However, the issue seems to be with your domain.
Checking the link as https://c6yge.app.goo.gl/?link=https://google.com, you should be redirected to https://google.com but it didn't. Instead, it just shows Dynamic Link not Found. So I'm thinking it's not properly configured.
Here's a sample working link: https://ratbu.page.link/?link=https://google.com.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54271329%2ffirebase-dynamic-link-request-contains-an-invalid-argument%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I can see a minor error in your code. That have been caused by mistakenly copying some codes from the documentation without editing them.
Here is the lines that has caused your problems:
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
Instead of "com.example.android"
you were supposed to replace that with your own package name which I think it is "com.mindedges.beephourly"
. So in the documentation they wrote that just like an example but you were expected to change it to your own package name.
Also in the same code above instead of (125)
you are supposed to change that to your own version code. In android there are version codes for Apps and when you update an app you will have to change version code (integer) and version name (String) so you may have a number of App versions but in there you were supposed to pass the minimum the lowest version code that can open that dynamic link. I am forced not to believe you have ever made 125 updates in your app in Playstore. So if you want all your apps old and new version to open you could replace (125)
with (1)
. You can find the current version code in your build.gradle
files. In your project.
Let me know if you still face some difficulties.
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
add a comment |
I can see a minor error in your code. That have been caused by mistakenly copying some codes from the documentation without editing them.
Here is the lines that has caused your problems:
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
Instead of "com.example.android"
you were supposed to replace that with your own package name which I think it is "com.mindedges.beephourly"
. So in the documentation they wrote that just like an example but you were expected to change it to your own package name.
Also in the same code above instead of (125)
you are supposed to change that to your own version code. In android there are version codes for Apps and when you update an app you will have to change version code (integer) and version name (String) so you may have a number of App versions but in there you were supposed to pass the minimum the lowest version code that can open that dynamic link. I am forced not to believe you have ever made 125 updates in your app in Playstore. So if you want all your apps old and new version to open you could replace (125)
with (1)
. You can find the current version code in your build.gradle
files. In your project.
Let me know if you still face some difficulties.
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
add a comment |
I can see a minor error in your code. That have been caused by mistakenly copying some codes from the documentation without editing them.
Here is the lines that has caused your problems:
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
Instead of "com.example.android"
you were supposed to replace that with your own package name which I think it is "com.mindedges.beephourly"
. So in the documentation they wrote that just like an example but you were expected to change it to your own package name.
Also in the same code above instead of (125)
you are supposed to change that to your own version code. In android there are version codes for Apps and when you update an app you will have to change version code (integer) and version name (String) so you may have a number of App versions but in there you were supposed to pass the minimum the lowest version code that can open that dynamic link. I am forced not to believe you have ever made 125 updates in your app in Playstore. So if you want all your apps old and new version to open you could replace (125)
with (1)
. You can find the current version code in your build.gradle
files. In your project.
Let me know if you still face some difficulties.
I can see a minor error in your code. That have been caused by mistakenly copying some codes from the documentation without editing them.
Here is the lines that has caused your problems:
.setAndroidParameters(
new DynamicLink.AndroidParameters.Builder("com.example.android")
.setMinimumVersion(125)
.build())
Instead of "com.example.android"
you were supposed to replace that with your own package name which I think it is "com.mindedges.beephourly"
. So in the documentation they wrote that just like an example but you were expected to change it to your own package name.
Also in the same code above instead of (125)
you are supposed to change that to your own version code. In android there are version codes for Apps and when you update an app you will have to change version code (integer) and version name (String) so you may have a number of App versions but in there you were supposed to pass the minimum the lowest version code that can open that dynamic link. I am forced not to believe you have ever made 125 updates in your app in Playstore. So if you want all your apps old and new version to open you could replace (125)
with (1)
. You can find the current version code in your build.gradle
files. In your project.
Let me know if you still face some difficulties.
answered Jan 26 at 11:33
XenolionXenolion
3,23531231
3,23531231
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
add a comment |
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
1
1
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
Thanks for the answer. I will try it and update my findings
– user93796
Feb 1 at 19:27
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
You are welcome. Happy Coding!
– Xenolion
Feb 1 at 19:43
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
I reid to replace the use correct name and set minversion to one, still getting same issue. Also when i try to manually create a link from firebase console i get error "here was an unknown error while processing the request. Try again. "
– user93796
2 days ago
add a comment |
Can you double check if you got the correct domain? Based on your code, it looks like everything works fine. However, the issue seems to be with your domain.
Checking the link as https://c6yge.app.goo.gl/?link=https://google.com, you should be redirected to https://google.com but it didn't. Instead, it just shows Dynamic Link not Found. So I'm thinking it's not properly configured.
Here's a sample working link: https://ratbu.page.link/?link=https://google.com.
add a comment |
Can you double check if you got the correct domain? Based on your code, it looks like everything works fine. However, the issue seems to be with your domain.
Checking the link as https://c6yge.app.goo.gl/?link=https://google.com, you should be redirected to https://google.com but it didn't. Instead, it just shows Dynamic Link not Found. So I'm thinking it's not properly configured.
Here's a sample working link: https://ratbu.page.link/?link=https://google.com.
add a comment |
Can you double check if you got the correct domain? Based on your code, it looks like everything works fine. However, the issue seems to be with your domain.
Checking the link as https://c6yge.app.goo.gl/?link=https://google.com, you should be redirected to https://google.com but it didn't. Instead, it just shows Dynamic Link not Found. So I'm thinking it's not properly configured.
Here's a sample working link: https://ratbu.page.link/?link=https://google.com.
Can you double check if you got the correct domain? Based on your code, it looks like everything works fine. However, the issue seems to be with your domain.
Checking the link as https://c6yge.app.goo.gl/?link=https://google.com, you should be redirected to https://google.com but it didn't. Instead, it just shows Dynamic Link not Found. So I'm thinking it's not properly configured.
Here's a sample working link: https://ratbu.page.link/?link=https://google.com.
answered Jan 24 at 14:20
dev.for.fundev.for.fun
268113
268113
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54271329%2ffirebase-dynamic-link-request-contains-an-invalid-argument%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What version of dynamic links are using?
– Xenolion
Jan 26 at 10:58