progressbar icon indicating copy to clipboard operation
progressbar copied to clipboard

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

Open mt3o opened this issue 4 years ago • 8 comments

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

mt3o avatar Nov 15 '19 12:11 mt3o

https://github.com/jline/jline3/issues/150 Does this solves your problem?

ctongfei avatar Nov 15 '19 16:11 ctongfei

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.

mt3o avatar Nov 15 '19 16:11 mt3o

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

ctongfei avatar Nov 22 '19 14:11 ctongfei

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

pieterdegraeuwe avatar Nov 30 '19 14:11 pieterdegraeuwe

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

Windows Subsystem for Linux.

ctongfei avatar Dec 01 '19 04:12 ctongfei

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

ctongfei avatar Dec 01 '19 04:12 ctongfei

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

DRSchlaubi avatar Dec 01 '19 09:12 DRSchlaubi

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

MaaxGr avatar Feb 13 '21 18:02 MaaxGr