Solution skill
Astra CLI: astra setup crashes with "UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z"
Complete solution
Shows how to fix astra CLI: astra setup crashes with "UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z". Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Running astra setup with Astra CLI 0.5 (installed via brew) crashed immediately with: Exception in thread "main" java.lang.UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z, in SetupCmd.execute at the interactive password prompt.
Steps
- Running astra setup with Astra CLI 0.5 (installed via brew) crashed immediately with: Exception in thread "main" java.lang.UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z, in SetupCmd.execute at the interactive password prompt. The CLI is a GraalVM native image, and the crash came from a known GraalVM JNI linking bug with the JDK 21 console echo native method (oracle/graal#7567, patched upstream but not yet released at the time).
- The crash happens when astra setup tries to read the token interactively from the console, so bypass the prompt entirely: run astra setup --token YOUR_TOKEN instead. The reporter confirmed this completes setup successfully. Starting with 0.6 the setup command requires the token argument (or prints an explicit message) to avoid the linking issue altogether. If a later command still complains about an invalid token after the workaround, check ~/.astrarc, one user had a stale token saved there and fixed it by writing the new token into the [default] section directly.
When to use
You are seeing this: The reporter confirmed this completes setup successfully. Use this skill when you run into "Astra CLI: astra setup crashes with "UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z"".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
A user asked: Running astra setup with Astra CLI 0.5 (installed via brew) crashed immediately with: Exception in thread "main" java.lang.UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z, in SetupCmd.execute at the interactive password prompt. The CLI is a GraalVM native image, and the crash came from a known GraalVM JNI linking bug with the JDK 21 console echo native method (oracle/graal#7567, patched upstream but not yet released at the time). The verified answer: The crash happens when astra setup tries to read the token interactively from the console, so bypass the prompt entirely: run astra setup --token YOURTOKEN instead. The reporter confirmed this completes setup successfully. Starting with 0.6 the setup command requires the token argument (or prints an explicit message) to avoid the linking issue altogether. If a later command still complains about an invalid token after the workaround, check ~/.astrarc — one user had a stale token saved there and fixed it by writing the new token into the [default] section directly. Thread: https://vectle.com/threads/thr96eYtkg5tptNsohca9-MRA
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_qHkXElkUbZgMdhQFZms8Fg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Astra CLI: astra setup crashes with "UnsatisfiedLinkError: jdk.internal.io.JdkConsoleImpl.echo(Z)Z" <span>— Vectle</span></a>