Closed quard8 closed 3 months ago
Hi quard8, I am facing the same issue. Did you get any solution for it? Please share here if you have any solution.
Yea we got this same issue, the app sends request twice, the first is cancelled, ~but our server already processes the request.~ . Actually when the app is pin in the list, shopify will automatically send request to all apps as if user is actually visit them, making our server handle the same request twice.
I've debugged this as well. The Shopify admin is loading my app into three separate iframes, causing three requests to my index route each page reload
iframe[name="app-iframe"]
iframe[name="modal://content/classic"]
iframe[name="modal://content/max"]
To me this seems like a bug and inefficient, and makes my debugging much more difficult, what am I missing?
Same issue here as well
Yea we got this same issue, the app sends request twice, the first is cancelled, ~but our server already processes the request.~ . Actually when the app is pin in the list, shopify will automatically send request to all apps as if user is actually visit them, making our server handle the same request twice.
Yes I noticed this as well. I have 5 apps. If I'm on my dev shop it can be a nightmare.
This seems to be especially problematic when opening the app from a nested link (think of a support tool or email to the merchant).
Yea we got this same issue, the app sends request twice, the first is cancelled, ~but our server already processes the request.~ . Actually when the app is pin in the list, shopify will automatically send request to all apps as if user is actually visit them, making our server handle the same request twice.
I've noticed when this happens, it includes a prefetch=1
query parameter, so you can just ignore requests with that parameter in your server.
Hi all, there are serval related issues here. I would like to summarize as below:
CANCELED
request on first load => This is confirmed a bug and we are fixing it. It should be merged today or tomorrow. => This shouldn't affect your WebVitals score.prefetch=1
request when loading Admin => We are preloading top pinned apps in the background. However, it's turned off right now. => This shouldn't affect your WebVitals score. I will close this ticket once the canceled
request is merged.
Describe the bug
I started debugging my LCP score and found out that app loading twice. Because of that all JS code started loading multiple times and I guess LCP score impacted.
I checked "Search and Discovery" app and found same behaviour. On app without App Bridge from CDN everything working as expected.
I found that App Bridge script send messages "APP::NAVIGATION::HISTORY::REPLACE" to host and looks like this is reason to reload entire app.
Code from minified script:
l
is always true because ofl = window.name.startsWith("app-iframe")
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Embedded app loads once
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
Platform