5.8.0 is breaking the authenticated fetch, webhooks register and other things
Closed this issue ยท 5 comments
Issue summary
The new release suddenly broke our application after a deployment. Since it's a minor release it got updated automatically and our app's dashboard broke. Not sure if it's because we have a setup that's a bit dated but setting a fixed version to 5.7.0 fixes the issue, so it seems something changed in 5.8.0 that doesn't work with our setup.
Though, I just cloned a basic setup following the php template and the same error happens:
https://github.com/Shopify/shopify-app-template-php
Expected behavior
Not to break stuff ๐
Actual behavior
Authenticated fetches return a 401 Unauthorized
error, the register webhook in the auth callback returns this JsonException
error:
And if I remove the webhook register the auth loops until shopify show an error.
Steps to reproduce the problem
- Create a basic installation of the php template following the instructions here: https://github.com/Shopify/shopify-app-template-php
- Try to run the project.
Checklist
- I have described this issue in a way that is actionable (if possible)
Hello,
We also experienced this issue this morning after a similar deployment when trying to re-authenticate in the Admin UI. Our stack trace is similar to @tommypepsi but for completeness:
[stacktrace]
#0 {ourAppPath}/web/vendor/shopify/shopify-api/src/Clients/HttpResponse.php(48): json_decode()
#1 {ourAppPath}/web/vendor/shopify/shopify-api/src/Auth/OAuth.php(419): Shopify\\Clients\\HttpResponse->getDecodedBody()
#2 {ourAppPath}/web/vendor/shopify/shopify-api/src/Auth/OAuth.php(125): Shopify\\Auth\\OAuth::fetchAccessToken()
#3 {ourAppPath}/web/routes/web.php(68): Shopify\\Auth\\OAuth::callback()
#4 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Routing/Route.php(237): Illuminate\\Routing\\RouteFileRegistrar->{closure}()
#5 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Routing/Route.php(208): Illuminate\\Routing\\Route->runCallable()
#6 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\\Routing\\Route->run()
#7 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#8 {ourAppPath}/web/app/Http/Middleware/CspHeader.php(34): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#9 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\CspHeader->handle()
#10 {ourAppPath}/web/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()```
We have reverted to a known working version to restore our app.
A fix has been released in version 5.8.1
@lizkenyon We still experienced the issue after testing this with one of our apps this morning using the 5.8.1 release. Specifically this was during the authentication stage of loading the app in Shopify store admin but presumably other areas too.
Hi @dv-ahardy
I am sorry to hear this.
I wasn't able to reproduce the issue any longer on a fresh app with the PHP template.
Could you double check in your composer.lock that the project is actually using 5.8.1.
And if it is could you provide some more details about the exact error you are seeing, and if possible code for reproduction.
@lizkenyon On our side 5.8.1 fixed the issue. Thanks!