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

Error on fresh installation: "[ ShopifyApp | WARN | Shop Not Found ] Invalid JWT token for current Shopify session" #1713

Open
felixding opened this issue Aug 13, 2023 · 2 comments

Comments

@felixding
Copy link

Issue summary

I've got the same error every time I tried to install the app on a new Rails app:

Screen Shot 2023-08-14 at 8 47 10 AM

  • shopify_api version: (I'm not sure)
  • shopify_app version: 21.6.0
  • Ruby version: 3.1.3
  • Operating system: Asahi Linux (server) + Mac OS 12.6
Started GET "/products" for my_ip at 2023-08-13 23:28:46 +0000
Cannot render console from my_ip! Allowed networks: 127.0.0.0/127.255.255.255, ::1
Processing by ProductsController#index as */*
[ ShopifyApp | WARN | Shop Not Found ] Invalid JWT token for current Shopify session
[ ShopifyApp | WARN | Shop Not Found ] Invalid JWT token for current Shopify session
[ ShopifyApp | WARN | Shop Not Found ] Invalid JWT token for current Shopify session
Completed 401 Unauthorized in 3ms (ActiveRecord: 0.0ms | Allocations: 2637)
[ ShopifyApp | WARN | Shop Not Found ] Invalid JWT token for current Shopify session
[ ShopifyApp | INFO | Shop Not Found ] Installed store  -  deduced from user session
[ActiveJob] [ShopifyApp::WebhooksManagerJob] [31f2f0bc-904c-40b5-b4be-212b620c73fc] Performed ShopifyApp::WebhooksManagerJob (Job ID: 31f2f0bc-904c-40b5-b4be-212b620c73fc) from Async(default) in 2953.97ms

Expected behavior

I assume the sample products would show?

Actual behavior

The products doesn't load.

Steps to reproduce the problem

I followed the exact steps on README, except:

  1. I dockerized the Rails app
  2. I use Cloudflare Tunnel so the HOST is something like my-shopify-app.mydomain in the .env and Shopify Partner dashboard
  3. I use Postgresql and enabled the UUID extension
  4. The Rails app is running on my Asahi Linux server, while I'm coding and testing on another Mac.
@bhaskar8074
Copy link

Is it solved?

@betelgeus13
Copy link

@felixding @bhaskar8074

Ensure that the clock on the machine is syncing to Apple/Windows (whatever machine you have).

I got this answer from https://community.shopify.com/c/shopify-apps/why-am-i-getting-a-jwt-token-error-in-my-node-js-and-react-app/m-p/1123722/thread-id/34934

Very frustrating bug.

The issue started after I stopped syncing the machine clock online to do some other time zone testing. Unfortunately I did not connect the clock syncing with this and was plagued with this for weeks.

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