App reviews, troubleshooting, and recommendations
I started having this error from my shopify app Oauth implementation sometime last week.
I am using the shopify/shopify-api PHP package for this implementation.
The below implementation is from the callback url supplied in the shopify app settings
try {
$callback = OAuth::callback(
cookies: \request()->cookies->all(),
query: \request()->input(),
);
} catch (\Throwable) {
return \redirect()->intended(request()->headers->get('referer'));
}
The error log shows as follows:
Shopify\Exception\CookieNotFoundException: Could not find the current session id
in the cookies in /var/www/pac/releases/260/vendor/shopify/shopify-api/src/Auth/OAuth.php:277
Hi! I've started to receive the same error. Looks like it works fine when run in dev but when build a production version it will show this error. The issue is the same for the app developed five month ago and for a fresh app built on a PHP 8 with this package https://github.com/Shopify/shopify-app-template-php/tree/main
Does anyone knows what can cause the problem?
This error occurs when user clicks on a "Install" app button, and stays longer than 1 minute in authorization page, then the cookie "shopify_session_id" expires and this error shows up.
Update:
Here is a nice solution: https://github.com/Shopify/shopify-api-php/issues/143#issuecomment-1709052833
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025