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

Cannot run program "infocmp": CreateProcess error=2, The system cannot find the file specified #55

Open
mt3o opened this issue Nov 15, 2019 · 8 comments

Comments

@mt3o
Copy link

mt3o commented Nov 15, 2019

Version: 0.7.4
Windows 10
IntelliJ
vm: DCEVM11.0.1+8 and OpenJDK 11.0.4+11
When run, I see the following stacktrace:

WARNING: Unable to retrieve infocmp for type dumb-color
java.io.IOException: Cannot run program "infocmp": CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at org.jline.utils.InfoCmp.getInfoCmp(InfoCmp.java:547)
	at org.jline.terminal.impl.AbstractTerminal.parseInfoCmp(AbstractTerminal.java:187)
	at org.jline.terminal.impl.DumbTerminal.<init>(DumbTerminal.java:88)
	at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:401)
	at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:259)
	at me.tongfei.progressbar.ProgressThread.<init>(ProgressThread.java:56)
	at me.tongfei.progressbar.ProgressBar.<init>(ProgressBar.java:91)
	at me.tongfei.progressbar.ProgressBar.<init>(ProgressBar.java:39)
	at com.schneider.gss.predictive.App.aggregateSimilarKeywords(App.java:129)
	at com.schneider.gss.predictive.App.call(App.java:122)
	at com.schneider.gss.predictive.App.call(App.java:34)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1743)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
	at picocli.CommandLine.execute(CommandLine.java:1864)
	at com.schneider.gss.predictive.App.main(App.java:110)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessImpl.create(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:420)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:151)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 19 more

It doesn't break the application

@ctongfei
Copy link
Owner

jline/jline3#150
Does this solves your problem?

@mt3o
Copy link
Author

mt3o commented Nov 15, 2019

no... I added env var TERM=xterm-256color but nothing changed.
When I run the program on centos via ssh, the stack trace is not presented. For me it happens only on windows. I can try running it with WSL.

@ctongfei
Copy link
Owner

@mt3o I don't have a windows machine at hand. Does it work within WSL?

@pieterdegraeuwe
Copy link

same problem here.
What do you mean with 'Does it work with WSL?'
What is WSL?

@ctongfei
Copy link
Owner

ctongfei commented Dec 1, 2019

same problem here.
What do you mean with 'Does it work with WSL?'
What is WSL?

Windows Subsystem for Linux.

@ctongfei
Copy link
Owner

ctongfei commented Dec 1, 2019

Also, try using ProgressBarStyle.ASCII instead of the default colorful unicode style.

@DRSchlaubi
Copy link

DRSchlaubi commented Dec 1, 2019

Also, ASCII style fails with the same error
Don't have WSL ready rn so can't test it on WSL
EDIT: OSUtils.IS_WINDOWS also is somehow false like all of the others https://rice.by.devs-from.asia/idea64_RYt16QMDFs.png
However, when I eval the code of IS_WINDOWS it prints true
https://rice.by.devs-from.asia/idea64_OEvuvb5erh.png as the os.name property is Windows 10

Tried using CON_EMU and it works but it doesn't in intellij

I could get rid of the exception by muting jline's logger as the exception does not affect the progress bar

@MaaxGr
Copy link

MaaxGr commented Feb 13, 2021

Have the same exception in another library. Can confirm, that one possible workaround would be to use the WSL. No exception there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants