scenejs-render
scenejs-render copied to clipboard
Error: net::ERR_ADDRESS_INVALID at http://0.0.0.0:3033/
- 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.
@pradhap Thank you for reporting bug.
I'll check it.
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.
@pradhap @PhilvanKleur
Perhaps the server is not running on Windows.
I need to change the module that the server runs.
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:
https://github.com/daybrush/scenejs-render/blob/98e4a80c9185b3c16b72cae6940d98127b5ff480/src/render.ts#L42-L48
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
@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?
@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.:
https://github.com/daybrush/scenejs-render/blob/98e4a80c9185b3c16b72cae6940d98127b5ff480/src/capture.ts#L89-L92
- "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.
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.
@pradhap @textbook
@scenejs/render
's new version is released.
I deleted the server. It is possible to test with a local file.