Shopify / shopify-app-template-php

263 stars 85 forks source link

Shop is null while checking if app is installed #493

Open qualia-user opened 6 months ago

qualia-user commented 6 months ago

The issue arises when attempting to install the application following the recommended steps; an error occurs when serving the app.

The issue occurs within the middleware responsible for ensuring the installation of Shopify. The problem arises when the middleware checks the request object, finding that the required 'shop' value is missing. The error occurs specifically on the line: $shop = Utils::sanitizeShopDomain($request->query("shop"));

Upon inspecting the request object, it reveals that the 'query' parameters bag is empty:

`Illuminate\Http\Request {#43 ▼ ... +query: Symfony\Component\HttpFoundation\InputBag {#51 ▼

parameters: []

} ...`

Even though Shopify seems to be installed, with the app name visible in the store's preview URL, the middleware encounters an issue while trying to sanitize the shop's name due to its type being 'null'. This inconsistency is causing the error.

Has anyone encountered a similar issue? Could someone provide guidance on the specific areas I should investigate? I suspect the problem may be related to the configuration. Your assistance would be greatly appreciated.

BonsaiAdmin commented 6 days ago

we are having the same issue, we are getting null in request too. were you able to find the solution?