Auto-suspend results in JWT error: "nbf" claim timestamp check failed

Node.js app using @shopify/shopify-app-remix 2.8.2.


app = 'zzz'
primary_region = 'iad'

[build]

[env]
  PORT = '3000'

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = "stop"
  # auto_stop_machines = "suspend"
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  memory = '512mb'
  cpu_kind = 'shared'
  cpus = 1

Changed config from stop to auto_stop_machines = “suspend”. Was excited. App start time is fast now but noticed when app is restored from suspended state logging in gives “nbf” claim timestamp check failed error. This typically means there is timestamp skew between client and server. Switching back to stop eliminates this.

How to use suspend and avoid this error?

Hi… The auto-suspend feature is exciting, :bluegreen_artist:, but it’s also considered a little experimental (last I heard). The problems it causes with clock skew is one of the caveats that was mentioned when it was first released:

When resumed, your Machine may take a few seconds to update its clock, so for the first few seconds it will think that it’s in the past.

Work-arounds were discussed in the forum a couple months ago—but personally I would stick with stop in security-sensitive contexts for now.

Hope this helps!

Thanks for letting me know! Didn’t see this in the docs. Will checkout the workarounds.

1 Like