Skip to content

1.4.3 still regresses proxy installs: plugin/LSP downloads fail while 1.3.7 works #22454

@c-w-xiaohei

Description

@c-w-xiaohei

Description

OpenCode 1.4.3 still fails to install plugins and on-demand LSP packages when proxy environment variables are present, even when the proxy values are valid and reachable.

The failure is:

request to https://registry.npmjs.org/opencode-scheduler failed, reason: fetch() proxy.url must be a non-empty string

and for git-based plugins:

request to https://codeload.github.com/obra/superpowers/tar.gz/917e5f53b16b115b70a3a355ed5f4993b9f8b73d failed, reason: fetch() proxy.url must be a non-empty string

This does not look like a network outage or a bad plugin package:

  • Direct requests to the same GitHub tarball and repo URL return 200 OK
  • bun add opencode-scheduler works in the same shell with the same proxy env
  • bun add "superpowers@git+https://github.com/obra/superpowers.git" also works in the same shell with the same proxy env
  • If I start opencode with proxy env vars removed, opencode plugin opencode-scheduler -g succeeds immediately

The strong regression signal is that the old binary still works:

  • opencode 1.3.7 succeeds under the same proxy env
  • opencode 1.4.3 fails under the same proxy env

From logs and binary inspection, 1.3.7 uses a Bun-based install path, while 1.4.3 uses an internal npm/arborist/pacote/make-fetch-happen path.

So this looks like a regression in the newer internal package install path, not in the proxy itself.

Plugins

  • superpowers@git+https://github.com/obra/superpowers.git
  • opencode-scheduler
  • opencode-gemini-auth

Also affects on-demand LSP package installs such as typescript-language-server and yaml-language-server.

OpenCode version

  • Broken: 1.4.3
  • Works under same proxy env: 1.3.7

Steps to reproduce

  1. Export valid proxy env vars, for example:
export http_proxy=http://192.168.250.1:7890
export https_proxy=http://192.168.250.1:7890
  1. Verify the proxy itself works, for example:
curl -I https://registry.npmjs.org/
curl -I https://github.com/obra/superpowers
  1. Use a clean HOME so config/cache from previous runs do not matter:
mkdir -p /tmp/opencode-home
HOME=/tmp/opencode-home opencode plugin opencode-scheduler -g --print-logs --log-level DEBUG
  1. Observe failure:
request to https://registry.npmjs.org/opencode-scheduler failed, reason: fetch() proxy.url must be a non-empty string
  1. Repeat with a git-backed plugin:
HOME=/tmp/opencode-home opencode plugin "superpowers@git+https://github.com/obra/superpowers.git" -g --print-logs --log-level DEBUG
  1. Observe failure against codeload.github.com with the same proxy.url must be a non-empty string error.

  2. As a control, remove proxy env vars and rerun:

env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY -u no_proxy -u NO_PROXY \
  HOME=/tmp/opencode-home-clean \
  opencode plugin opencode-scheduler -g --print-logs --log-level DEBUG
  1. Observe that installation succeeds.

  2. As a second control, run the old 1.3.7 binary with the same proxy env and observe that installation succeeds there as well.

Screenshot and/or share link

No screenshot. Relevant logs from 1.4.3:

INFO  service=npm pkg=opencode-scheduler@latest installing package
ERROR service=plugin pkg=opencode-scheduler version=latest error=request to https://registry.npmjs.org/opencode-scheduler failed, reason: fetch() proxy.url must be a non-empty string failed to install plugin
ERROR service=plugin pkg=superpowers version=git+https://github.com/obra/superpowers.git error=request to https://codeload.github.com/obra/superpowers/tar.gz/917e5f53b16b115b70a3a355ed5f4993b9f8b73d failed, reason: fetch() proxy.url must be a non-empty string failed to install plugin

Related LSP failure from the same install path:

ERROR service=lsp error=NpmInstallFailedError Caused by: request to https://registry.npmjs.org/typescript-language-server failed, reason: fetch() proxy.url must be a non-empty string Failed to spawn LSP server typescript

Operating System

Linux

Terminal

Bash

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions