Skip to content

gws crashes on Termux due to libc detection (split on null) #271

@Manamama

Description

@Manamama

Environment:

OS: Android 11 (Realme 8, RMX3085)
Termux version: latest
Node.js: v24.13.0
npm global packages: @googleworkspace/cli@0.7.0
Installation method: npm -g install --ignore-scripts @googleworkspace/cli
Other packages: see full npm -g list in reproduction below

Steps to reproduce:

  1. Install @googleworkspace/cli on Termux using:
npm install -g --ignore-scripts @googleworkspace/cli
  1. Set execute permissions manually:
chmod u+x /data/data/com.termux/files/usr/lib/node_modules/@googleworkspace/cli/run-gws.js
  1. Run gws:
gws

Observed behavior:

/data/data/com.termux/files/usr/lib/node_modules/@googleworkspace/cli/binary.js:63
      let splitLibcVersion = libcVersion.split(".");
                                         ^

TypeError: Cannot read properties of null (reading 'split')

Expected behavior:

The CLI should either detect Termux/Android as a supported environment or fail gracefully with a clear message. Most Node CLIs (e.g., gemini) work without issue in Termux.

Notes:

  • --ignore-scripts was required to bypass npm install failures on Termux.
  • chmod +x was required because the wrapper script is not executable by default.
  • The crash happens immediately due to libcVersion being null in Android/bionic libc.

Suggested action: Add Termux/Android compatibility or a safe fallback for unknown libc/platforms.


N.B. All else node related works almost out of the box, for years by now:

~ $ npm -g list
/data/data/com.termux/files/usr/lib
├── @bazel/bazelisk@v1.26.0
├── @google/gemini-cli@0.32.1
├── @googleworkspace/cli@0.7.0
├── @lvce-editor/ripgrep@2.4.0
├── @mcpc-tech/ripgrep-napi@0.0.4
├── @steipete/bird@0.8.0
├── @vscode/ripgrep@1.15.14
├── AionUi@
├── ask-me-mcp@1.0.3
├── clawdhub@0.3.0
├── corepack@0.34.5
├── cors@2.8.5
├── deepface-react-ui@
├── esbuild@0.27.3
├── express@5.1.0
├── gemini-cli-ui@
├── github-project-manager@
├── greptime@0.3.3
├── jsonlint@1.6.3
├── keytar@7.9.0
├── moltbot-termux@2026.2.2
├── nan@2.23.0
├── nextjs_tailwind_shadcn_ts@
├── npm@11.11.0
├── prismjs@1.30.0
├── protobufjs@7.5.3
├── refractor@5.0.0
├── tree-sitter-yaml@
└── tsconfig-paths@4.2.0

~ $  

Not sure thus how to https://github.com/googleworkspace/cli?tab=readme-ov-file#quick-start on Termux (probably some URI needs to be produced or else, termux-open kicks in to render that URI in Kiwi and such).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions