ThemeKit request failed after 5 retries with error (Network)

Issue warning details

request failed after 5 retries with error: Get “https://theme-kit-access.shopifyapps.com/cli/meta.json": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

In my routine utilization of ThemeKit for Shopify theme development, I frequently encounter the aforementioned errors intermittently, which can indeed be vexing. Hence, this time, I endeavor to pinpoint the root cause and comprehensively resolve it.

I have previously authored an article addressing this issue. However, the method outlined in that article proved ineffective on this occasion as well. If you haven’t already read it, you may consider reviewing this article.

Shopify Theme Kit request failed after 5 retries with error

Before you start it

  • You are using a VPN, and you have to utilize it to support your daily development.
  • I’m using Clash

Reason

This time, I’ve realized that despite activating VPN for global proxy, Terminal might not be utilizing the proxy. Upon verification, it’s confirmed that executing curl google.com in Terminal doesn’t yield a response. This is also why I occasionally encounter this issue in my local environment.

How to solve

Check your Clash proxy port number.

Run the following code snippet in the Terminal.

1
2
export http_proxy=http://localhost:7890
export https_proxy=http://localhost:7890

Thus, the issue has been resolved this time.