Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Wrangler doesn't work on my system/OS (provide a static build of workerd) #3457

Closed
penalosa opened this issue Jun 13, 2023 · 40 comments
Labels
bug Something that isn't working

Comments

@penalosa
Copy link
Contributor

penalosa commented Jun 13, 2023

Which Cloudflare product(s) does this pertain to?

Wrangler

What version of Wrangler are you using?

3

What operating system are you using?

N/A

Describe the Bug

Collection of issues related to Wrangler not working on specific systems/OSs which will be fixed by providing a static build of workerd.

@huw
Copy link
Contributor

huw commented Jun 13, 2023

Also related to the discussion in cloudflare/workerd#46

@lakano
Copy link

lakano commented Jun 15, 2023

FYI, it's also not works under Codespaces of Github, and could be really appreciate to make it works out-of-box as before with the wrangler v2.20.

@huw
Copy link
Contributor

huw commented Jun 15, 2023

@lakano As of this morning, this is no longer true. The default Codespaces image has been upgraded to Debian 12 Bookworm. If you haven’t changed your configuration, you should just be able to run ‘Codespaces: Rebuild Container’, otherwise you can upgrade the base image (usually either VARIANT in devcontainer.json, or by depending on ex. mcr.microsoft.com/vscode/devcontainers/javascript-node:20-bookworm in your Dockerfile).

For example, a minimum Codespaces setup is as follows:

.devcontainer/devcontainer.json

{
  "name": "workerd",
  "build": {
    "dockerfile": "Dockerfile"
  },
}

.devcontainer/Dockerfile

FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:20-bookworm

# Install `libc++-dev` for workerd to work
RUN apt-get update && apt-get -y install libc++-dev

@gennai3
Copy link

gennai3 commented Jun 18, 2023

Wrangler does not work on Debian 11 , I installed clang libc++-dev libc++abi-dev by apt install command , however, does not work correctly. Please let me know, I think Debian and Ubuntu are most popular Linux OS on Interent server. Thanks.

-- log

? Compiled Worker successfully
?? wrangler 3.1.0
wrangler dev now uses local mode by default, powered by ? Miniflare and ? workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
Your worker has access to the following bindings:

KV Namespaces:
KVDATA: 83e2f6aae8664bf89a......xxxxx
? Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-05-18",
but you've requested "2023-06-15". Falling back to "2023-05-18"...
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
/home/hodota/sonicjs/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:905:11)
at Socket._write (node:net:917:8)
at writeOrBuffer (node:internal/streams/writable:391:12)
at _write (node:internal/streams/writable:332:10)
at Socket.Writable.write (node:internal/streams/writable:336:10)
at Runtime.updateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:5121:26)
at async Miniflare.#assembleAndUpdateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:9138:23)
at async Miniflare.#init (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:8898:5)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
ERROR: "dev:wrangler" exited with 7.

@huw
Copy link
Contributor

huw commented Jun 18, 2023

@gennai3 Hello! I noticed you’ve sent the same message to a few threads, so hopefully I can help you here. As explained above and on other threads you’ve posted to (in great detail), workerd is currently incompatible with Debian 11, and will be until this issue is resolved. You will need to upgrade to Debian 12 in the meantime. I hope this helps you resolve your issue 😌

@gennai3
Copy link

gennai3 commented Jun 19, 2023

Thank you @huw for your support. I will try upgrde from Deabin 11 to Debian 12 soon. I hope Debian/Ubuntu will be work wrangler and Cloudfare product. Sorry that my multi post, thank you again.

@juanpmarin
Copy link

Hi
It does not work either in Fedora Linux 38

@juanpmarin
Copy link

Fedora users can install llvm-libunwind and it seems to fix the issue :D

cloudflare/workerd#46 (comment)

@LegendTomaszKwiatkowski
Copy link

LegendTomaszKwiatkowski commented Jun 29, 2023

Ubuntu 20.04.6 LTS WSL2 install above modules is not doing anything - issue still persists

@mrbbot
Copy link
Contributor

mrbbot commented Jun 30, 2023

Hey everyone! 👋 We've just released a new beta version of Wrangler that should improve compatibility. Try it out with npx wrangler@beta dev.

On Linux, libc++ is now statically linked, and we target glibc 2.31 when building. This means any Linux distro providing glibc 2.31 or higher should be supported. The following OSes have been tested:

  • Ubuntu 20.04/22.04
  • Debian 11/12
  • Fedora 37/38/39
  • Arch Latest

Ubuntu 18.04 (which is now end-of-life) and Debian 10 will not be supported.

On macOS, we now target macOS 11 "Big Sur" when building. This means any version of macOS 11 or higher (Big Sur, Monterey, Ventura, Sonoma) should be supported.

I'm going to close this issue now, but please let us know if you encounter any issues. 🙂

@mrbbot mrbbot closed this as completed Jun 30, 2023
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Jun 30, 2023
@kael
Copy link

kael commented Jun 30, 2023

Can't seem to install the latest beta

npx wrangler@beta dev

$ npm uninstall -g wrangler

removed 101 packages in 197ms
$ npx wrangler@beta dev
Need to install the following packages:
  wrangler@0.0.0-bcdc1fe5
Ok to proceed? (y) y
 ⛅️ wrangler 0.0.0-bcdc1fe5
---------------------------
wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
To run an edge preview session for your Worker, use wrangler dev --remote

✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. `wrangler dev path/to/script`) or the `main` config field.


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose

Env:

  • Ubuntu 20.04.6 LTS
  • npm 9.6.6
  • node v18.9.1

@kael
Copy link

kael commented Jun 30, 2023

Can't seem to install the latest beta

It does work when installed directly into a project directory, though. 👍

@kael
Copy link

kael commented Jun 30, 2023

Try it out with npx wrangler@beta dev

Does this version contain the new cloudflare:sockets module ?

I'd like to use the new TCP Socket API but it doesn't seem available: ✘ [ERROR] Could not resolve "cloudflare:sockets".

@kael
Copy link

kael commented Jul 1, 2023

Testing with Remix (with Cloudflare Pages)
  1. Installation

    1.1. Creating Remix project (without full installation)

    $ npx create-remix@latest cf-test-beta-wrangler
    ? What type of app do you want to create? Just the basics
    ? Where do you want to deploy? Choose Remix App Server if you're 
    unsure; it's easy to change deployment targets. Cloudflare Pages
    ? TypeScript or JavaScript? JavaScript
    ? Do you want me to run `npm install`? No
    💿 That's it! `cd` into "/home/kael/Project/cf-test-beta-wrangler" and check the README for development and deploy instructions!

    1.2. Installing Wrangler Beta and Remix Utils (with complete full installation)

    $ npm install --save-dev wrangler@beta
    $ npm install remix-utils
  2. Running Wrangler with Remix

    2.1. Basic

     💿  remix dev
     
     info  building...
     info  built (415ms)
    
    > start
    > wrangler pages dev --compatibility-date=2023-06-21 ./public
    
    Compiling worker to "/tmp/functionsWorker-0.30047527969509336.mjs"...
    ✨ Compiled Worker successfully
     ⛅️ wrangler 0.0.0-3f61892d
    ---------------------------
    wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
    To run an edge preview session for your Worker, use wrangler dev --remote
    ⎔ Starting local server...
    
    ▲ [WARNING] Parsed 2 valid header rules.
    
    [mf:inf] Ready on http://127.0.0.1:8788/
    [REMIX DEV] ba1ff211 ready

    2.2. Import { connect } from 'cloudflare:sockets'

    💿  remix dev
    
     info  building...
     warn  could not resolve "cloudflare:sockets"
    ┃ You imported "cloudflare:sockets" in app/routes/foo.jsx,
    ┃ but that package is not in your `node_modules`.
    ┃ Did you forget to install it?
    ┗
    ✘ [ERROR] Build failed with 1 error:
    app/routes/foo.jsx:3:24: ERROR: Could not resolve "cloudflare:sockets" [plugin css-bundle-update-plugin]
    
        app/root.jsx:20:30:
          20 │ import { cssBundleHref } from "@remix-run/css-bundle";~~~~~~~~~~~~~~~~~~~~~~~
    
      This error came from the "onLoad" callback registered here:
    
        node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:47:12:
          47 │       build.onLoad({
             ╵             ~~~~~~
    
        at setup (/home/kael/Project/cf-test-beta-wrangler/node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:47:13)
        at handlePlugins (/home/kael/Project/cf-test-beta-wrangler/node_modules/esbuild/lib/main.js:1279:21)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  3. Searching for 'cloudflare:sockets' in node_modules

$ grep "cloudflare:sockets" -R node_modules/*
Binary file node_modules/@cloudflare/workerd-linux-64/bin/workerd matches
Binary file node_modules/workerd/bin/workerd matches

package.json
  {
    "private": true,
    "sideEffects": false,
    "type": "module",
    "scripts": {
      "build": "remix build",
      "dev": "remix dev --no-restart -c \"npm run start\"",
      "start": "wrangler pages dev --compatibility-date=2023-06-21 ./public",
      "typecheck": "tsc"
    },
    "dependencies": {
      "@remix-run/cloudflare": "^1.18.1",
      "@remix-run/cloudflare-pages": "^1.18.1",
      "@remix-run/css-bundle": "^1.18.1",
      "@remix-run/react": "^1.18.1",
      "isbot": "^3.6.8",
      "react": "^18.2.0",
      "react-dom": "^18.2.0",
      "remix-utils": "^6.5.0"
    },
    "devDependencies": {
      "@cloudflare/workers-types": "^3.19.0",
      "@remix-run/dev": "^1.18.1",
      "@remix-run/eslint-config": "^1.18.1",
      "@types/react": "^18.0.35",
      "@types/react-dom": "^18.0.11",
      "eslint": "^8.38.0",
      "typescript": "^5.0.4",
      "wrangler": "^0.0.0-3f61892d"
    },
    "engines": {
      "node": ">=16.13.0"
    }
  }

@kael
Copy link

kael commented Jul 3, 2023

Testing with Cloudflare Workers
  1. Global Wrangler installation
$ npm install -g wrangler@beta
  1. Generate new Worker with Wrangler
$ wrangler generate worker-test-wrangler-beta
  1. Testing TCP socket connection with Gopher over HTTP
$ wrangler dev
 ⛅️ wrangler 0.0.0-3f61892d
---------------------------
wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
⎔ Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-06-28",
but you've requested "2023-07-03". Falling back to "2023-06-28"...
[mf:inf] Ready on http://127.0.0.1:8787/
[mf:inf] GET / 200 OK (426ms)
[mf:inf] GET /favicon.ico 200 OK (494ms)
Gopher over HTTP page
iWelcome to Floodgap Systems' official gopher server.   error.host  1
iFloodgap has served the gopher community since 1999    error.host  1
i(formerly gopher.ptloma.edu).    error.host  1
i     error.host  1
iWe run Bucktooth 0.2.9 on xinetd as our server system.   error.host  1
igopher.floodgap.com is an IBM Power 520 Express with a 2-way   error.host  1
i4.2GHz POWER6 CPU and 8GB of RAM, running AIX 6.1 +patches.    error.host  1
iSend gopher@floodgap.com your questions and suggestions.   error.host  1
i     error.host  1
i***********************************************************    error.host  1
i**              OVER 20 YEARS SERVING YOU!               **    error.host  1
i**               Plain text is beautiful!                **    error.host  1
i***********************************************************    error.host  1
i     error.host  1
0Does this gopher menu look correct?  /gopher/proxy gopher.floodgap.com 70
i(plus using the Floodgap Public Gopher Proxy)    error.host  1
1Super-Dimensional Fortress: SDF Gopherspace    sdf.org 70
iGet your own Gopherspace and shell account!    error.host  1
i     error.host  1
i--- Getting started with Gopher -------------------------------    error.host  1
1Getting started with gopher, software, more  /gopher gopher.floodgap.com 70
i(what is Gopherspace? We tell you! And find out how    error.host  1
ito create your own Gopher world!)    error.host  1
i     error.host  1
0Using your web browser to explore Gopherspace  /gopher/wbgopher  gopher.floodgap.com 70
i(READ IT! LEARN IT! LOVE IT!)    error.host  1
i(useful tips for gopher newbies, updated 17 November 2018)   error.host  1
i     error.host  1
1The Overbite Project: Gopher clients for mobile and desktop (OverbiteWX, OverbiteNX, Overbite Android) /overbite gopher.floodgap.com 70
i(download gopher add-ons for Mozilla Firefox/SeaMonkey,    error.host  1
imobile clients for Android and more! Put Gopherspace on    error.host  1
iyour mobile phone or desktop computer!)    error.host  1
1Other Gopher clients for various platforms /gopher/clients gopher.floodgap.com 70
i     error.host  1
i--- Find and search for other Gopher sites on the Internet ----    error.host  1
1Search Gopherspace with Veronica-2 /v2 gopher.floodgap.com 70
ior search all known titles in Gopherspace with V-2 from here:    error.host  1
7Search Veronica-2  /v2/vs  gopher.floodgap.com 70
i     error.host  1
1All the gopher servers in the world (that we know of)  /world  gopher.floodgap.com 70
i(updated with robot updates)   error.host  1
1New Gopher servers since 1999  /new  gopher.floodgap.com 70
i(updated 29 June 2023)   error.host  1
i     error.host  1
i--- Get news, weather and more through Gopherspace ------------    error.host  1
1Weather maps and forecasts via Floodgap Groundhog  /groundhog  gopher.floodgap.com 70
i(USA and Australia; updates occur throughout the day)    error.host  1
1News and headline feeds via Flood Feeds  /feeds  gopher.floodgap.com 70
i(updates occur daily/regularly)    error.host  1
1Most current Floodgap news feeds /feeds/latest gopher.floodgap.com 70
i(today's most updated news and headlines)    error.host  1
i     error.host  1
i--- File archives and downloads -------------------------------    error.host  1
1Floodgap File Archives and Mirrors /archive  gopher.floodgap.com 70
i(includes external archives and historical files,    error.host  1
iWalnut Creek CP/M-Osborne-Commodore-Beehive archives,    error.host  1
iInfo-Mac, classic Mac software and more)   error.host  1
i     error.host  1
i--- Fun, games, and other neat things -------------------------    error.host  1
1Floodgap Gopher Fun and Games  /fun  gopher.floodgap.com 70
i(with xkcd, the Gopher Figlet gateway and the fld.gp Gopher    error.host  1
i Shortener Service)    error.host  1
1Floodgap users and staff gopher pages  /users  gopher.floodgap.com 70
i(the usual gang of idiots)   error.host  1
1The New GopherVR: A Virtual Reality View of Gopherspace  /gophervr gopher.floodgap.com 70
i(version 0.5.1 released 24 October 2015)   error.host  1
i     error.host  1
i--- Server software behind the scenes -------------------------    error.host  1
1The Bucktooth gopher server  /buck gopher.floodgap.com 70
i(version 0.2.9 released 1 May 2011)    error.host  1
i     error.host  1
i--- Gopherspace advocacy and activism -------------------------    error.host  1
1Floodgap Gopher Statistics Project /gstats gopher.floodgap.com 70
i(monthly traffic analysis of the Floodgap Public Gopher Proxy    error.host  1
ifor community advocacy purposes; updates monthly)    error.host  1
i     error.host  1
i--- Floodgap specific -----------------------------------------    error.host  1
2Floodgap CSO/ph phonebook server   gopher.floodgap.com 105
0Yes, gopher.floodgap.com is the same as gopher.ptloma.edu  /ptloma gopher.floodgap.com 70
1The Floodgap Free Software License /ffsl gopher.floodgap.com 70
0Where's Floodgap? (not for hatemail ;-)  /whereis  gopher.floodgap.com 70
0What's the temperature in the Floodgap server room?  /servertemps.txt  gopher.floodgap.com 70
0"/usr/bin/tail" our gopher server log  /recent gopher.floodgap.com 70
0RIP, Master gopher at University of Minnesota  /umngone  gopher.floodgap.com 70
hFloodgap.com (Web pages) URL:http://www.floodgap.com/  gopher.floodgap.com 70
i     error.host  1
iPlease note that this gopher is no longer affiliated with    error.host  1
iPoint Loma Nazarene University. Some areas are rate-limited due    error.host  1
ito spidering.    error.host  1

So TCP socket does work with Workers. 👍


NB: Not sure why there are 2 versions of wrangler installed globally:
$ wrangler -v
 ⛅️ wrangler 0.0.0-3f61892d
$ wrangler2 -v
 ⛅️ wrangler 0.0.0-3f61892d

@fhanau
Copy link

fhanau commented Jul 6, 2023

NB: Not sure why there are 2 versions of wrangler installed globally:

wrangler and wrangler2 should both point to the same underlying script, so there's just two links to the same wrangler installation. For example, both of them point to /opt/homebrew/lib/node_modules/wrangler/bin/wrangler.js on mac with Node installed via homebrew, although your path may be different.

Also wanted to note that with the new version 3.1.2 the extended OS support is now available in the stable release. As Brendan said above, please let us know if you encounter any more issues.

@kael
Copy link

kael commented Jul 7, 2023

Also wanted to note that with the new version 3.1.2 the extended OS support is now available in the stable release. As Brendan said above, please let us know if you encounter any more issues.

I've started a basic React app with Pages and the general solution that seems to solve compatibility issues is to install Wrangler in the global scope and remove the reference of Wrangler in the devDependencies package.json (and in node_modules).

It does work - locally - so far, although I have yet to deploy it.

I'll give a try and test with the Wrangler 3.1.2 and let you know - I'm currently busy having fun with the new TCP socket cloudflare:sockets module. 😄

Cheers.

@jbasdf
Copy link

jbasdf commented Jul 10, 2023

I was getting the "Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set" error on Mac OSX 13.4.1 (22F82) even with wrangler 3.1.2 installed. I had to remove wrangler from my package.json and then install it globally for everything to work. Is this the recommended setup going forward?

@kael
Copy link

kael commented Jul 11, 2023

Testing with Remix (with Cloudflare Pages)

@fhanau I've tested installation of a Remix project with Wrangler 3.1.2 and I'm getting the same error than above when importing the cloudflare:sockets module in a Remix one, being with Wrangler installed globally or locally, or by using wrangler init.

It looks like a Remix bug though, doesn't it ? Not sure why cssBundlePlugin is involved when importing cloudflare:sockets.

package.json
{
  "private": true,
  "sideEffects": false,
  "type": "module",
  "scripts": {
    "build": "remix build",
    "dev": "remix dev --no-restart -c \"npm run start\"",
    "start": "wrangler pages dev --compatibility-date=2023-06-21 ./public",
    "typecheck": "tsc",
    "pages:deploy": "npm run build && wrangler pages publish ./public"
  },
  "dependencies": {
    "@remix-run/cloudflare": "^1.16.0",
    "@remix-run/cloudflare-pages": "^1.16.0",
    "@remix-run/css-bundle": "^1.16.0",
    "@remix-run/react": "^1.16.0",
    "isbot": "^3.6.8",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@cloudflare/workers-types": "^3.19.0",
    "@remix-run/dev": "^1.16.0",
    "@remix-run/eslint-config": "^1.16.0",
    "@types/react": "^18.0.35",
    "@types/react-dom": "^18.0.11",
    "eslint": "^8.38.0",
    "typescript": "^5.0.4",
    "wrangler": "^3.1.2"
  },
  "engines": {
    "node": ">=16.13.0"
  }
}

@fhanau
Copy link

fhanau commented Jul 11, 2023

@fhanau I've tested installation of a Remix project with Wrangler 3.1.2 and I'm getting the same error than above when importing the cloudflare:sockets module in a Remix one, being with Wrangler installed globally or locally, or by using wrangler init.

@mrbbot Sounds like a problem more on the JS level right?

@mrbbot
Copy link
Contributor

mrbbot commented Jul 11, 2023

@fhanau I suspect so, will try take a look at this soon 👍

@rodbs
Copy link

rodbs commented Jul 18, 2023

I was getting the "Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set" error on Mac OSX 13.4.1 (22F82) even with wrangler 3.1.2 installed. I had to remove wrangler from my package.json and then install it globally for everything to work. Is this the recommended setup going forward?

@jbasdf I'm getting the same error (wrangler 3.2) and I cannot get rid of it (I've also tried out wrangler dynamically w/o success).
Any ideas? is this bug supposed to be fixed?

@rodbs
Copy link

rodbs commented Jul 18, 2023

This is the full error I get with wrangler 3.2 (and also with beta) in macOS 13.14

workerd/util/symbolizer.c++:99: warning: Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set. To symbolize stack traces, set $LLVM_SYMBOLIZER to the location of the llvm-symbolizer binary. When running tests under bazel, use `--test_env=LLVM_SYMBOLIZER=<path>`.
*** Fatal uncaught kj::Exception: kj/async-io-unix.c++:945: failed: ::bind(sockfd, &addr.generic, addrlen): Address already in use; toString() = 0.0.0.0:3001
stack: 1022c7f13 1022c7cab 1022c5543 100a4918b 100a49a54 100a1491f 100a1832b 100a1815f 100a18147 1022fde2f 1022fe08b 1022fc7e3 1022fc5b3 100a0c1a

✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.

@kael
Copy link

kael commented Jul 19, 2023

Address already in use; toString() = 0.0.0.0:3001

I get a similar message after I edit the code with wrong syntax, the shell crashes but the process is still alive, then I can't restart the app because the address is already in use.

I'm using ps to find the still alive Node process: ps aux | grep node and kill [PID].

@excelsior091224
Copy link

excelsior091224 commented Jul 26, 2023

This module still won't work.

xxxxxx@raspberrypi:~/dev/astro_test/extinct-equinox $ npx wrangler pages dev --proxy 5000 --binding MICROCMS_SERVICE_DOMAIN="xxxxxxxxxxxxxx" MICROCMS_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxx" -- npm run dev -- --host --port 5000 
Running npm run dev -- --host --port 5000...
▲ [WARNING] No compatibility_date was specified. Using today's date: 2023-07-26.

  Pass it in your terminal:
 
  --compatibility-date=2023-07-26
 
  See https://developers.cloudflare.com/workers/platform/compatibility-dates/ for
  more information.


Compiling worker to "/tmp/functionsWorker-0.3816089213091922.mjs"...
✨ Compiled Worker successfully
[proxy]: 
> @example/blog@0.0.1 dev
> astro dev --host --port 5000


 ⛅️ wrangler 3.3.0
------------------
wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
Your worker has access to the following bindings:
- Vars:
  - MICROCMS_SERVICE_DOMAIN: "(hidden)"
  - MICROCMS_API_KEY: "(hidden)"
⎔ Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-07-17",
but you've requested "2023-07-26". Falling back to "2023-07-17"...
external/com_google_tcmalloc/tcmalloc/system-alloc.cc:661] MmapAligned() failed - unable to allocate with tag (hint, size, alignment) - is something limiting address placement? 0x4be40000000 1073741824 1073741824 @ 0x5583dd78ec 0x5583dd3d14 0x5583dd34a0 0x5583db3b90 0x5583dd0a68 0x5583dd0834 0x5583da8da8 0x5583d17798 0x5583d3ed24 0x5582ca8b60 0x5582ca88c8 0x5582cad098 0x5583d9fed0 0x7fa2758dc0
external/com_google_tcmalloc/tcmalloc/arena.cc:58] FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes, object-size); is something preventing mmap from succeeding (sandbox, VSS limitations)? 131072 640 @ 0x5583dd7c50 0x5583db3c20 0x5583dd0a68 0x5583dd0834 0x5583da8da8 0x5583d17798 0x5583d3ed24 0x5582ca8b60 0x5582ca88c8 0x5582cad098 0x5583d9fed0 0x7fa2758dc0
✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.


[proxy]:   🚀  astro  v2.9.3 started in 3252ms
  
  ┃ Local    http://localhost:5000/
  ┃ Network  http://192.168.1.81:5000/
             http://192.168.1.13:5000/
             http://100.73.172.95:5000/
             http://172.27.0.1:5000/
             http://169.254.41.228:5000/
             http://169.254.151.189:5000/
             http://169.254.180.76:5000/
             http://169.254.27.181:5000/
             http://169.254.230.138:5000/
             http://169.254.145.58:5000/
             http://169.254.87.137:5000/
             http://169.254.94.160:5000/
             http://169.254.188.161:5000/
  

╭───────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit         │
╰───────────────────────────────────────────────────────────────────────────────╯
⎔ Shutting down local server...

OS:Raspberry pi OS

Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

npm:9.8.1

@syonfox
Copy link

syonfox commented Oct 19, 2023

npx wrangler@2.20.0 pages dev ./public ---persist-to ./pages --ip 127.0.0.1  --port 8111

@buren
Copy link

buren commented Oct 24, 2023

On macOS, we now target macOS 11 "Big Sur" when building. This means any version of macOS 11 or higher (Big Sur, Monterey, Ventura, Sonoma) should be supported.

I saw this comment #3432 (comment) about Big Sur being supported. I was on 11.1 and that didn't work for me, upgraded to macOS 14 and now it works.

@step135
Copy link

step135 commented Jan 17, 2024

Not working in BunsenLabs GNU/Linux 10.5 (Lithium)

@fhanau
Copy link

fhanau commented Jan 17, 2024

Not working in BunsenLabs GNU/Linux 10.5 (Lithium)

Hi, as far as I can see BunsenLabs Lithium is based on Debian Buster and uses glibc 2.28, whereas workerd (and by extension wrangler) requires glibc 2.31 or higher. Please consider upgrading to Beryllium or higher.

@minhacks
Copy link

minhacks commented May 29, 2024

This is happening for me on wrangler@3.57.2 and Ubuntu 22.04. Using wrangler@2.20.0 works fine.

@fhanau
Copy link

fhanau commented May 29, 2024

This is happening for me on wrangler@3.57.2 and Ubuntu 22.04. Using wrangler@2.20.0 works fine.

Can you share the specific error message you see? Ubuntu 20.04 and 22.04 should be fully supported.

@minhacks
Copy link

minhacks commented May 29, 2024

❯ npx wrangler dev
 ⛅️ wrangler 3.57.2
-------------------
Your worker has access to the following bindings:
- D1 Databases:
  - DB: prod-d1-tutorial (2589c028-00a3-4acf-976b-97ba7f1fa7a8)
✘ [ERROR] 2778 external/com_google_tcmalloc/tcmalloc/system-alloc.cc:753] MmapAligned() failed - unable to allocate with tag (hint=0x6f5140000000, size=1073741824, alignment=1073741824) - is something limiting address placement?

  2778 external/com_google_tcmalloc/tcmalloc/arena.cc:52] CHECK in Alloc: FATAL ERROR: Out of memory
  trying to allocate internal tcmalloc data (bytes=131072, object-size=640); is something preventing
  mmap from succeeding (sandbox, VSS limitations)?


╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
/home/orokamono/d1-tutorial/node_modules/wrangler/wrangler-dist/cli.js:29749
            throw a;
            ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

A similar error happened with npx wrangler d1 execute ....

@minhacks
Copy link

I got these commands working with wrangler@3.36.0 but not working with wrangler@3.37.0 and onwards.

@dom96
Copy link
Contributor

dom96 commented May 31, 2024

@pointatnick what's your platform? Is it Ubuntu on WSL1 by any chance?

@minhacks
Copy link

minhacks commented Jun 1, 2024

@dom96 Yes, Ubuntu on WSL1

@dom96
Copy link
Contributor

dom96 commented Jun 2, 2024

@pointatnick I ran into a similar issue and recently switched to WSL2 which seems to have solved the problem. Can you give that a try as well?

@minhacks
Copy link

minhacks commented Jun 2, 2024

@dom96 I've tried before to upgrade to WSL2 but I am limited by my hardware. I trust upgrading would fix the issue, since it was hard finding WSL1 as an explanation for the bug. I'm good with using a slightly older version of wrangler for now. Thanks for the responses!

@fhanau
Copy link

fhanau commented Jun 19, 2024

@dom96 I've tried before to upgrade to WSL2 but I am limited by my hardware. I trust upgrading would fix the issue, since it was hard finding WSL1 as an explanation for the bug. I'm good with using a slightly older version of wrangler for now. Thanks for the responses!

Glad to hear that this works with WSL2. I tried to see what might cause the breakage with WSL1 – From prior discussion it sounds like the tcmalloc issue starts with wrangler@3.36.0...wrangler@3.37.0.
This maps to the cloudflare/workerd@v1.20240314.0...v1.20240320.0 workerd update, which includes a tcmalloc update which might be responsible. The tcmalloc update includes a large range of changes so this might be hard to track down, but suggests that the issue isn't necessarily within workerd itself.

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

No branches or pull requests