Files

137 lines
3.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Troubleshooting"
description: "Common errors and fixes for OCA on Termux + Android."
---
## Installation Errors
<AccordionGroup>
<Accordion title="EAI_AGAIN — DNS resolution failed" icon="wifi">
**Error**: `npm ERR! code ENOTFOUND` or `getaddrinfo EAI_AGAIN registry.npmjs.org`
**Cause**: glibc DNS resolver can't find `/etc/resolv.conf` (doesn't exist in Android 12+).
**Fix**:
```bash
mkdir -p $PREFIX/glibc/etc
printf 'nameserver 8.8.8.8\nnameserver 1.1.1.1\n' > $PREFIX/glibc/etc/resolv.conf
```
</Accordion>
<Accordion title="[Process completed (signal 9)]" icon="skull">
**Cause**: Android 12+ Phantom Process Killer terminated Termux.
**Fix**: See the [Phantom Process Killer guide](/docs/phantom-process-killer).
Quick fix (from PC with ADB):
```bash
adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647"
```
</Accordion>
<Accordion title="node: not found / command not found" icon="circle-exclamation">
**Fix**:
```bash
source ~/.bashrc
which node && node --version
```
If still failing:
```bash
export PATH="$HOME/.oca/node/bin:$PREFIX/bin:$PATH"
```
</Accordion>
<Accordion title="npm ERR! code EACCES / permission denied" icon="lock">
**Fix**:
```bash
npm config set prefix "$HOME/.oca/node"
```
</Accordion>
<Accordion title="glibc dynamic linker not found" icon="link">
**Fix**:
```bash
pkg install glibc-runner
bash ~/.oca/scripts/install-glibc.sh
```
</Accordion>
<Accordion title="node-pty build failed / @lvce-editor/ripgrep unrecognized platform" icon="hammer">
**Fix**: Always install Qwen Code with `--ignore-scripts`:
```bash
npm install -g @qwen-code/qwen-code@latest --ignore-scripts
```
</Accordion>
<Accordion title="openclaw update hangs for 20+ minutes" icon="clock">
`openclaw update` builds native modules from source — 5–15 mins is normal on a mid-range phone. Only cancel after 20+ minutes and check logs:
```bash
cat ~/.openclaw/logs/update.log | tail -30
```
</Accordion>
</AccordionGroup>
---
## Runtime Errors
<AccordionGroup>
<Accordion title="OpenClaw gateway won't start" icon="power-off">
```bash
openclaw start --verbose
cat ~/.openclaw/logs/gateway.log | tail -50
```
Port conflict check:
```bash
lsof -i :18789
```
</Accordion>
<Accordion title="SSH connection refused" icon="terminal">
```bash
sshd
pgrep sshd && echo "running"
```
</Accordion>
<Accordion title="os.cpus() crash / V8 engine panic" icon="microchip">
```bash
# Verify NODE_OPTIONS:
echo $NODE_OPTIONS
# Must include: -r ~/.oca/patches/glibc-compat.js
source ~/.bashrc
```
</Accordion>
</AccordionGroup>
---
## Diagnostics
```bash
oca --status
# Manual checks:
node --version
node -e "console.log(process.platform)" # Should print: linux
npm --version
openclaw --version
cat $PREFIX/glibc/etc/resolv.conf
echo $PATH | tr ':' '\n'
```
---
## Still stuck?
- [GitHub Issues](https://github.com/PsProsen-Dev/OpenClaw-On-Android/issues)
- [GitHub Discussions](https://github.com/PsProsen-Dev/OpenClaw-On-Android/discussions)
- [r/termux](https://www.reddit.com/r/termux/)