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

Error: net::ERR_ADDRESS_INVALID at http://0.0.0.0:3033/ #5

Open
pradhap opened this issue Apr 1, 2020 · 8 comments
Open

Error: net::ERR_ADDRESS_INVALID at http://0.0.0.0:3033/ #5

pradhap opened this issue Apr 1, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@pradhap
Copy link

pradhap commented Apr 1, 2020

  1. render -i index.html --name scene

Open Page: http://0.0.0.0:3033/index.html
Start Rendering
Open Server 3033
Error: net::ERR_ADDRESS_INVALID at http://0.0.0.0:3033/index.html
at navigate (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\FrameManager.js:120:37)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async FrameManager.navigateFrame (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\FrameManager.js:94:17)
at async Frame.goto (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\FrameManager.js:406:12)
at async Page.goto (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\Page.js:674:12)
-- ASYNC --
at Frame. (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\helper.js:111:15)
at Page.goto (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\Page.js:674:49)
at Page. (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\node_modules\puppeteer\lib\helper.js:112:23)
at C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\dist\render.cjs.js:368:18
at step (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\dist\render.cjs.js:190:17)
at Object.next (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\dist\render.cjs.js:121:14)
at fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules@scenejs\render\dist\render.cjs.js:74:24)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

@daybrush
Copy link
Owner

daybrush commented Apr 2, 2020

@pradhap
Thank you for reporting bug.

I'll check it.

@daybrush daybrush added the bug Something isn't working label Apr 2, 2020
@PhilvanKleur
Copy link

PhilvanKleur commented Nov 20, 2020

I had the same happen: please see my comment from 17:02 20 November 2020 at https://stackoverflow.com/questions/64928747/how-where-do-i-find-out-how-to-solve-npm-installation-problems . It took me the whole day to install this on Windows — the question and comments in that thread will show why — and now it seems I've wasted all that time. I hope I'm wrong, but if I'm not, can you suggest any other way that I can convert an SVG/CSS animation to video, with or without render?

My error is also in npm\node_modules@scenejs\render\node_modules\puppeteer\lib\FrameManager.js:120:37) . This is on Windows 10, npm 6.14.8, node 14.15.1.

Thanks.

@daybrush
Copy link
Owner

daybrush commented Nov 21, 2020

@pradhap @PhilvanKleur

Perhaps the server is not running on Windows.

I need to change the module that the server runs.

@textbook
Copy link

textbook commented Dec 1, 2020

If you try to provide a local file like index.html, rather than a URL, this library creates a simple server using the http-server library so that this file can be accessed by the browser where the rendering happens:

if (input.match(/https*:\/\//g)) {
path = input;
} else {
server = openServer(port);
path = `http://0.0.0.0:${port}/${input}`;
}

If you're having problems with that, you don't have to rely on this server; you can serve the file yourself from literally anywhere else. For example you can use GitHub Pages, and provide the URL instead:

render -i https://<user>.github.io/<repo>/index.html --name scene

@PhilvanKleur
Copy link

PhilvanKleur commented Dec 1, 2020

@textbook, that's really helpful, and thank you for the comment. As it happened, I discussed this on StackOverflow this morning, and the same thing was pointed out to me there. Am I right in thinking this library needs the server to access a local file because its JavaScript runtime environment won't let it access my local file system directly?

I have my own website, so I uploaded the file I wanted to convert to that. I then ran a similar command to the one you showed me. This time, it didn't give that error message. However, it still did fail, saying "scene" is not defined. That doesn't sound like a bug, but I can't find documentation about what the --name parameter is for. I am converting animations I hand-coded in SVG and CSS, not ones written with scenejs , and I have a nasty suspicion that I'm not allowed to do this and that --name refers to scenejs-specific variables. @daybrush, is that so?

@textbook
Copy link

textbook commented Dec 1, 2020

@PhilvanKleur "the same thing was pointed out" to you on Stack Overflow by me. The --name parameter is for the name of the variable representing the scenejs animation, see how it's used in e.g.:

iterationCount = await page.evaluate(`${name}.getIterationCount()`);
delay = await page.evaluate(`${name}.getDelay()`);
playSpeed = await page.evaluate(`${name}.getPlaySpeed()`);
sceneDuration = await page.evaluate(`${name}.getDuration()`);

  • "Am I right in thinking this library needs the server to access a local file because its JavaScript runtime environment won't let it access my local file system directly?" - no. A Node app can absolutely access the file system, there's a whole module for it. Again, it's so that file can be accessed by the browser.
  • "I am converting animations I hand-coded in SVG and CSS, not ones written with scenejs." - then this isn't the library for you; that's not a bug. You could try implementing the same process this uses yourself, though, automating opening your page in a browser and recording a video of the result.

@PhilvanKleur
Copy link

PhilvanKleur commented Dec 1, 2020

Thanks. Let's be clear that I'm not reporting my problem with the --name parameter as a bug. I landed on scenejs-render through its npm page, after a Stack Exchange post recommending it for converting SVG/CSS to video. I didn't realise from that that it would only convert animations made with scenejs. So that's why I was trying it, and why I didn't realise what --name was for. But as far as the current GitHub issue is concerned I think discussion is finished, in that you've given us a work-around for the server problem.

@daybrush
Copy link
Owner

daybrush commented Jan 5, 2021

@pradhap @textbook

@scenejs/render's new version is released.

I deleted the server. It is possible to test with a local file.

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

No branches or pull requests

4 participants