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

Input file/directory not found on CLI #249

Closed
ItayZiv opened this issue Apr 4, 2020 · 15 comments
Closed

Input file/directory not found on CLI #249

ItayZiv opened this issue Apr 4, 2020 · 15 comments
Assignees

Comments

@ItayZiv
Copy link

ItayZiv commented Apr 4, 2020

When running draw.io --no-sandbox --export --format png --output Output\File.png Input\file.drawio
I get a Input file/directory not found:

(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check electron/electron#18397
Error: input file/directory not found

I have made sure the file exists and tried with multiple files, and this has been reproduced by someone else. This issue only occurs on the latest release (12.9.3), downgrading to 12.6.5 solves this issue.

@SunbrightShinobi
Copy link

This occurs on 13.0.3 as well but if --no-sandbox is removed from cli command it works correctly

@glennaugustus
Copy link

Had same issue with 13.0.3 the but placing --no-sandbox as the last argument on the line allowed it to run

drawio -x -e -f svg -o test2.svg test.drawio --no-sandbox

@ItayZiv
Copy link
Author

ItayZiv commented May 26, 2020

We have also got it work with removing that. Still leaving this open since this is something that might be worth fixing still? Not super sure about the cause, so not doing anything quite yet

@SunbrightShinobi
Copy link

@glennaugustus does it work if you are converting to png without --no-sandbox?

Also are you headless or non-headless. Cause anything other than png used to hang my sphinx build. Now with 13.0.3 and .7 of extension I can build jpg, svg and png but svg would throw a weird error. But I have found that is due to forcing headless=true in svg output caused it. My setup for whatever reason does not require headless config for svg output.

@ItayZiv
Copy link
Author

ItayZiv commented May 27, 2020

About running headless, this option was originally presumably added for that. But we switched to using Xvfb, without that we kept on getting issues.

@SunbrightShinobi
Copy link

@ItayZiv yea not sure. All I can say is that using my CentOS8 WSL and my Ubuntu WSL instance if I configure to output in svg I can mark headless=False and if I leave true then I get the following error but it does build

WARNING: Failed to kill Xvfb:n[stderr]
b'kill: sending signal to 4713 failed: No such process\n'
[stdout]
b''

For png output I must use headless=True for document to build.

This may due to the packages I have for my setup which for CentOS8, the WSL instance is built from https://github.com/binarylandscapes/CentWSL/blob/master/Makefile

For Ubuntu (cause I haven't been able to find time to setup a similar autobuild environment yet. I just install from Windows Store and run a script or paste commands installing the matching packages from CentOS8. I do have that in git yet but I attached it.

ubuntuWSLsetup.txt

@ItayZiv
Copy link
Author

ItayZiv commented May 27, 2020

lemme clarify, headless mode has nothing to do with draw.io, its our own thing where we just run Xvfb, see this issue for why we use it #146 .

This issue has to do with running --no-sandbox making exports not work, not sure if this is something to be solved or if it's better to just be left this way... (That's the reason I'm not closing this yet).

@glennaugustus
Copy link

@glennaugustus does it work if you are converting to png without --no-sandbox?

Also are you headless or non-headless. Cause anything other than png used to hang my sphinx build. Now with 13.0.3 and .7 of extension I can build jpg, svg and png but svg would throw a weird error. But I have found that is due to forcing headless=true in svg output caused it. My setup for whatever reason does not require headless config for svg output.

@binarylandscapes
For me it appears to only work with --no-sandbox due to my particular execution environment (headless docker container)
My setup is headless ubuntu 19.10 docker image, drawio 13.0.3 from deb package, xvfb and libasound2 (though not sure this is needed, just installed it at the same time)

<WITHOUT --no-sandbox >

xvfb-run -a drawio -x -e -f jpg -o test2.jpg test.drawio
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap

<WITH --no-sandbox but early in argument list>

xvfb-run -a drawio --no-sandbox -x -e -f jpg -o test2.jpg test.drawio
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
Error: input file/directory not found

<WITH -no-sandbox as last argument>

aopublish@5c6bff1b360b:~$ xvfb-run -a drawio -x -e -f jpg -o test2.jpg test.drawio --no-sandbox
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
(node:73965) DeprecationWarning: Passing functions, DOM objects and other non-cloneable JavaScript objects to IPC methods is deprecated and will throw an exception beginning with Electron 9.
(node:73965) DeprecationWarning: Passing functions, DOM objects and other non-cloneable JavaScript objects to IPC methods is deprecated and will throw an exception beginning with Electron 9.
test.drawio -> test2.jpg

<Magic info>

aopublish@5c6bff1b360b:~$ file *
test.drawio:    ASCII text, with very long lines
test.png:       PNG image data, 759 x 468, 8-bit/color RGBA, non-interlaced
test.svg:       SVG XML document
test2.jpg:      JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 703x228, components 3
test2.png:      PNG image data, 703 x 228, 8-bit/color RGBA, non-interlaced
test2.svg:      SVG XML document

@modelmat
Copy link

Note to anyone who is reading this: some of this is related to (my) sphinxcontrib-drawio sphinx extension. The headless option and messages from binary landscapes relate to it. This really shouldn't be in this issue.

FYI @glennaugustus libasound2 is required to from what I can tell; it errors otherwise.

@SunbrightShinobi
Copy link

@modelmat Apologies that was my fault, I didn't pay attention to the repo of issue when I commented.

@m-mohamedin
Copy link
Contributor

I'll close this issue as it is not directly related to this project

@modelmat
Copy link

I think the root issue is still a problem?
Some of the messages here are off-topic and could probably be deleted but the initial post by @ItayZiv is still present.

@m-mohamedin
Copy link
Contributor

A solution in the comments is drawio -x -e -f svg -o test2.svg test.drawio --no-sandbox. Does that work?

@modelmat
Copy link

Yes, adding --no-sandbox as the last argument does work. However, having it as the first argument does not, and it produces an error message which does not make it clear that this is what is wrong.

@SunbrightShinobi
Copy link

Had same issue with 13.0.3 the but placing --no-sandbox as the last argument on the line allowed it to run
drawio -x -e -f svg -o test2.svg test.drawio --no-sandbox

Unbelievable this is still true 2023.

Check your settings. I think one of the last updates to WSL2 defaulted everyone to the x-windows features and I had to change some stuff around cause my sphinx would just hang until I disabled the plugin narrowing the issue which lead to me turn off headless on a new WSL2 ubuntu install and clean some stuff up and it works.

@jgraph jgraph deleted a comment from turbo-bert Dec 9, 2023
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

5 participants