I’m facing an issue with my app at https://dashing-faun-123bbf.netlify.app.
The app is a Shopify app built with Next.js. When I install my app on a Shopify store when it is running from my localhost, everything works perfectly every time. However, when I deploy my app to Netlify and try installing the app running on Netlify, I’m observing really strange behaviour…
In my code I have created a loop where I call Shopify Admin REST APIs 10 times consecutively - I am retrieving the shop’s themes. This executes well, and I get the following log statements:
GET_THEMES 0
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object]
GET_THEMES 1
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object]
...
GET_THEMES 9
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object]
meaning that each of the 10 times the request goes out and I get a response containing an object.
Now, when I do the same thing with the app running on Netlify, my logs look like this:
GET_THEMES 0
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object] 1/40
GET_THEMES 1
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object] 1/40
GET_THEMES 2
__REST_GET {"path":"themes"}
__REST_RESPONSE {"path":"themes"} [object Object] 1/40
GET_THEMES 3
__REST_GET {"path":"themes"}
On the 4th time of executing the fetch, the request goes out, but it returns nothing - neither a successful response, nor an error. Just nothing. And my app just freezes in this state.
I am getting no more logs aside from what is provided above.
Is it at all possible that I am hitting some functions time limit, but am not informed about it in the console? I have seen in other posts in this forum that people see logs like ERROR: Task timed out after 10.01 seconds
, but I see nothing like it.
Any idea what might be happening here?