Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Auto-update downloads linux-x64 package on Alpine/musl, breaking runtime.node loading #3696

Copy link
Copy link
@david-pf123

Description

@david-pf123
Issue body actions

Describe the bug

On an Alpine Linux / musl container, Copilot CLI auto-update downloaded the linux-x64 package for v1.0.60 instead of the available linuxmusl-x64 package. The next Copilot invocation then failed before ACP initialization with Native addon "runtime" not found for linuxmusl-x64.

This looks like an auto-update platform selection issue rather than a missing release artifact: the v1.0.60 release publishes copilot-linuxmusl-x64.tar.gz and github-copilot-1.0.60-linuxmusl-x64.tgz, but the updater downloaded/selected linux-x64.

Affected version

  • Installed CLI: GitHub Copilot CLI 1.0.59
  • Auto-updated/downloaded package: 1.0.60
  • Runtime mode: copilot --acp

Environment

OS: Alpine Linux v3.23
process.platform: linux
process.arch: x64
Node.js: v20.20.2
detect-libc family: musl
detect-libc isNonGlibcLinuxSync(): true

Observed behavior

First successful run logged:

Successfully downloaded package, restart to update to version 1.0.60
Downloading updated linux-x64 binary...
Failed to update binary: Error: EACCES: permission denied, mkdir .../@github/copilot-linuxmusl-x64/.copilot-update-...

After that, subsequent invocations failed immediately:

Failed to load package index: ~/.cache/copilot/pkg/linuxmusl-x64/1.0.59/index.js Error: Native addon "runtime" not found for linuxmusl-x64. Tried:
  ~/.cache/copilot/pkg/linux-x64/1.0.60/prebuilds/linuxmusl-x64/runtime.node: Cannot find module ...
Require stack:
- ~/.cache/copilot/pkg/linux-x64/1.0.60/app.js
  ~/.cache/copilot/pkg/linux-x64/1.0.60/runtime.linux-x64-musl.node: Cannot find module ...
Require stack:
- ~/.cache/copilot/pkg/linux-x64/1.0.60/app.js

The persisted package cache contained both:

~/.cache/copilot/pkg/linuxmusl-x64/1.0.59
~/.cache/copilot/pkg/linux-x64/1.0.60

The linux-x64/1.0.60 package contains prebuilds/linux-x64/runtime.node, but the runtime correctly tries to load a musl addon (prebuilds/linuxmusl-x64/runtime.node) once running on Alpine/musl, so it cannot start.

Expected behavior

When running on Alpine/musl x64, auto-update should download/select the linuxmusl-x64 package for the target version, not linux-x64.

Workaround

Setting the environment variable below avoids the broken auto-update path and keeps the existing musl-compatible package running:

COPILOT_AUTO_UPDATE=false

With that env var, copilot --version stays on 1.0.59 and copilot --acp starts successfully again.

Additional context

This was observed in a restricted container where the home/cache directory is persistent across restarts, while global npm install paths are read-only to the runtime user. The failure occurs on the next invocation after the bad linux-x64/1.0.60 package has been downloaded into the persistent cache.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationInstalling, updating, versioning, PATH setup, and binary distributionInstalling, updating, versioning, PATH setup, and binary distributionarea:platform-linuxLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulators

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.