Closed ajprod closed 5 months ago
@Kyon147 can you please look into this issue ?
@sunnyvaniya21 this is likely due to the theme level check that happens, it might need to be tweaked to now not expect being able to find the theme level.
It's likely here or around here that needs debugging https://github.com/Kyon147/laravel-shopify/blob/master/src/Services/ThemeHelper.php#L109
The error come from the extractStoreMainTheme in the ThemeHelper. Indeed, Shopify return an empty array of themes.
As a quick fix, you can add a try catch around the call of the Theme Support Level function in the InstallShop.php file in Actions.
try{
$themeSupportLevel = call_user_func($this->verifyThemeSupport, $shop->getId());
$this->shopCommand->setThemeSupportLevel($shop->getId(), ThemeSupportLevel::fromNative($themeSupportLevel));
}catch(Exception $e){
$themeSupportLevel = null;
}
Expected Behavior
App should be installed normally with no error
Current Behavior
On installation on a new store with no theme, the MissingAuthUrlException is triggered
Failure Information
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
[2024-04-30 07:30:51] local.ERROR: Missing auth url {"userId":1234,"exception":"[object] (Osiset\\ShopifyApp\\Exceptions\\MissingAuthUrlException(code: 0): Missing auth url at /my-app/vendor/kyon147/laravel-shopify/src/Traits/AuthController.php:55)