---
title: "Troubleshooting"
description: "Common errors and fixes for OCA on Termux + Android."
---
## Installation Errors
**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
```
**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"
```
**Fix**:
```bash
source ~/.bashrc
which node && node --version
```
If still failing:
```bash
export PATH="$HOME/.oca/node/bin:$PREFIX/bin:$PATH"
```
**Fix**:
```bash
npm config set prefix "$HOME/.oca/node"
```
**Fix**:
```bash
pkg install glibc-runner
bash ~/.oca/scripts/install-glibc.sh
```
**Fix**: Always install Qwen Code with `--ignore-scripts`:
```bash
npm install -g @qwen-code/qwen-code@latest --ignore-scripts
```
`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
```
---
## Runtime Errors
```bash
openclaw start --verbose
cat ~/.openclaw/logs/gateway.log | tail -50
```
Port conflict check:
```bash
lsof -i :18789
```
```bash
sshd
pgrep sshd && echo "running"
```
```bash
# Verify NODE_OPTIONS:
echo $NODE_OPTIONS
# Must include: -r ~/.oca/patches/glibc-compat.js
source ~/.bashrc
```
---
## 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/)