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

"listen" in "http" gives error [Android [ARM]] #5

Open
am-trouzine opened this issue Mar 6, 2024 · 0 comments
Open

"listen" in "http" gives error [Android [ARM]] #5

am-trouzine opened this issue Mar 6, 2024 · 0 comments

Comments

@am-trouzine
Copy link

I tried a simple http server

var http = require('http');
function fn(eq, res){
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.write(req.url);
  res.end();
}
var server=http.createServer(fn);
server.listen(8000);

it gives error:

Error: listen EFAULT (net.js 837:7)
    at $c (net.js:837:7)
    at $a.prototype._listen2 (net.js:976:8)
    at $T (net.js:997:1)
    at $a.prototype.listen (net.js:1070:1)
    at /storage/sdcard0/shell/bin/nodejsServer.js:8:1
    at $w.prototype._compile (module.js:

writing the second parameter of listen also gives an error:

Error: listen EFAULT (net.js 837:7)
    at $c (net.js:837:7)
    at $a.prototype._listen2 (net.js:976:8)
    at $T (net.js:997:1)
    at $a.prototype.listen/< (net.js:1078:1)
    at $8/< (dns.js:49:1)
    at $0a (node.js:
8|root@condor:/storage/sdcard0/shell/bin #

The same issue as here: sjitech/nodejs-android-prebuilt-binaries#4

Here is a screenrecord of the activity:
https://drive.google.com/file/d/1VUEu1V2dXRX2CueFUH_T8bHq-dHmhEzg/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant