Documentation: Correct the telemetry device ID fallback when persistence fails
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 91/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Mở docs/open-source/telemetry.mdx tại phần Identity được nhắc đến trong issue. So sánh mô tả về phương án dự phòng với mã chọn ID telemetry được liên kết và bài kiểm thử hồi quy. Cập nhật đoạn văn để mô tả việc ghi đè, ID được lưu bền vững và ID ngẫu nhiên cục bộ trong tiến trình theo thứ tự nêu trong issue; hoàn tất khi nội dung được xuất bản khớp với các hành vi đó, bao gồm cả thời gian tồn tại của tiến trình đối với phương án dự phòng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Type of Documentation Issue
Incorrect documentation
Documentation Page
https://docs.browser-use.com/open-source/telemetry
Issue Description
Summary
The published Telemetry page says Browser Use derives the fallback device ID from the machine's MAC address and hostname when it cannot write the device_id file. The library instead generates a random ID for the process. The sentence gives readers an inaccurate account of how the installation identifier is derived and how long it lasts when storage is unavailable.
Runtime or environment
Tested the latest PyPI release, browser-use 1.0.6, in an isolated CPython 3.12.16 environment on macOS arm64. Also ran the check against the library's current default-branch source using the same dependencies, and read both the published Telemetry page and its current SDK source. The source revisions are pinned below.
Steps to reproduce
- Read the Identity section of the published Telemetry page.
- In an empty directory on a POSIX system, create a virtual environment named
.venvand install the PyPI baseline above. Run as a user for whom a directory without write permission is unwritable. - Save the files below as
probe.pyandrun-probe.sh, then runbash run-probe.sh. The runner assembles two telemetry events in each of two fresh Python processes sharing an unwritable config directory, with usage telemetry enabled and no device ID override. It then repeats with writable storage. The probe assembles events in memory without starting the sender. It rejects thesocket.connect,socket.getaddrinfo, andsubprocess.Popenaudit events. The output reports process-local IDs for the unwritable case and a shared ID for the writable control. - To repeat the default-branch check, put the library at the pinned revision in a checkout named
libraryunder the probe directory and runbash run-probe.sh "$PWD/library". The runner passes that checkout to Python viaPYTHONPATHand uses the dependencies from.venv.
Reproduction script: probe.py
import os
import sys
from pathlib import Path
from uuid import UUID
def block_network(event, args):
if event in {"socket.connect", "socket.getaddrinfo", "subprocess.Popen"}:
raise AssertionError(f"Unexpected operation: {event}")
sys.addaudithook(block_network)
from browser_use.telemetry.service import Job, ProductTelemetry
telemetry = ProductTelemetry()
assert telemetry.enabled
first = telemetry._event(Job("offline_probe", lambda *_: {}))["distinct_id"]
second = telemetry._event(Job("offline_probe", lambda *_: {}))["distinct_id"]
assert first == second
device_file = Path(os.environ["BROWSER_USE_CONFIG_DIR"]) / "device_id"
if device_file.exists():
assert device_file.read_text().strip() == first
print(UUID(first).version, first)
Reproduction script: run-probe.sh
set -eu
source_dir="${1:-}"
fixture=$(mktemp -d "$PWD/fixture.XXXXXX")
config="$fixture/config"
mkdir "$config" "$fixture/home" "$fixture/xdg"
cleanup() {
chmod u+w "$config"
rm -r "$fixture"
}
trap cleanup EXIT
probe() {
env -i PATH="$PATH" PYTHONPATH="$source_dir" HOME="$fixture/home" XDG_CONFIG_HOME="$fixture/xdg" \
ANONYMIZED_TELEMETRY=true BH_TELEMETRY=1 BROWSER_USE_CONFIG_DIR="$config" \
.venv/bin/python probe.py
}
chmod a-w "$config"
first=$(probe)
second=$(probe)
test "${first%% *}" = 4
test "${second%% *}" = 4
test "$first" != "$second"
test ! -e "$config/device_id"
printf '%s\n' 'Write denied: UUIDv4, reused within each process, different across two processes, no device_id file.'
chmod u+w "$config"
first=$(probe)
second=$(probe)
test "$first" = "$second"
test -f "$config/device_id"
printf '%s\n' 'Writable control: the device_id file and both processes agree.'
Expected behavior
The Telemetry page should accurately describe the fallback identifier that usage events carry when no override is set and no existing ID can be loaded or written. It should describe a randomly generated ID reused for the life of the process.
Actual behavior
The published page and the SDK source describe a MAC address and hostname hash. In both tested library baselines, the first process used one UUIDv4 for both events and the second process used a different UUIDv4. No device_id file was created. With writable storage, both fresh processes used the ID saved in the file.
Evidence
- Expected source: SDK Telemetry page source shows the published fallback wording. The library regression test records the intended process-local behavior.
- Failure source: The offline check above reproduced the mismatch. The ID selection and persistence code caches
uuid.uuid4().hexwhen both the override and persistent ID are unavailable, and the event builder uses it asdistinct_idwhen usage telemetry is enabled. - Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check
Read the deployed Telemetry page and compare it with the offline check. The Identity paragraph should distinguish an explicit override, an ID reused or created through persistence, and a random ID reused for the life of the process when neither of the first two sources supplies an ID. An existing readable ID can still be used in a read-only directory.
References
- https://github.com/browser-use/browser-use/pull/6369 — Removed the MAC address and hostname fallback in the library.
- https://github.com/browser-use/browser-use/issues/5216 — Tracks disclosure of run-event fields. This report concerns how the event identifier is generated when persistence fails.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: The privacy documentation misstates both the inputs and the lifetime of the fallback identifier, which affects users assessing what distinguishes telemetry events from installations with unwritable storage.
- Workaround status: available
- Workaround basis: Readers can verify the fallback in the linked source and regression test or run the offline check.
Suggested Changes
Update the Identity paragraph to describe the three sources in order. Browser Use uses BROWSER_USE_DEVICE_ID when set to a nonempty value. Otherwise, it uses an ID from the device file if one is read or created. If neither source yields an ID, it generates a random ID and reuses it for the life of the process.
- Ngôn ngữ chính
- Python
- Star
- 123k
- Fork
- 13.8k
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 browser-use/browser-use
-
Feature Request: document NVIDIA NIM setup via ChatOpenAI(base_url=...)Có thể đã có người làm @NginxL đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
browser-use/browser-use#6607 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: CI: test_the_telemetry_thread_does_not_list_every_package_or_cdp_method fails on macos/windows — the 60 ms budget includes cold-process import costCó thể đã có người làm @uhhgxg đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
browser-use/browser-use#6603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: ProductTelemetry._at_exit() omits job.consent check and still sends queued non-consent events after runtime ANONYMIZED_TELEMETRY=falseCó thể đã có người làm @thomsjack đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
browser-use/browser-use#6542 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] printable() logging sanitizer leaves lone surrogates unescaped, so logging crashes with UnicodeEncodeErrorCó thể đã có người làm @passionworkeer đã nhận 11 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
browser-use/browser-use#6531 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Security: pinned pillow==12.3.0 has multiple critical advisories, fixed in 13.0.0Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
browser-use/browser-use#6491 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của browser-use/browser-use
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày