Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployed on AWS show error Missing host query argument #462

Open
NomanHameed opened this issue Aug 1, 2023 · 8 comments
Open

deployed on AWS show error Missing host query argument #462

NomanHameed opened this issue Aug 1, 2023 · 8 comments

Comments

@NomanHameed
Copy link

NomanHameed commented Aug 1, 2023

ISSUE SUMMERY

Trying to deploy Shopify-App-Temp-PHP on AWS ec2 but getting error Missing host query argument

What I Try to Do
Setup Apache2 on AWS EC2 instance and

git clone git-url-of-my-app

in root directory run

npm install
cd web

update .env as per requirements then run

composer install
php artisan migrate --seed
cd ..
npm run build

also change root path to

/var/www/html/app/web/public

then got error

Missing host query argument
Your app can only load if the URL has a host argument. Please ensure that it is set, or access your app using the Partners Dashboard Test your app feature

please guide if anyone solve this issue before also share some document if i'm not deploy in right way on AWS.
share some helping guide to deploy shopify-app-temp-php app on AWS.

Thanks.

@Muhammad-Daniyal4
Copy link

Remove node modules and install it again by running npm i. Hopefully It will run.

@waqas61
Copy link

waqas61 commented Sep 5, 2023

@NomanHameed Salam !

I am trying to publish at cpanel but app is not redirecting to Exitframe for auth.

Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given

Can you please tell me steps for making build on windows?

Thank You

@NomanHameed
Copy link
Author

@waqas61 please try to load you app URL with a shop parameter example below

https://{app.url.com}/?shop={shopify-store-url}

and for build use command on local

npm run build --api-key=REPLACE_ME

if still any issue feel free to ask.

@rafaelstz
Copy link

Hi @waqas61, make sure your shop URL is correct (e.g. storename.myshopify.com). Then you can access:

https://{app.url.com}/api/auth?shop={shopify-store-url}

I made some changes in my code to make sure it shows an install page instead of an error when you access other URLs, or when you don't have the shop params.

@waqas61
Copy link

waqas61 commented Sep 8, 2023

@rafaelstz and @NomanHameed

I have deployed the app successfully.
Actaully there was issue with env api key while app building on windows.
I had to set enviroment variable for api key in powerhshell for build .

Really thankful for your time and support.No words for appreciate but

Thank you .

@sonali-webmavens
Copy link

Hi @waqas61, make sure your shop URL is correct (e.g. storename.myshopify.com). Then you can access:

https://{app.url.com}/api/auth?shop={shopify-store-url}

I made some changes in my code to make sure it shows an install page instead of an error when you access other URLs, or when you don't have the shop params.

Hi, @rafaelstz
I am facing the same error. I tried as you suggested above. Below is my code.

Route::get('/', function (Request $request) {
    $session = $request->get('shopifySession');
     INFO($session);
       if (empty($session)) {
        $shop = $request->query('shop');
        return redirect('/api/auth?shop='.$shop);
    }
});

The above code is not working with the production URL. It is not redirecting.

I also notice. If I add a URL in-app setup like below.

https://{app.url.com}/api/auth

It shows an installation page.
However, after that it reloads multiple times and gives the error App is not loading properly.

Any help would be appreciated.

@waqas61
Copy link

waqas61 commented Oct 20, 2023

@sonali-webmavens

Thank You

@vaimeo
Copy link

vaimeo commented Mar 16, 2024

The issue exist on the development state also.

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

No branches or pull requests

6 participants