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

Regression "WARNING: Unable to create a system terminal, creating a dumb terminal" #786

Closed
velo opened this issue Feb 3, 2023 · 9 comments
Milestone

Comments

@velo
Copy link

velo commented Feb 3, 2023

This was working fine on 0.8.0 and 0.8.2. On 0.9.0 and 1.0.0.m4 I get the follwing warning:

$ mvnd

Feb 03, 2023 1:47:20 PM org.jline.utils.Log logr

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

....

And a very bad maven style console output (now that I got used to mvnd man... regular mvn output hurts)

Seems to be related to

#36


$ mvnd -v

Feb 03, 2023 1:54:41 PM org.jline.utils.Log logr

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

Apache Maven Daemon (mvnd) 0.9.0 windows-amd64 native client (fa3cc5d66458a8526bd543de85566293113dacc4)

Terminal: org.jline.terminal.impl.DumbTerminal

Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)

Maven home: C:\Program Files (x86)\Development\mvnd-0.9.0-windows-amd64

Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4

Default locale: en_NZ, platform encoding: Cp1252

OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Using -X doesn't seem to include any extra information

@humbleshuttler
Copy link

I am seeing similar error when running gradle run for the application. I cannot seem to run it from intellij as well.

./gradlew run    789  20:18:08 

Task :app:run
Feb 12, 2023 8:18:16 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
? Player 0, Current bid is 0, do you want to bid or pass? Exception in thread "main" java.lang.IllegalArgumentException: Invalid Char code: -1
at com.github.kinquirer.core.KInquirerReaderHandlerNewTerminal.handleInteraction(ReaderHandler.kt:28)
at com.github.kinquirer.KInquirer$prompt$1.invoke(KInquirer.kt:17)
at com.github.kinquirer.KInquirer$prompt$1.invoke(KInquirer.kt:13)
at com.github.kinquirer.KInquirer.runTerminal(KInquirer.kt:33)
at com.github.kinquirer.KInquirer.prompt(KInquirer.kt:13)
at com.github.kinquirer.components.InputKt.promptInput(Input.kt:98)
at com.github.kinquirer.components.InputKt.promptInput$default(Input.kt:90)

Task :app:run FAILED

FAILURE: Build failed with an exception.

@gnodet
Copy link
Contributor

gnodet commented Feb 14, 2023

@velo could you run the following command:

MVND_CLIENT=jvm MAVEN_OPTS="-DconsoleLevel=debug" mvnd.sh

and report the output ?

@velo
Copy link
Author

velo commented Feb 15, 2023

Hi @gnodet

Here goes the output on 0.8.2 (which works) and 0.9.0 (which does not)

$ MVND_CLIENT=jvm MAVEN_OPTS="-DconsoleLevel=debug" ./mvnd.cmd -v
Picked up _JAVA_OPTIONS: -Duser.home=H:\Documents
851   DEBUG o.m.mvnd.client.DefaultClient - Starting client
Looking up daemon...  time: 00:00nRegistry - loading own PID from VM name: 17620
1344  DEBUG o.m.mvnd.client.DaemonConnector - Found 1 idle daemons, 1 compatibles
1344  DEBUG o.m.mvnd.client.DaemonConnector - Connecting to Daemon
1346  DEBUG o.m.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:59250.
1366  DEBUG o.m.mvnd.client.DaemonConnector - Connected to address /127.0.0.1:59250.
1366  DEBUG o.m.mvnd.client.DaemonConnector - Exchanged token successfully
1527  DEBUG o.m.mvnd.client.DaemonConnector - Connected
mvnd 0.8.2 JVM client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.ExecPty
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Program Files (x86)\Development\mvnd-0.8.0-windows-amd64\mvn
Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4
Default locale: en_NZ, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
1761  DEBUG o.m.m.client.DaemonClientConnection - thread 1: connection stop
$ MVND_CLIENT=jvm MAVEN_OPTS="-DconsoleLevel=debug" ./mvnd.sh -v
Picked up _JAVA_OPTIONS: -Duser.home=H:\Documents
1337  DEBUG o.m.mvnd.client.DefaultClient - Starting client
Looking up daemon...  time: 00:01nRegistry - loading own PID from VM name: 19448
1873  DEBUG o.m.mvnd.client.DaemonConnector - Found 0 idle daemons, 0 compatibles
1874  DEBUG o.m.mvnd.client.DaemonConnector - Found 0 busy daemons, 0 cancelled, 0 compatibles
Starting new daemon 516bea0e (subsequent builds will be faster)...  time: 00:01
1998  DEBUG o.m.mvnd.client.DaemonConnector - Starting daemon process: id = 516bea0e, workingDir = C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\bin, daemonArgs: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4\bin\java.exe -classpath C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\lib\mvnd-common-0.9.0.jar;C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\lib\mvnd-agent-0.9.0.jar -javaagent:C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\lib\mvnd-agent-0.9.0.jar -Dmvnd.home=C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64 -Dmaven.home=C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64 -Dmaven.conf=C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\conf -Dmvnd.java.home=C:\Program Files (x86)\Development\SDKs\jdk-17.0.4 -Dlogback.configurationFile=C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64\conf\logging\logback-mvnd.xml -Dmvnd.id=516bea0e -Dmvnd.daemonStorage=H:\Documents\.m2\mvnd\registry\0.9.0 -Dmvnd.registry=H:\Documents\.m2\mvnd\registry\0.9.0\registry.bin -Dmvnd.socketFamily=inet -Dmvnd.home=C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64 -Djdk.java.options=--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Dmvnd.noDaemon=false -Dmvnd.debug=false -Dmvnd.debug.address=8000 -Dmvnd.idleTimeout=3h -Dmvnd.keepAlive=100ms -Dmvnd.extClasspath= -Dmvnd.coreExtensions= -Dmvnd.enableAssertions=false -Dmvnd.expirationCheckDelay=10s -Dmvnd.duplicateDaemonGracePeriod=10s -Dmvnd.socketFamily=inet org.mvndaemon.mvnd.common.MavenDaemon
2066  DEBUG o.m.mvnd.client.DaemonConnector - Started Maven daemon 516bea0e
4105  DEBUG o.m.mvnd.client.DaemonConnector - Connecting to Daemon
4105  DEBUG o.m.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:54419.
4135  DEBUG o.m.mvnd.client.DaemonConnector - Connected to address /127.0.0.1:54419.
4136  DEBUG o.m.mvnd.client.DaemonConnector - Exchanged token successfully
4331  DEBUG o.m.mvnd.client.DaemonConnector - Connected
Apache Maven Daemon (mvnd) 0.9.0 JVM client (fa3cc5d66458a8526bd543de85566293113dacc4)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.ExecPty
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: C:\Program Files (x86)\Development\maven-mvnd-0.9.0-windows-amd64
Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4
Default locale: en_NZ, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
4624  DEBUG o.m.m.client.DaemonClientConnection - thread 1: connection stop

Noticed that by adding MVND_CLIENT=jvm I get the nice output, w/o it I get mvn style output.

Sadly, just adding consoleLevel debug doesn't produce any output

$ MAVEN_OPTS="-DconsoleLevel=debug" "/c/Program Files (x86)/Development/maven-mvnd-0.9.0-windows-amd64/bin/mvnd.sh"              Feb 15, 2023 2:36:58 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

Also, forgot to mention on the original PR, I'm using mintty/git bash as terminal.

Cheers

@psiroky
Copy link
Contributor

psiroky commented Mar 10, 2023

From #793 by @gnodet

I've merged some enhancements which will enable more logging.
Could someone download a build from https://github.com/apache/maven-mvnd/actions/runs/4386402864 and run the following command:

MVND_CLIENT=jvm MAVEN_OPTS="-DconsoleLevel=debug" bin/mvnd.sh -v

This should give much more information than before.

I tried with the linked mvnd-m39-windows and I am not able to reproduce the issue anymore (using GitBash):

</c/mvnd/maven-1.0.0-m5-SNAPSHOT-mvnd-m39-windows-amd64/bin>
$ ls
mvnd-bash-completion.bash  mvnd-client.conf  mvnd-daemon.conf  mvnd.cmd  mvnd.exe*  mvnd.sh*  platform-windows-amd64

</c/mvnd/maven-1.0.0-m5-SNAPSHOT-mvnd-m39-windows-amd64/bin>
$ ./mvnd --version
Apache Maven Daemon (mvnd) 1.0.0-m5-SNAPSHOT windows-amd64 native client (c7fd921e45352631ebc64618a9854dae58c7692b)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.ExecPty
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: C:\mvnd\maven-1.0.0-m5-SNAPSHOT-mvnd-m39-windows-amd64\mvn
Java version: 17.0.6, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

</c/mvnd/maven-1.0.0-m5-SNAPSHOT-mvnd-m39-windows-amd64/bin>
$ ./mvnd.sh --version
Apache Maven Daemon (mvnd) 1.0.0-m5-SNAPSHOT windows-amd64 native client (c7fd921e45352631ebc64618a9854dae58c7692b)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.ExecPty
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: C:\mvnd\maven-1.0.0-m5-SNAPSHOT-mvnd-m39-windows-amd64\mvn
Java version: 17.0.6, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

Could this have been fixed in the meantime, by e.g. the jline upgrade 6e4e9df?

Edit: I tried a mvnd build before the jline upgrade (https://github.com/apache/maven-mvnd/suites/11473825993/artifacts/592369331) and that one is failing. So it indeed seems like the new jline version fixes the issue here, or possibly some other recent change after the jline upgrade.

@velo
Copy link
Author

velo commented Mar 12, 2023

-I tried m39, no luck!-

$ mvnd -v
mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.ExecPty
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Program Files (x86)\Development\mvnd-0.8.0-windows-amd64\mvn
Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4
Default locale: en_NZ, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Purged 7 log files (log available in C:\Users\MFEMB9\.m2\mvnd\registry\0.8.2\purge-2023-03-13.log)

-Same issue:-

$ mvnd -v
Mar 13, 2023 9:42:09 AM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
Apache Maven Daemon (mvnd) 0.9.0 windows-amd64 native client (fa3cc5d66458a8526bd543de85566293113dacc4)
Terminal: org.jline.terminal.impl.DumbTerminal
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: C:\Program Files (x86)\Development\mvnd-0.8.0-windows-amd64
Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Development\SDKs\jdk-17.0.4
Default locale: en_NZ, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Purged 5 log files (log available in C:\Users\MFEMB9\.m2\mvnd\registry\0.9.0\purge-2023-03-13.log)

-How can I be sure the correct version of jline was include?-

-Is the a mvndDebug version I can run?-

@velo
Copy link
Author

velo commented Mar 12, 2023

Well, it worked, kinda...

The error I got on the previous message was when downloading from the link you gave me. That version, didn't worked.

But, I when to the commit, navigate to build and download from this page:
https://github.com/apache/maven-mvnd/actions/runs/4382414520

That version is working!

@ppalaga
Copy link
Contributor

ppalaga commented Mar 12, 2023

Thanks for confirming, @velo! Lets close then

@ppalaga ppalaga closed this as completed Mar 12, 2023
@psiroky
Copy link
Contributor

psiroky commented Mar 13, 2023

Do we need to bump the jline version also on branch 0.10.x? Or is that branch somewhat outdated, since now master includes both m39 and m40 distributions?

@gnodet
Copy link
Contributor

gnodet commented Mar 13, 2023

Do we need to bump the jline version also on branch 0.10.x? Or is that branch somewhat outdated, since now master includes both m39 and m40 distributions?

Yes, I'm not planning on releasing 0.10.x anymore, since master includes support for both maven distros.

@gnodet gnodet modified the milestones: 0.10.0, 1.0.0-m5 Mar 13, 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