mjackson/unpkg

Missed react-dom.min.js (react-dom@15.6.1)

yarrr-ru opened this issue · 8 comments

This night react-dom.min.js file disappeared from react-dom@15.6.1:

curl  https://unpkg.com/react-dom@15.6.1/dist/react-dom.min.js -v
*   Trying 104.16.124.175...
* Connected to unpkg.com (104.16.124.175) port 443 (#0)
* found 174 certificates in /etc/ssl/certs/ca-certificates.crt
* found 696 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: ssl714328.cloudflaressl.com (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: EC
* 	 certificate version: #3
* 	 subject: OU=Domain Control Validated,OU=PositiveSSL Multi-Domain,CN=ssl714328.cloudflaressl.com
* 	 start date: Wed, 25 Jan 2017 00:00:00 GMT
* 	 expire date: Wed, 03 Jan 2018 23:59:59 GMT
* 	 issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO ECC Domain Validation Secure Server CA 2
* 	 compression: NULL
* ALPN, server accepted to use http/1.1
> GET /react-dom@15.6.1/dist/react-dom.min.js HTTP/1.1
> Host: unpkg.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Wed, 16 Aug 2017 07:56:15 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 69
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Etag: W/"45-jukPuHbAtANRFZby2i2lJrqBn7U"
< Via: 1.1 vegur
< CF-Cache-Status: HIT
< Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
< X-Content-Type-Options: nosniff
< Server: cloudflare-nginx
< CF-RAY: 38f2d6021dda4f3e-DME
<
* Connection #0 to host unpkg.com left intact
Cannot find file "/dist/react-dom.min.js" in package react-dom@15.6.1%

But it still present in file list:
https://unpkg.com/react-dom@15.6.1/dist/

Having the same issue but for 15.4.2

https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js returns 404

but it appears on the list https://unpkg.com/react-dom@15.4.2/dist/

I found an error in the logs from earlier this morning:

Aug 16 06:15:46 unpkg heroku/router: at=info method=GET path="/react-dom/dist/react-dom.min.js" host=unpkg.com request_id=9aa0c18d-2818-426b-bff1-c34754644d24 fwd="2.139.145.252,188.114.110.34" dyno=web.2 connect=48ms service=4248ms status=500 bytes=268 protocol=http 
Aug 16 06:15:46 unpkg app/web.2: { FetchError: request to https://registry.npmjs.org/react-dom failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443 
Aug 16 06:15:46 unpkg app/web.2:     at ClientRequest.<anonymous> (/app/node_modules/node-fetch/index.js:133:11) 
Aug 16 06:15:46 unpkg app/web.2:     at emitOne (events.js:96:13) 
Aug 16 06:15:46 unpkg app/web.2:     at ClientRequest.emit (events.js:188:7) 
Aug 16 06:15:46 unpkg app/web.2:     at TLSSocket.socketErrorListener (_http_client.js:310:9) 
Aug 16 06:15:46 unpkg app/web.2:     at emitOne (events.js:96:13) 
Aug 16 06:15:46 unpkg app/web.2:     at TLSSocket.emit (events.js:188:7) 
Aug 16 06:15:46 unpkg app/web.2:     at connectErrorNT (net.js:1021:8) 
Aug 16 06:15:46 unpkg app/web.2:     at _combinedTickCallback (internal/process/next_tick.js:80:11) 
Aug 16 06:15:46 unpkg app/web.2:     at process._tickCallback (internal/process/next_tick.js:104:9) 
Aug 16 06:15:46 unpkg app/web.2:   name: 'FetchError', 
Aug 16 06:15:46 unpkg app/web.2:   message: 'request to https://registry.npmjs.org/react-dom failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443', 
Aug 16 06:15:46 unpkg app/web.2:   type: 'system', 
Aug 16 06:15:46 unpkg app/web.2:   errno: 'ENOTFOUND', 
Aug 16 06:15:46 unpkg app/web.2:   code: 'ENOTFOUND' } 

It looks like there was a network issue on the backend. For some reason unpkg was unable to connect to registry.npmjs.org for a while.

I noticed a Heroku incident report from around the same time. Looking into whether they are related or not.

For those on 15.6.1: https://unpkg.com/react-dom@15.6.0/dist/react-dom.min.js is available as a workaround

As a temporary workaround for today I removed the Cache Everything setting on https://unpkg.com/* so that failed requests to the origin (e.g. 404s) will not be cached. It may be a good idea to leave this off permanently for future issues like this one. This will consistently send more traffic through to the origin server, but will provide a better overall experience when we have network issues.

I'm still looking into the root cause of the network failures on the backend and will monitor the servers closely throughout the day.

Thanks for quick response, always appreciated!

Well, FWIW I monitored the servers closely all day and saw only one request timeout out of almost 17M requests to the origin servers, so the issue appears to be resolved by the rollback that Heroku did last night on the Cedar stack.

screen shot 2017-08-16 at 11 20 53 pm

As I said above, I turned off the "Cache Everything" setting on Cloudflare so the CDN should be more resilient to 404 responses from the origin even if the network problem appears again. I'm going to close this for now but we can reopen if files go missing again.