Shopify / ui-extensions

MIT License
265 stars 37 forks source link

useShippingAddress stopped working on the Thank You page #2058

Closed julien-mamalian closed 3 months ago

julien-mamalian commented 3 months ago

Please list the package(s) involved in the issue, and include the version you are using

"@shopify/ui-extensions": "2024.4.x", "@shopify/ui-extensions-react": "2024.4.x", "react": "^18.0.0",

Describe the bug

useShippingAddress(); in the "purchase.thank-you.block.render" extension target stopped working. It was working both on the live extension and locally but stopped working yesterday. shippingAddress returns undefined as well. I did not change anything and I have access to customer data.

Expected behavior

useShippingAddress should return the order shipping address

mkupiniak commented 3 months ago

Same issue here. Stopped working (returns undefined) out of nowhere, without changing anything else. CC @jamesvidler @henrytao-me

mkupiniak commented 3 months ago

Might be related: https://github.com/Shopify/ui-extensions/issues/1378

patryk-smc commented 3 months ago

Same here

yosef-grant commented 3 months ago

Same thing happened to me. It worked perfectly until Friday 7 June, now I get no value for useShippingAddress. Interestingly useBillingAddress has the same issue - returns undefined, but useEmail() returns the proper value as expected. Furthermore if you have extensions on the 3-page checkout that utilise the shipping address API, they all work as normal but once you hit the thank you page they report errors stating no address can be found. It seems to be an issue rooted on the Thank You page.

MathiasGr commented 3 months ago

Same here. Did anyone find a remediation?

MathiasGr commented 3 months ago

And did anyone here escalate to Shopify already?

jamesvidler commented 3 months ago

Thank you for reporting this issue. We have reproduced it and are investigating.

MathiasGr commented 3 months ago

Any news or ETA on a fix to communicate? This completely broke our app @jamesvidler

MathiasGr commented 3 months ago

@jamesvidler Is there a place where you communicate updates? I would assume the Shopify status page but it's all green 😬

jamesvidler commented 3 months ago

This issue has just been resolved. Can you please verify the shippingAddress is now returning the expected value?

patryk-smc commented 3 months ago

Works perfectly, thanks for the fix @jamesvidler 👏

tomk1v commented 3 months ago

@jamesvidler also confirms, it now works!

mkupiniak commented 3 months ago

Works fine, thank you for the quick fix! 🙌🏻

MathiasGr commented 3 months ago

Hey there it seems like we're still hitting the issue on the TYP for Shop Pay orders. These orders seem to not have the shipping address field. Is that expected @jamesvidler?

jaimeBEAM commented 2 months ago

I'm seeing this issue in 2024.7.X where the shipping address is undefined in TYP but not in OSP