[🐛 Bug]: Second driver's discovery logging still misses a debug switch flipped mid-run
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với #17832, đặc biệt là Additional Considerations và Implementation Notes của issue này, sau đó lần theo quá trình khởi tạo RemoteWebDriver qua ChromeDriver/FirefoxDriver, DriverFinder, Selenium Manager và Debug.configureLogger(). Đánh giá các cách tiếp cận được liệt kê với một driver thứ hai có công tắc debug thay đổi trong khi chạy. Công việc được xem là hoàn tất khi hành vi trong trường hợp đó либо đã được sửa và xác minh, либо được ghi lại như một giới hạn được chấp nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature and motivation
Follow-up from #17832 (part of the umbrella tracker, see linked issue).
RemoteWebDriver's static initializer (JLS 12.4.2) is guaranteed to run once, before any subclass constructor body — including argument expressions passed to a subclass's own super(...) call, which is where ChromeDriver/FirefoxDriver perform DriverFinder/Selenium Manager discovery logging. #17832 uses that static initializer to make the first driver constructed in a JVM correctly pick up the debug switch for its own discovery logging.
That only covers the first driver. For a second (or later) driver, if the debug switch is flipped between the first and second construction, that second driver's own discovery logging still runs — via its super(...) argument evaluation — before Debug.configureLogger() is reached inside the instance constructor body. Its discovery logging is still missed.
This is not a regression: the gap has always existed on trunk. #17832 narrows it (first-driver case now works) but explicitly does not close it, and flags it as a maintainer call in its "Additional Considerations" section.
Options (not evaluated in depth yet — for whoever picks this up)
- Move (or duplicate) the
Debug.configureLogger()call earlier, intoDriverFinder/Selenium Manager's own discovery-logging call sites directly, so it no longer depends on being reached via any particular constructor's control flow. - Give
ChromeDriver/FirefoxDrivera static initializer of their own (JLS 12.4.2 runs a subclass's static initializer before any instance of it is constructed, but after the superclass's static initializer already ran) that callsDebug.configureLogger()— need to verify this actually resolves the second-driver case and not just duplicate the same first-instance limitation at a different class. - Accept the gap as a known limitation of static-initializer-timing and document it rather than fix it, if no clean fix exists that doesn't complicate driver subclass initialization further.
Related
#12892, #17832 (see its "Additional Considerations" and Implementation Notes items 1–2 for the original writeup of this gap).
- Ngôn ngữ chính
- Java
- Star
- 34.6k
- Fork
- 8.7k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- 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 SeleniumHQ/selenium
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
SeleniumHQ/selenium#18323 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
SeleniumHQ/selenium#17843 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[java] DriverFinderTest property fixture doesn't clear/restore selenium.webdriver.verboseCó thể làm lại được @stefanpoia đã nhận 25 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
SeleniumHQ/selenium#17836 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-needs-triaging C-java D-chrome D-firefox I-defect OS-linux
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 53/100
SeleniumHQ/selenium#18324 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: [py] Generated bidi.UserAgentClientHints is empty — inline CDDL params drop the commandCó thể đã có người làm @titusfortner đã nhận 3 ngày trước. Đang mởC-py OS-mac
SeleniumHQ/selenium#18312 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SeleniumHQ/selenium
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
btraceio/jafar#228 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
jenkinsci/git-client-plugin#1807 ·
-
area-templates triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/aspire#22356 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Coral-Hive] locate() is typed as STRING instead of INT, so view schemas report a string columnĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
apache/flink-agents#1395 ·
Maintainer thường phản hồi trong vòng 1 ngày