-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
If you hit something that isn't listed here, open an issue: https://github.com/cryptohopper/cryptohopper-cli/issues.
The browser flow spins up a loopback listener on 127.0.0.1:18765 and waits up to 5 minutes for Cryptohopper to call back. Common culprits:
"Port 18765 is already in use." Something else on your machine is holding it. The CLI errors out immediately in this case. Kill whatever is using the port, or pass --token <your-bearer-token> to skip the browser flow entirely. (If you suspect a previous cryptohopper login hung, it cleans up when its process exits — ps for stray cryptohopper and kill them.)
"OAuth state mismatch." The state nonce in the redirect didn't match what we sent. Retry the command — if it persists after a fresh retry, something upstream is rewriting the URL (malicious redirect, aggressive URL shortener, or a misconfigured corporate proxy).
Browser opens but no redirect back. The consent page likely had an error that the CLI didn't see. Re-run with the authorize URL printed in your terminal and copy-paste it into a private-window browser. If the Cryptohopper consent page shows "Client not found" or similar, the bundled client_id has been revoked — file an issue.
You clicked "Allow" but the terminal shows nothing. The loopback listener might be blocked by a firewall. Check your firewall settings — the binary needs inbound access on 127.0.0.1:18765 specifically (not all of localhost; not the external IP). On Windows, this triggers a UAC-style prompt the first time; accept it.
You installed via npm install -g @cryptohopper/cli — you have the Node-script install, not the standalone binary. The upgrade command only swaps standalone binaries. To update an npm install, run:
npm install -g @cryptohopper/cli@latestIf you want the standalone binary (no Node dependency), grab it from the latest release and put it on your PATH.
The CLI is installed somewhere the current user can't write to, typically /usr/local/bin. Options:
- Re-run with sudo:
sudo cryptohopper upgrade - Move the binary into a user-writable directory and update your
PATH:mkdir -p ~/.local/bin mv /usr/local/bin/cryptohopper ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH"
The CLI verifies every downloaded binary against SHA256SUMS before swapping. A mismatch usually means:
- Partial download. Re-run upgrade — transient.
- Man-in-the-middle on the download. Seen occasionally on misconfigured corporate networks. Try again from a different network.
- Release assets were re-uploaded after the SHA256SUMS file was created. Extremely rare and our fault; file an issue.
The CLI refuses to install a mismatched binary, which is the correct behaviour. Never bypass this.
The token is missing or no longer valid.
# What's the CLI seeing?
cryptohopper whoamiIf this fails with UNAUTHORIZED, re-run cryptohopper login. If you set CRYPTOHOPPER_TOKEN in an env var it overrides the config file — double-check it:
echo $CRYPTOHOPPER_TOKENUsually an IP allowlist mismatch. The error message prints the IP Cryptohopper saw:
cryptohopper hoppers list
# → ✗ IP not in allowlist
# IP: 203.0.113.42Add that IP to your app's allowlist in the Cryptohopper dashboard, or disable allowlisting for that app if you're running from dynamic IPs (e.g. CI).
The CLI renders Unicode box-drawing by default. If your terminal doesn't handle those glyphs (legacy cmd.exe, old PuTTY, etc.), use --json for machine-readable output:
cryptohopper hoppers list --json | jq '.hoppers[] | {id, name}'Completion is installed by piping the command output into your shell's completion directory. The commands are:
# bash
cryptohopper completion bash > /etc/bash_completion.d/cryptohopper
# zsh
cryptohopper completion zsh > "${fpath[1]}/_cryptohopper"
# fish
cryptohopper completion fish > ~/.config/fish/completions/cryptohopper.fish
# PowerShell
cryptohopper completion powershell | Out-String | Invoke-ExpressionZsh + Oh My Zsh: don't forget to run exec zsh (or restart your shell) after installing.
-
npm install: check
npm bin -gpoints at a directory on your PATH. -
Standalone binary: the binary isn't on your PATH.
which cryptohopper(orwhere cryptohopperon Windows) should resolve. Put the binary in/usr/local/bin,~/.local/bin, or wherever you keep user binaries.
logout clears the stored token in ~/.cryptohopper/config.json, but CRYPTOHOPPER_TOKEN env var (if set) will override that on the next run. Unset the env var too:
unset CRYPTOHOPPER_TOKENThen re-run cryptohopper whoami — it should now say "Not logged in".
Only happens to Node-script installs. Your npm install -g @cryptohopper/cli didn't install its peer @cryptohopper/sdk, or a stale lockfile is pointing at a missing version. Try:
npm install -g @cryptohopper/cli@latestIf that doesn't fix it, remove the global install and reinstall clean:
npm uninstall -g @cryptohopper/cli
npm install -g @cryptohopper/cli@latestIf nothing here helps, file an issue with:
- Your CLI version:
cryptohopper --version - Platform:
uname -a(orsysteminfoon Windows) - Install method: npm or standalone binary
- The full command you ran, with
--jsonif applicable - Any stderr output
- What you expected to happen
Please don't paste your bearer token — the error messages don't include it, but double-check your scrollback before posting.
Pages
SDK wikis
Resources