wxt-dev / wxt-dev/wxt

browser.webRequest.onAuthRequired

Open
#1,796 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pending-triage
Dominant language
TypeScript
Stars
10.5k
Forks
564
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Image

弹出代理认证信息输入框,却没有执行进入监听事件中

Image

browser.webRequest.onAuthRequired 和 chrome.webRequest.onAuthRequired 都试过,在网页刷新也是,监听似乎无效。 请大佬帮看看。

Reproduction

归档 2.zip

heyo。

Steps to reproduce

加载扩展程序:
打开 Chrome 或其他基于 Chromium 的浏览器,进入 chrome://extensions 页面。
启用右上角的 “开发者模式”。
点击 “加载已解压的扩展程序”。
选择项目中的 .output/chrome-mv3 目录。
打开开发者工具:
在扩展程序列表中找到 “onAuthRequired MV3 Bug”,点击 “服务工作线程” (Service Worker) 链接。这会打开背景脚本的开发者工具,我们可以在其控制台中看到 console.log 的输出。
触发事件:
点击浏览器工具栏上的扩展图标,会弹出一个小窗口 (Popup)。
点击窗口中的 “Trigger Auth Request” 按钮。
验证结果:
切换到你之前打开的 “服务工作线程” 控制台。
你应该能看到类似下面的日志输出,这证明 onAuthRequired 事件监听器已经成功触发

System Info
Mac 15 & Chrome 137
Used Package Manager

pnpm

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached reproduction and its .output/chrome-mv3 build; inspect the service worker console while reproducing the auth prompt in Chrome 137. Trace how the popup's “Trigger Auth Request” reaches browser.webRequest.onAuthRequired, and consider the issue complete when the listener reliably logs for the reproduced request.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.