Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@am-trouzine

Description

@am-trouzine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions