WebhooksManagerJob throws an error if a token has been refreshed
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 77/100
Direzione di ricerca
L’issue rimanda alle righe 10–12 di app/jobs/shopify_app/webhooks_manager_job.rb. Leggi come il job riceve e usa il token, poi segui il modo in cui può trovare uno shop a partire da shop_domain e chiamare shop.with_shopify_session. Verifica che il job vada a buon fine quando il token dello shop viene aggiornato dopo che il job è stato messo in coda.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue summary
Before opening this issue, I have:
- Upgraded to the latest version of the package
shopify_appversion: 23.0.3- Ruby version: 4.0.10
- Operating system: any/all
- Set
log_level: :debugin my configuration, if applicable - Found a reliable way to reproduce the problem that indicates it's a problem with the package
- Looked for similar issues in this repository
- Checked that this isn't an issue with a Shopify API
- If it is, please create a post in the Shopify community forums or report it to Shopify Partner Support
After migrating to using expiring access tokens I'm seeing ShopifyAPI::Errors::HttpResponseError thrown from ShopifyApp::WebhooksManagerJob. The issue seems to be that the job is queued with a particular token, and then if the shop token is refreshed before the job executes the token passed to the job is no longer valid.
Expected behavior
It should be able to run after a token has been refreshed.
This is the problematic code block:
Instead of relying on a passed token, it should look up the shop using the shop_domain that is passed in, and then use shop.with_shopify_session.
Actual behavior
It tried to use a token that is no longer valid.
Steps to reproduce the problem
- Queue a
ShopifyApp::WebhooksManagerJobwith no workers running - Allow sufficient time to pass
- Start a worker
- Get a
ShopifyAPI::Errors::HttpResponseError
- Lingua principale
- Ruby
- Stelle
- 2k
- Fork
- 743
- Merge medio
- 7h 57m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Shopify/shopify_app
-
devtools-gardener
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Shopify/shopify_app#2093 ·
-
devtools-gardener
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Shopify/shopify_app#2074 · 1 commento · 1 reazione ·
-
Ruby 4.0 compatibility: CGI.parse removed in LoginProtection#return_address_with_paramsForse già presa @bvogel l’ha presa 277 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Shopify/shopify_app#2057 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Shopify/shopify_app#2097 · 4 commenti · 1 reazione ·
-
devtools-gardener
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Shopify/shopify_app#2079 · 2 commenti ·
Tutte le issue di Shopify/shopify_app
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
simp/pupmod-simp-simp#430 ·
I maintainer di solito rispondono entro 1 giorno
-
Gateway 3.16 Admin API: correct the response schemas for GET /audit/requests and GET /audit/objectsApertauser-reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Kong/developer.konghq.com#8382 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
simp/puppetsync#130 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
yegor256/iccq.github.io#181 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
metanorma/metanorma#768 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno