Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

get-npm-wrangler-binary endpoint throwing occasional exceptions #1587

Closed
berkant opened this issue Oct 8, 2020 · 6 comments
Closed

get-npm-wrangler-binary endpoint throwing occasional exceptions #1587

berkant opened this issue Oct 8, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@berkant
Copy link

berkant commented Oct 8, 2020

馃悰 Bug Report

Environment

  • operating system: Ubuntu 20.04

Steps to reproduce

Repeatedly call curl -I -XGET https://workers.cloudflare.com/get-npm-wrangler-binary/1.10.3/x86_64-apple-darwin in your terminal.

What did you expect to see?

200 OK with Wrangler binary every time I call it.

owner@facility:/tmp$ curl -I -XGET https://workers.cloudflare.com/get-npm-wrangler-binary/1.10.3/x86_64-apple-darwin
HTTP/2 200
date: Thu, 08 Oct 2020 07:34:28 GMT
content-type: application/octet-stream
content-length: 4670200
set-cookie: __cfduid=d1643c72ca730037a27c1a694c9c9b4dd1602142468; expires=Sat, 07-Nov-20 07:34:28 GMT; path=/; domain=.workers.cloudflare.com; HttpOnly; SameSite=Lax; Secure
cf-ray: 5dee2dfbeac805bb-FRA
accept-ranges: bytes
cache-control: public, max-age=14400
content-disposition: attachment; filename=wrangler-v1.10.3-x86_64-apple-darwin.tar.gz
etag: "3ea34547825a42a611e6ee458b32a97d"
expires: Wed, 19 Aug 2020 16:55:20 GMT
last-modified: Fri, 26 Jun 2020 19:29:05 GMT
cf-cache-status: MISS
cf-request-id: 05a8bb1173000005bb3a200200000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
x-amz-id-2: RRE9FxBELFqzKQKAkj7MC+uFg+5VmOOkR+1BlMITZuiesBTRPRhoo7ab8Qscs28PGHebs9H5Vq8=
x-amz-request-id: B7795F5AC64E29D5
server: cloudflare

What did you see instead?

Occasional 500s with a generic Cloudflare response saying the Worker has thrown an exception.

owner@facility:/tmp$ curl -I -XGET https://workers.cloudflare.com/get-npm-wrangler-binary/1.10.3/x86_64-apple-darwin
HTTP/2 500
date: Thu, 08 Oct 2020 07:34:29 GMT
content-type: text/html; charset=UTF-8
x-frame-options: SAMEORIGIN
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
cf-ray: 5dee2e010b6f2484-FRA
server: cloudflare
cf-request-id: 05a8bb14a70000248441a56200000001
@mercteil
Copy link

mercteil commented Oct 11, 2020

npm i -g @cloudflare/wrangler

Downloading release https://workers.cloudflare.com/get-npm-wrangler-binary/1.11.0/x86_64-apple-darwin

Error fetching release Request failed with status code 500

(node:56492) UnhandledPromiseRejectionWarning: Error: Request failed with status code 500
    at createError (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/core/settle.js:17:12)
    at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/adapters/http.js:210:9)
    at RedirectableRequest.emit (events.js:315:20)
    at RedirectableRequest._processResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/follow-redirects/index.js:269:10)
    at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/follow-redirects/index.js:50:10)
    at Object.onceWrapper (events.js:422:26)
    at ClientRequest.emit (events.js:315:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)

@robinsloan
Copy link

I don't know if it's helpful to mention that I am also experiencing this error; feel free to delete this comment if it's just noisy/duplicative. But I wanted to say that it might make sense to add a temporary note to the installation guide explaining that the npm method isn't working on macOS until the problem is resolved; I was confused & it took me a bit of searching to find this issue.

@ispivey
Copy link
Contributor

ispivey commented Oct 15, 2020

This should be resolved as of a few minutes ago, when we deployed a (putative) fix. @robinsloan can you try again? If you're still seeing errors, please re-open this issue and share the error message you see!

@ispivey ispivey closed this as completed Oct 15, 2020
@robinsloan
Copy link

Success! I feel honored to know I might have been the last person in the universe to experience this error. Thanks!

@Swatilekha-Roy
Copy link

Swatilekha-Roy commented Oct 16, 2020

@ispivey When I try to preview my project using wrangler preview --watch or wrangler preview, I keep getting this message:
"Error: Your JavaScript project is missing a package.json file; is /home/swatilekha/hello the wrong directory?"
Could someone kindly help me out on that? Thanks.

@ispivey
Copy link
Contributor

ispivey commented Oct 16, 2020

@Swatilekha-Roy can you open a new issue about your problem? The new issue template asks a number of clarifying questions that will help ensure you. get an answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants