Shopify / Shopify/shopify-app-template-php

Shop is null while checking if app is installed

Open
#493 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
340
Forks
108
PR merge metrics
No merged PRs in 30d

Description

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 ▼](http://127.0.0.1:53193/#sf-dump-1229559795-ref251) #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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the middleware responsible for ensuring Shopify installation and trace how the request reaches $request->query("shop"). Inspect the empty query parameter bag and the recommended installation flow, then compare the expected request data with what the middleware receives. Done means identifying the cause of the missing shop value and documenting or verifying the relevant configuration or request-handling fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.