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

[Android] Netlify dev failed with redirects/edge functions #4621

Closed
TriHydera opened this issue May 22, 2022 · 12 comments · Fixed by #4685
Closed

[Android] Netlify dev failed with redirects/edge functions #4621

TriHydera opened this issue May 22, 2022 · 12 comments · Fixed by #4685
Assignees
Labels
type: bug code to address defects in shipped code

Comments

@TriHydera
Copy link

Describe the bug

Could not read downloaded binary
    at DenoBridge.downloadBinary (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/bridge.js:33:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DenoBridge.getBinaryPath (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/bridge.js:116:32)
    at async Module.serve (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/server/server.js:52:5)
    at async prepareServer (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/src/lib/edge-functions/proxy.js:142:22)
Error: Could not read downloaded binary
    at DenoBridge.downloadBinary (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/bridge.js:33:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DenoBridge.getBinaryPath (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/bridge.js:116:32)
    at async Module.serve (file:///data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/dist/server/server.js:52:5)
    at async prepareServer (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/src/lib/edge-functions/proxy.js:142:22)

/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:116
      throw ex;
      ^
abort({}) at Error
    at jsStackTrace (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1070:13)
    at stackTrace (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1087:12)
    at process.abort (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:8502:44)
    at process.emit (node:events:527:28)
    at processEmit [as emit] (/data/data/com.termux/files/usr/lib/node_modules/netlify-cli/node_modules/signal-exit/index.js:199:34)
    at emit (node:internal/process/promises:140:20)
    at processPromiseRejections (node:internal/process/promises:274:27)
    at processTicksAndRejections (node:internal/process/task_queues:97:32)
(Use `node --trace-uncaught ...` to show where the exception was thrown)

Here's the logs. I was trying to just get a dev environment running on my phone and it's not working.

Steps to reproduce

netlify dev

Configuration

[build]
publish = "public"
functions = "functions"

[[redirects]] 
from = "/api/*"
to= "/.netlify/functions/:splat"
status = 200

[dev]
port = 2222

Environment

System:
    OS: android
    CPU: Unknown
    Memory: 1003.25 MB / 3.66 GB
  Binaries:
    Node: 17.9.0 - /data/data/com.termux/files/usr/bin/node
    npm: 8.10.0 - /data/data/com.termux/files/usr/bin/npm
  npmGlobalPackages:
    netlify-cli: 10.3.0
@TriHydera TriHydera added the type: bug code to address defects in shipped code label May 22, 2022
@gsperk
Copy link

gsperk commented May 24, 2022

I have had the same error running netlify dev since cli v 10.

System:
CentOS Linux release 7.9.2009 (Core) running in Vagrant 2.2.9 on Windows.

@jackiewmacharia jackiewmacharia self-assigned this May 24, 2022
@jackiewmacharia
Copy link
Contributor

A workaround for this error is to downgrade CLI to v9.16.7 with npm install netlify-cli@9.16.7 -g while we work on a fix for it. Also worth noting is that v9 of CLI won't work with Edge Functions.

@TriHydera
Copy link
Author

TriHydera commented May 25, 2022

When will it be fixed @jackiewmacharia ? And thanks for helping me out ;)

@cmarabate
Copy link

I have the same issue, please fix!

@novelnet
Copy link

Me too, just downgrading is working so far.

@jackiewmacharia
Copy link
Contributor

Auto closed by merged PRs, reopening while testing the release.

@TriHydera
Copy link
Author

Auto closed by merged PRs, reopening while testing the release.

So it's now fixed @jackiewmacharia

@jackiewmacharia
Copy link
Contributor

@McJoe21 almost there, it will be soon!

@jackiewmacharia
Copy link
Contributor

This is now fixed in v10.7.1 of CLI. Test it out by running: npm install netlify-cli -g. In case of any issues, do let me know here.

@TriHydera
Copy link
Author

This is now fixed in v10.7.1 of CLI. Test it out by running: npm install netlify-cli -g. In case of any issues, do let me know here.

Setting up the Edge Functions environment. This may take a couple of minutes.
› Error: There was a problem setting up the Edge Functions environment. To try a manual installation, visit https://ntl.fyi/install-deno.

@jackiewmacharia
Copy link
Contributor

@McJoe21 that error pops up if there's an issue with the automated Deno installation due to various reasons including unsupported platforms by Deno like linux-arch64. What this fix does is to make sure that this doesn't break the rest of netlify dev if Edge Functions functionality wasn't available. Are you able to use continue using netlify dev with a serveless function for example?

@TriHydera
Copy link
Author

@McJoe21 that error pops up if there's an issue with the automated Deno installation due to various reasons including unsupported platforms by Deno like linux-arch64. What this fix does is to make sure that this doesn't break the rest of netlify dev if Edge Functions functionality wasn't available. Are you able to use continue using netlify dev with a serveless function for example?

yes

bluejacket-c4 pushed a commit to code-423n4/code423n4.com that referenced this issue Mar 9, 2023
the backstory is that Netlify CLI has trouble installing deno on my 64-bit ARM Linux VM (aarch64), see details on netlify/cli#4685 via netlify/cli#4621

unfortunately this didn't really fix the problem for me (should have
been part of the 10.6.2 netlify-cli release
netlify/cli#4729) but seems to be what other
devs are using locally anyway so it seemed reasonable to bump it here

the new @types/node dev dep is to avoid a (new?) unmet peer
dependency warning with the new cli package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants