Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Missing auth url - MissingAuthUrlException #926

Closed
KevinSHansen opened this issue Jul 30, 2021 · 19 comments
Closed

Missing auth url - MissingAuthUrlException #926

KevinSHansen opened this issue Jul 30, 2021 · 19 comments

Comments

@KevinSHansen
Copy link

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

The app should install but it doesnt get a URL return

Current Behavior

Its returns MissingAuthUrlException when it tries to return the shop shop.

Failure Information

Stack trace:

{
"class": "Osiset\ShopifyApp\Exceptions\MissingAuthUrlException",
"message": "Missing auth url",
"code": 0,
"file": "/var/www/html/vendor/osiset/laravel-shopify/src/Traits/AuthController.php:47",
"trace": [
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:254",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:197",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:695",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:50",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:78",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167",
"/var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167",
"/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.p

Steps to Reproduce

When installing the app. Ive updated from 16 to 17 and since then it returns this error

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Package Version: v17
  • Laravel Version: 8.52.0
@gnikyt
Copy link
Owner

gnikyt commented Jul 30, 2021

See my comment in 908

@kaya-mikail
Copy link

Did anyone resolved this problem? Tried to fix it multiple times. On former attempts i used ngrok but now switched to laravel-windows and have the same issue. "Missing auth url".
The information about the shop is stored in the database except the password.
Tried both with auth and without auth installation.

@KevinSHansen
Copy link
Author

Sadly not yet. Still struggling with this. @kaya-mikail

@KevinSHansen
Copy link
Author

It does indeed save everything in the DB, just not the token.

Im using the newest shopify-app config, and changed the webhooks to use GraphQL topics, but nothing solved the problem.

@kaya-mikail
Copy link

I don't understand why this problem suddenly occurs.
We tried to install the app on a development store directly from the Partner Dashboard.
I am coming to the OAuth screen wehere I have to grant access for the app.
Before I give permission to the app, I can see that in the database the information about the shop is inserted except "password" column. This one is empty.
After clicking Install app it redirects me and the app error is displayed (not in iframe, it is a whole page).

The point this gets weird is that I installed a fresh laravel with this shopify package and it worked without any problem. This was 6 or 7 days ago.
Since then nothing changed in the package but I am facing this problem. Tried to install with fresh laravel project a couple of times - also on other computers - but without success.
I was always using ngrok. Also when on former installation where it worked well.
Can anyone give me a hint about that?

@ghost
Copy link

ghost commented Aug 4, 2021

Can I ask you to create a new laravel application and try to reproduce this error there?
and then upload this app to githab and share the link.

then i think i could help you

@kaya-mikail
Copy link

kaya-mikail commented Aug 4, 2021

PROBLEM SOLVED!

The problem seems to be on working / testing local with ngrok or valet-windows.
We set up an nginx server today on a vserver. Now everything work fine.

@KevinSHansen
Copy link
Author

PROBLEM SOLVED!

The problem seems to be on working / testing local with ngrok or valet-windows.
We set up an nginx server today on a vserver. Now everything work fine.

So the error was happening because of your development enviroment?

@gnikyt
Copy link
Owner

gnikyt commented Aug 6, 2021

Please close if solved, thanks :)

@KevinSHansen
Copy link
Author

Sadly i havent solved this yet. Will be closed when its solved.

@KevinSHansen
Copy link
Author

I just noticed following:

Before hitting /authenticate it receives a status 302 from /admin/oauth/grant (shopify). And then its redirected to authenticate with a status 500 and it throws the MissingAuthUrlException.

@KevinSHansen
Copy link
Author

Problem found.

  1. Update migration (needed column with updated password)
  2. Post routes cant be within middleware to auth
  3. Changed tokenRedirect everywhere.

@mudassirali007
Copy link

@KevinSHansen can you explain? I am not able to solve the issue at fresh install.

@aungkoko0606
Copy link

@KevinSHansen can you specify about point no.3? I'm testing at local with ngrok and getting the same status 302 and 500.

@haseebbutt1999
Copy link

Problem found.

  1. Update migration (needed column with updated password)
  2. Post routes cant be within middleware to auth
  3. Changed tokenRedirect everywhere.

thanks working for me !

@CHEWX
Copy link

CHEWX commented May 5, 2022

Problem found.

  1. Update migration (needed column with updated password)
  2. Post routes cant be within middleware to auth
  3. Changed tokenRedirect everywhere.

Anymore info here? @KevinSHansen

@inazeem
Copy link

inazeem commented Aug 18, 2022

Problem found.

  1. Update migration (needed column with updated password)
  2. Post routes cant be within middleware to auth
  3. Changed tokenRedirect everywhere.

thanks working for me !

I am having the similar issue what did you do to solve it? Please help

@zainakramimage
Copy link

I am also getting the same error.

Screenshot 2022-08-20 110210

please help me I have no idea how to fix this.

@zainakramimage
Copy link

After wasting 4 to 5 hours it was APP_URL issue in .env file if you are using the ngrok then your APP_URL = 'ngrok_url' then it will work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants