app icon indicating copy to clipboard operation
app copied to clipboard

Sprial cannot be downloaded from spiral get-binary for Chinese users

Open fengahan opened this issue 4 years ago • 10 comments

the network will timeout when Chinese user to execute vendor/bin/spiral , so a binary image should be added

fengahan avatar May 08 '20 09:05 fengahan

Can you try to download it directly from GitHub? Is it being blocked by the Chinese firewall?

wolfy-j avatar May 08 '20 10:05 wolfy-j

Can you try to download it directly from GitHub? Is it being blocked by the Chinese firewall?

It is not blocked by GFW of China, but it's very slow for Chinese developers to download assets from github(with s3 CDN).

krwu avatar May 08 '20 10:05 krwu

Any recommendations? I'm not able to debug it from my end. We can increase the timeout.

wolfy-j avatar May 08 '20 10:05 wolfy-j

My recommendations:

  1. Download the binary from a mirror URL instead of github release. The problem is S3 storage used by github.
  2. You can support an environment variable like SPIRAL_BINARY_MIRROR, when there is such variable in user's enviroment, use it. (Like puppeteer, node-sass, node-sqlite3...)

krwu avatar May 08 '20 10:05 krwu

@wolfy-j You can contact "jsdelivr", they can provide free CDN for spiral's binary. It works perfectly both inside and outside China. Their CDN wat provided by MaxCDN, Cloudflare, Fastly and Quantil.

See jsdelivr's readme:

We can work together and setup a custom configuration for your project. This way, you can have full control over your files and the ability to utilize the full power of jsDelivr.

This kind of custom hosting can be suitable for:

  • Binary hosting. Windows executable files and zips.
  • Frequently updated files.
  • Projects that can't follow jsDelivr file structure.
  • Some other use that will blow all of our minds.

Simply send an email to [email protected] with a request for more information.

Current OSS projects using custom configs:

  • webjars
  • webpack webpackbin and codesandbox

krwu avatar May 08 '20 11:05 krwu

Thank you for the suggestion! I'll add this thing to our pipeline.

wolfy-j avatar May 08 '20 11:05 wolfy-j

thank u

fengahan avatar May 08 '20 12:05 fengahan

Please try to download directly from GitHub in the meantime. I can not provide you a clear ETA at the moment.

wolfy-j avatar May 08 '20 13:05 wolfy-j

I downloaded through some tools and it can be used normally at present, but the current situation is very unfriendly to most Chinese users

fengahan avatar May 09 '20 02:05 fengahan

I downloaded through some tools and it can be used normally at present, but the current situation is very unfriendly to most Chinese users

you can use https://github.com/nkbai/githubdns to solve this issue temporarily.

krwu avatar May 09 '20 03:05 krwu