> ## Documentation Index
> Fetch the complete documentation index at: https://openclawonandroid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> 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 theme={null}
    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 theme={null}
    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 theme={null}
    source ~/.bashrc
    which node && node --version
    ```

    If still failing:

    ```bash theme={null}
    export PATH="$HOME/.oca/node/bin:$PREFIX/bin:$PATH"
    ```
  </Accordion>

  <Accordion title="npm ERR! code EACCES / permission denied" icon="lock">
    **Fix**:

    ```bash theme={null}
    npm config set prefix "$HOME/.oca/node"
    ```
  </Accordion>

  <Accordion title="glibc dynamic linker not found" icon="link">
    **Fix**:

    ```bash theme={null}
    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 theme={null}
    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 theme={null}
    cat ~/.openclaw/logs/update.log | tail -30
    ```
  </Accordion>
</AccordionGroup>

***

## Runtime Errors

<AccordionGroup>
  <Accordion title="OpenClaw gateway won't start" icon="power-off">
    ```bash theme={null}
    openclaw start --verbose
    cat ~/.openclaw/logs/gateway.log | tail -50
    ```

    Port conflict check:

    ```bash theme={null}
    lsof -i :18789
    ```
  </Accordion>

  <Accordion title="SSH connection refused" icon="terminal">
    ```bash theme={null}
    sshd
    pgrep sshd && echo "running"
    ```
  </Accordion>

  <Accordion title="os.cpus() crash / V8 engine panic" icon="microchip">
    ```bash theme={null}
    # Verify NODE_OPTIONS:
    echo $NODE_OPTIONS
    # Must include: -r ~/.oca/patches/glibc-compat.js

    source ~/.bashrc
    ```
  </Accordion>
</AccordionGroup>

***

## Diagnostics

```bash theme={null}
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/)
