Shopify/shopify-app-template-node

"nbf" claim timestamp check failed because of different timestamps

sapeol opened this issue · 3 comments

Issue summary

npm run dev seems to show different time than the current system time causing "nbf" claim timestamp check failed . I am pretty sure i am doing something wrong here but i am not sure what

  • @shopify/shopify-app-express version: 1.0.0
  • Node version: v16.18.0
  • Operating system: Debian Sid
2023-01-01 17:23:10 | backend  |
2023-01-01 17:23:10 | backend  | > dev
2023-01-01 17:23:10 | backend  | > cross-env NODE_ENV=development nodemon index.js --ignore ./frontend
2023-01-01 17:23:10 | backend  |
2023-01-01 17:23:10 | frontend |
2023-01-01 17:23:10 | frontend | > dev
2023-01-01 17:23:10 | frontend | > vite
2023-01-01 17:23:10 | frontend |
2023-01-01 17:23:10 | backend  | [nodemon] 2.0.20
2023-01-01 17:23:10 | backend  | [nodemon] to restart at any time, enter `rs`
2023-01-01 17:23:10 | backend  | [nodemon] watching path(s): *.*
2023-01-01 17:23:10 | backend  | [nodemon] watching extensions: js,mjs,json
2023-01-01 17:23:10 | backend  | [nodemon] starting `node index.js`
2023-01-01 17:23:11 | frontend |
2023-01-01 17:23:11 | frontend |   vite v2.9.15 dev server running at:
2023-01-01 17:23:11 | frontend |
2023-01-01 17:23:11 | frontend |   > Local:    http://localhost:44657/
2023-01-01 17:23:11 | frontend |   > Network:  http://192.168.1.7:44657/
2023-01-01 17:23:11 | frontend |
2023-01-01 17:23:11 | frontend |   ready in 1066ms.
2023-01-01 17:23:11 | frontend |

Expected behavior

It should be the same time as now which is around 11pm

Actual behavior

Time is way off

Steps to reproduce the problem

  1. Be on debian sid with the same packages
  2. Run npm init @shopify/app@latest
  3. Run npm run dev

I just tried it on my windows box and it worked as expected so it was a problem on gnome's end. I had to install couple packages to setup the time remotely from ntp server.

sudo apt-get install ntp
sudo apt-get install ntpdate

and then
sudo ntpdate ntp.ubuntu.com

This should fix your clock for your local time.

reference : askubuntu

This happend to me on windows. I was able to fix it by going to Windows Settings > Date and time > Sync now.

uilyam commented

I ran into this on Mac as well. I had manual time set, change it to automatically sync in the settings resolved it. Ran into the same issue with the remix template.