Browser Use activation fails on Windows Unicode profile paths: false registration conflict and broken native launcher
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, node.js, powershell
Hướng nghiên cứu
Start by reading scripts/nativeMessagingRegistration.mjs and scripts/doctor.mjs, focusing on readRegistryDefaultValue, launcherContent, and launcherRuntimeIsAvailable. Reproduce activation on Windows with a non-ASCII profile path and a non-UTF-8 console code page, then trace the registry comparison and launcher's handling of paths. Done means activation recognizes the existing registration, the native host connects, and regression coverage verifies both behaviors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
/browser-use:activate fails on Windows when the Browser Host is installed under a profile path containing a non-ASCII character (reproduced with U+00E9) and the console code page is 850.
There are two separate encoding problems:
- The registration reader decodes
reg.exe queryoutput as UTF-8, although the command emits the active Windows console encoding. A correct registry path is misread, producing the misleading error "Browser setup belongs to another installation." - The generated
native-host.batcontains UTF-8 absolute paths but does not select UTF-8 beforecmd.exeparses them. Node starts, but receives a corrupted host-module path and exits withMODULE_NOT_FOUND. Edge therefore cannot connect.
Repeating activation without correcting these problems does not help. This was not a conflicting Copilot installation or a disabled browser extension.
Affected versions and environment
- Serving GitHub Copilot desktop app: 1.5.0, stamped build, not a local source build.
- Bundled CLI/SDK installation directory: 1.0.115-7 (distinct from the desktop app version).
- Browser Use plugin: 0.2.1.
- Browser Native Host: 0.2.1.
- Edge GitHub Copilot extension: 0.2.2, enabled.
- Node.js: v24.12.0.
- Windows; PowerShell; active console code page 850.
- Browser: Microsoft Edge.
The extension and host were confirmed compatible after the repair. Their different product versions were not the cause.
Steps to reproduce
-
Use Windows with a non-ASCII character in the profile/local-app-data path, and a non-UTF-8 console code page. For example, use a synthetic profile name containing
U+00E9; no real username is required. -
Install and enable the matching GitHub Copilot extension in Edge.
-
Run
/browser-use:activate, which invokes:node "<PLUGIN_ROOT>\scripts\activate.mjs" -
Observe that setup reports a repair but exits with code 1, even though the registered manifest belongs to the current installation.
-
Repeat the same activation; observe the same failure.
Relevant excerpts from the failed activation:
Browser Host setup for 0.2.1 was repaired.
FAIL Browser setup belongs to another installation. Run /browser-use:activate.
WARN No Browser runtime is currently connected.
WARN Browser compatibility could not be verified because no runtime is connected.
Summary: 12 passed, 2 warnings, 1 failures.
[copilot-browser] Browser verification failed. Browser registration remains installed.
Expected behavior
Registration should be compared using Unicode-safe Windows registry reads. The generated native-host launcher should preserve non-ASCII paths, irrespective of the caller's console code page. A correctly registered host should start and connect to Edge without a false installation-conflict diagnosis.
Diagnosis and isolated reproduction
The affected bundled helpers are in both scripts/nativeMessagingRegistration.mjs and scripts/doctor.mjs:
readRegistryDefaultValue: runsreg.exe query <key> /vevia Node'sexecFile, then parses the implicitly UTF-8-decoded stdout.launcherContent: emits a UTF-8 batch file containing the absolute Node and native-host paths.launcherRuntimeIsAvailable: checks the launcher shape and executable's existence, but the original format passes this check even whencmd.execannot decode its host path.
A direct .NET registry read confirmed that the actual HKCU native-host registration exactly matched the current manifest. Reading the same registration using the original Node helper failed the equality check.
A bounded regression harness extracted those helpers from backups of the original scripts. It generated a temporary launcher and synthetic host module under a directory containing U+00E9, executed the launcher under CP850, and checked exact stdout. Both original script copies failed:
- Unicode registry-path equality.
- Actual batch execution:
MODULE_NOT_FOUNDfor the corrupted synthetic module path.
Missing-key behavior and launcher-runtime inspection passed. The harness restored the original console code page and removed its temporary fixture directory.
Local repair and outcome
With explicit user approval, the two installed scripts were backed up and locally patched:
- Read the registry through .NET using an encoded PowerShell command; return the value as ASCII Base64 carrying UTF-16LE. This avoids dependence on console-output encoding and preserves absent-key behavior.
- Emit
chcp 65001 >nulbefore the non-ASCII command line in the generated Windows launcher. - Update launcher-format inspection consistently, so standard activation regenerates the old launcher and its integrity record through the existing repair path.
The same focused regressions then passed: 8 passed, 0 failed, versus 4 failures before the repair.
The unmodified activation command was rerun, without extra arguments or bypassing verification:
Summary: 15 passed, 0 warnings, 0 failures.
Browser activation verified. Browser is available.
Browser discovery independently returned product: "edge" and status: "online", with extension 0.2.2 and host 0.2.1. The persisted launcher hash matched its activation record.
No Edge profile changes, browser restart, global code-page change, or permission bypass was required. This is an unofficial, reversible local workaround that an update may overwrite; an upstream fix should cover both the registry decoder and the native-host launcher, with Windows Unicode-path regression tests.
No real usernames, full local paths, browser instance IDs, credentials, or project data are included in this report.
- Ngôn ngữ chính
- Python
- Star
- 11.5k
- Fork
- 2k
- Merge trung bình
- 6 giờ 34 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
area:plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#5567 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationĐang mởarea:tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#5476 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5340 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage Suggestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Suggestion]: NoParrotĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
collabnix/awesome-mcp-lists#515 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày