Giter Club home page Giter Club logo

Comments (4)

Xmader avatar Xmader commented on August 12, 2024

@philippedistributive
Definitely it errors, but not showing the Error stacks etc..

Could you put the contents of

function newRequest(url) {
return new Promise(function (resolve, reject)
{
let xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.onload = function ()
{
if (this.status >= 200 && this.status < 300) resolve(this.response);
else reject(new Error(this.status));
};
xhr.onerror = (ev) => reject(ev.error);
xhr.send();
});
}
async function main() {
await newRequest("http://www.example.org/");
await newRequest("http://www.example.org/");
await newRequest("http://http.badssl.com/");
}
main();
into a js file, and run it with strace -f -e socket pmjs xxx.js?
What's the output?

from pythonmonkey.

philippedistributive avatar philippedistributive commented on August 12, 2024

strace -f -e socket poetry run pmjs xxx.js
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
strace: Process 65501 attached
[pid 65501] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=65501, si_uid=1001, si_status=0, si_utime=1 /* 0.01 s /, si_stime=1 / 0.01 s /} ---
strace: Process 65502 attached
[pid 65502] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=65502, si_uid=1001, si_status=0, si_utime=2 /
0.02 s /, si_stime=0} ---
strace: Process 65503 attached
[pid 65503] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=65503, si_uid=1001, si_status=0, si_utime=2 /
0.02 s */, si_stime=0} ---
strace: Process 65504 attached
[pid 65504] +++ exited with 0 +++
strace: Process 65505 attached
strace: Process 65506 attached
strace: Process 65507 attached
strace: Process 65508 attached
strace: Process 65509 attached
strace: Process 65510 attached
strace: Process 65511 attached
strace: Process 65512 attached
strace: Process 65513 attached
[pid 65513] socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 6
[pid 65513] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
[pid 65513] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6
[pid 65513] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 6
[pid 65513] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 6
Uncaught NetworkError: Error: Python ClientConnectorError: Cannot connect to host www.example.org:80 ssl:default [Name or service not known]
DOMException@/home/philippe/Sources/PythonMonkey/python/pminit/pythonmonkey/node_modules/core-js/modules/web.dom-exception.constructor.js:64:17
#handleErrors@/home/philippe/Sources/PythonMonkey/python/pythonmonkey/builtin_modules/XMLHttpRequest.js:423:48
_home_philippe_Sources_PythonMonkey_python_pythonmonkey_builtin_modules_XMLHttpRequest_js/#sendAsync/<@/home/philippe/Sources/PythonMonkey/python/pythonmonkey/builtin_modules/XMLHttpRequest.js:400:38
strace: Process 65514 attached
[pid 65513] +++ exited with 0 +++
[pid 65514] +++ exited with 0 +++
[pid 65510] +++ exited with 0 +++
[pid 65511] +++ exited with 0 +++
[pid 65512] +++ exited with 0 +++
[pid 65509] +++ exited with 0 +++
[pid 65508] +++ exited with 0 +++
[pid 65507] +++ exited with 0 +++
[pid 65505] +++ exited with 0 +++
[pid 65506] +++ exited with 0 +++
+++ exited with 0 +++

from pythonmonkey.

Xmader avatar Xmader commented on August 12, 2024
Uncaught NetworkError: Error: Python ClientConnectorError: Cannot connect to host [www.example.org:80](http://www.example.org/) ssl:default [Name or service not known]

Check your DNS

from pythonmonkey.

philippedistributive avatar philippedistributive commented on August 12, 2024

um, yeah ok...

from pythonmonkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.