Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
353 stars 102 forks source link

UI not loading when click on app load from shopify admin panel #184

Closed kunwart2b closed 1 year ago

kunwart2b commented 1 year ago

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

App should load the blade template ui everytime

Current Behavior

We have noticed that if for a certain amount of time the application is not being used, the UI cannot be accessed. See this screencast -> https://screenshot.click/28-55-6945-73332.webm for more details.

Failure Information

i dont more about this but when we try to laod the app after some time or open shopify admin panel in another tab or window and try to load the app the view blade template ui is not loading if i try to select store and install again then its load the ui again.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. install the app and open the admin panel in window and load the app 2.the ui is not laoding for frontend
  2. ...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. laravel version 9 php version 8 package osiset template - blade

Failure Logs

Please include any relevant log snippets or files here. (https://screenshot.click/28-55-6945-73332.webm) front end when app installed image after some time when try to load again its not laoding

Kyon147 commented 1 year ago

What version of the package are you using @kunwart2b

kunwart2b commented 1 year ago

Hi @Kyon147
"php": "^7.3|^8.0", "barryvdh/laravel-cors": "^3.0", "doctrine/dbal": "^3.6", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.75", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5", "laravel/ui": "^3.4", "osiset/laravel-shopify": "^17.3", "shopify/shopify-api": "^3.2", "signifly/laravel-shopify": "^1.2", "spatie/laravel-csp": "^2.8"

as you can see response is coming but preview is not loading image image

Kyon147 commented 1 year ago

Please update your package version for this package as 17.3 is outdated.

kunwart2b commented 1 year ago

What version of the package are you using @kunwart2b

Please update your package version for this package as 17.3 is outdated.

what is the latest package for it and how can update it in my existing code

Kyon147 commented 1 year ago

19.0.0 is the latest but you will need to go through the update guide to make sure you refactor any code.

https://github.com/Kyon147/laravel-shopify/wiki/Upgrading

kunwart2b commented 1 year ago

19.0.0 is the latest but you will need to go through the update guide to make sure you refactor any code.

https://github.com/Kyon147/laravel-shopify/wiki/Upgrading

is there other refrences also ? that help me in upgrading my app

Kyon147 commented 1 year ago

That is everything.

kunwart2b commented 1 year ago

That is everything.

ok thnkyou will upgrade it and let you know if its solved

kunwart2b commented 1 year ago

Hi @Kyon147 do you believe older package is responsible for the issue i have mentioned if yes do you think upgrading the package will solve this issue ? and how can i create new app using upgraded version any refrence ?

Kyon147 commented 1 year ago

It should do, there was some updates to fix bugs around the host param which causes the exact issue you are experiencing.

Read the wiki though, as there are ways you can pass the param on each page load.

kunwart2b commented 1 year ago

ok thnx will let you know once upgraded and solved

kunwart2b commented 1 year ago

Hi @Kyon147 i think ui issue of load is resolve but another issue i am getting about invalid time zone in console of shopify admin panel and ui not showing after upgrading the pacakge image its load the ui perfectly but some times not image

Kyon147 commented 1 year ago

Glad the UI loading is sorted, looks like it was likely the host changes.

I've not seen that error before but it looks like it is coming from you're app code, not the package.

You'll have to do some debugging and see what part of your app is causing that error.

For the UI not loading sometimes, you have to make sure that you past the host param every time you change page. If you don't you won't initialise app bright on the new pages as you are using blade and not an SPA.

kunwart2b commented 1 year ago

Thanks for responsing imidiate as i was trying to solve this issue from past 2 days and you replied so imediate and its solved. and this issue i have mentioned aboveis from shopify i have removed my code and still this error is coming so i think this is form their admin panel

Kyon147 commented 1 year ago

It might not be the issue but do see that you have three ways of calling the Shopify API - are they all needed for a specific purpose?

"osiset/laravel-shopify": "^17.3", "shopify/shopify-api": "^3.2", "signifly/laravel-shopify": "^1.2",

The package has an api helper integrated, so I'd suggest just using that one as it will auth your shops when they access your app from inside their Shopify admin.

I can't replicate this timezone issue on my side using a newly made app - so it could be more to do with your environment. If it is Shopify, you will need to speak with their support.