I am trying to install my test app to my test store and it returns the following error.
“Oauth error invalid_request: The redirect_uri is missing”
Never seen this error so far since its different from the “The redirect_uri is not whitelisted”.
I guess this is the error from @Shopify_77 itself since I confirmed my request contains the request_uri.
Does anybody have an idea?
Hi @sonngu ,
Thank you for reaching out to the Shopify community.
Please whitelist the URL where your app is redirecting from Shopify, for example after clicking the install app, where the application redirects.
To whitelist the URL :
-
Navigate to partner dashboard → Navigate to your app → go to App Setup
-
Add the URL in a new line at the URLs section → Allowed redirection URL(s) Text Field
Once you add the URL please check if the error is solved. ref
Thanks,
@chetancrao Thanks for your reply. At first, I doubted that so I checked it. But it’s already whitelisted and you can see I’ve already mentioned it’s different from the “The redirect_uri is not whitelisted” error. Do you have any other ideas?
Hi @chetancrao , we can confirm the same issue for the past couple of days.
We’ve been running a few apps in Shopify with
thousands of merchants but we started getting complainings since yesterday
we are sure that the issue on the Shopify side we haven’t seen this before
Could you forward this to your dev team and rise an investigation ?
@chetancrao We also have the same issue. The redirect_url that is provided has been whitelisted but we’re still getting the same error.
@chetancrao Please ignore my comment above. I was mistakenly escaping the query string parameters. Not an issue for me.
I’m having this same issue even when the redirect URL is set
Where did you escape them?
Same issue here. The error is happening for shops that was workign fine for long. But suddenly I cannot login into them
We’ve fixed it in our app.
The issue was that oath url string in browser input contained escaped ampersand
so it was & instead just & that’s why there was error. Because if you have in url string
something like this: &request_uri=some-url.com it is not considered as &request_uri=some-url.com by the browser and that’s why Shopify throws this exception.
To fix the issue check you code where url string was escaped and fix it.
How were you able to fix this if that redirect URL is changed by Shopify itself?
We haven’t changed anything in the app and it was woeking fine, but suddenly we started to get this issue. Yes, & in URL is changed to &, but our app does not generate such link, our app has “&” in links
If you use js window.location.href for redirection, check this out:
https://stackoverflow.com/questions/10386341/having-an-ampersand-in-a-querystring-parameter?rq=3
To be honest we managed to fix the issue. Yes, we were sending &
The problem is that the redirection code wasn’t changed since 2022 or something, but suddenly it broke. So definitely something was changed in a way how Shopify handles the link, so the bug remained hidden.
same for us we still don’t know what happened but we’ve fixed it as well
I realized something interesting. I think this is not because of shopify. I realized that this is because of chrome browser updated something. ex. in json string, for quote character I saw " but now I see "e; Have you updated the chrome browser recently?
we faced this issue with Mozilla FF