gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Unable to get shop domain, at the time of installation #407

Closed ghost closed 4 years ago

ghost commented 4 years ago

I use the v10.3.1 version of the package. As soon as I install it on a clean store, I have an error " Unable to get shop domain. ".

vendor/ohmybrew/laravel-shopify/src/ShopifyApp/Middleware/AuthShop.php:137

previously, there was no such thing on v10.2.1.

What could be the problem?

RandomWeasel commented 4 years ago

What URL is your browser viewing when you get this message? I see the same message when the app hasn't correctly redirected back to the shopify url (so when my browser is pointing at localhost, rather than my-shop-name.myshopify.com)

ghost commented 4 years ago

What URL is your browser viewing when you get this message? I see the same message when the app hasn't correctly redirected back to the shopify url (so when my browser is pointing at localhost, rather than my-shop-name.myshopify.com)

if I'm trying to go into an already installed application, I'm being redirected to an address https://vdubov-teststore.myshopify.com/admin/oauth/authorize?client_id=76a824f2bae3761cdb2f6f1760a4cd65&scope=read_script_tags%2Cwrite_script_tags%2Cread_themes%2Cwrite_themes%2Cread_products&redirect_uri=https%3A%2F%2Fvdubov.simtechdev.us%2Fshopify-addon-custom-js%2Fpublic%2Fauthenticate

at first glance, everything looks right, but there's a mistake.

and there's no such problem in a firefox.

Jamesking56 commented 4 years ago

What browser are you using?

ghost commented 4 years ago

Какой браузер вы используете?

Chromium 80.0.3987.87 Firefox 73.0.1

In chromium, if I clean out the cookies of my app and try to go into it, I get an error: Unable to get shop domain image

when restart the application, it's fine. in Firefox everything works from the beginning.

Jamesking56 commented 4 years ago

Are you using any sort of ad blocking in your browser? I've noticed issues with Brave's default ad blocking

On Tue, 10 Mar 2020, 11:27 am Vitaly, notifications@github.com wrote:

Какой браузер вы используете?

Chromium 80.0.3987.87 Firefox 73.0.1

In chromium, if I clean out the cookies of my app and try to go into it, I get an error: Unable to get shop domain [image: image] https://user-images.githubusercontent.com/32259003/76308090-7ea40c80-62e3-11ea-8fd5-2d5bb52df581.png

when restart the application, it's fine. in Firefox, everything works from the beginning.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/osiset/laravel-shopify/issues/407?email_source=notifications&email_token=AAB52NMIZDMEMVO4F6FWOSDRGYPZ3A5CNFSM4LBNBMEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLA7PY#issuecomment-597036991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB52NJWUYFOHII7GNLDOJ3RGYPZ3ANCNFSM4LBNBMEA .

ghost commented 4 years ago

Are you using any sort of ad blocking in your browser? I've noticed issues with Brave's default ad blocking

on the work computer, yes, it's adblock. not on your home computer.

overall, i have this problem in all chrome-based browsers (chrome, chromium, ms edge, opera). on unix systems, windows and mobile devices.

and on firefox, everything is fine (including the mobile version).

skygdi commented 4 years ago

I found the issue was somehow caused by using "http". So, forcing to use "https" could solved the problem https://stackoverflow.com/questions/35827062/how-to-force-laravel-project-to-use-https-for-all-routes/50682278 Add following string to AppServiceProvider::boot() method (for version 5.4+): \Illuminate\Support\Facades\URL::forceScheme('https');

ghost commented 4 years ago

I found the issue was somehow caused by using "http". So, forcing to use "https" could solved the problem https://stackoverflow.com/questions/35827062/how-to-force-laravel-project-to-use-https-for-all-routes/50682278 Add following string to AppServiceProvider::boot() method (for version 5.4+): \Illuminate\Support\Facades\URL::forceScheme('https');

I think that's the problem. Thank you.