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

Shopify App Installation #81

Open
yukihiro-hyakuta opened this issue May 13, 2023 · 3 comments
Open

Shopify App Installation #81

yukihiro-hyakuta opened this issue May 13, 2023 · 3 comments

Comments

@yukihiro-hyakuta
Copy link

yukihiro-hyakuta commented May 13, 2023

Dear

I hope this message finds you well. I am a web system developer and a beginner at developing Shopify apps. I am writing to express my gratitude for the project you've created. It has been an invaluable resource in my learning journey, and I am truly thankful.

That being said, I am currently experiencing a bit of trouble and was hoping you might provide some advice. Specifically, I am unable to install from the server log. When using the ShopifyCLI, the URL format becomes https://[tunnel_url]?shop=[dev_store].myshopify.com&host=[host]. However, the format appears different for the Example @nestjs-shopify application.

On the Shopify page, it states:

Step 3: Install your app on your development store
With the server running, press p to open your app's preview URL in a browser.

The URL follows the format https://[tunnel_url]?shop=[dev_store].myshopify.com&host=[host], where [host] is the base64-encoded host parameter used by App Bridge, and represents the container the app is running in.

When you open the URL, you're prompted to install the app on your development store.

Click Install app to install the app in the store.

I've followed these steps, but I'm still encountering issues. I would deeply appreciate any assistance or guidance you might be able to provide. Once again, thank you for your time and for the valuable resource you've shared with the community.

@tolgap
Copy link
Member

tolgap commented May 16, 2023

@yukihiro-hyakuta what is the issue you're encountering? Do you have any logs or errors you could show?

@yukihiro-hyakuta
Copy link
Author

Thank you for your response.
The question I had previously asked has resolved itself. I had mistakenly thought I was using the shopify cli method.
My apologies.

But I have another problem.
I have completed the installation procedure.
However, the terminal screen stops at the following state

[Nest] 28683  - 05/21/2023, 7:47:23 AM     LOG [Shopify] [shopify-api/INFO] Completing OAuth | {shop: myshop.myshopify.com}
[Nest] 28683  - 05/21/2023, 7:47:23 AM     LOG [Shopify] [shopify-api/DEBUG] OAuth request is valid, requesting access token | {shop: myshop.myshopify.com}
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [Shopify] [shopify-api/INFO] Creating new session | {shop: myshop.myshopify.com, isOnline: true}
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [MikroORM] [query] select `s0`.* from `sessions` as `s0` where `s0`.`id` = 'myshop.myshopify.com_94006286394' limit 1 [took 0 ms]
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [MikroORM] [query] begin
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [MikroORM] [query] update `sessions` set `state` = '00000004067969', `expires` = 1000000042208, `access_token` = 'shpca_0000000000000000000', `online_access_info` = '{"expires_in":0000000,"associated_user_scope":"write_products","session":"b85efd7144b85efd7144b85efd714b85efd7144b85efd7144b85efd7144335","account_number":0,"associated_user":{"id":00000286394,"first_name":"MYNA","last_name":"MEIS","email":"info@mail.com","account_owner":true,"locale":"ja-JP","collaborator":false,"email_verified":true}}' where `id` = 'myshop.myshopify.com_94906286394' [took 2 ms]
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [MikroORM] [query] commit
[Nest] 28683  - 05/21/2023, 7:47:24 AM     LOG [MikroORM] [query] select `s0`.* from `shops` as `s0` where `s0`.`domain` = 'myshop.myshopify.com' limit 1 [took 0 ms]

Browser screen shows like this.

{"statusCode":404,"message":"Cannot GET /?shop=myshop.myshopify.com&host=YWRtaW4utaW4uGtaW4ujtaW4u3RtaW4ueG4tctaW4utaW4upN2taW4umtaW4u2V2bXRi","error":"Not Found"}

What do I need to take care of?

@robertkraig
Copy link

I know it's probably taken you a while, but you have to goto:
https://partners.shopify.com/{id}/apps/{id}/edit
you then have to make sure you updated:
App URL: with your ngrok-fqdn or your-fqdn-domain.com:
Allowed redirection URL(s):
https://your-fqdn-domain/api/online/callback
https://your-fqdn-domain/api/online/auth
https://your-fqdn-domain/api/offline/callback
https://your-fqdn-domain/api/offline/auth

Once you do this, things will start to work.
Remember, making the test store is just your 1st step, then you have to also setup your Partner Account, and create an App. The app you create in your Partner Account is where you obtain your access key / secret.

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

3 participants