wxt-dev / wxt-dev/wxt

Can not get responses in Popup script

Open
#1,331 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

Hi, I am new to extension dev, I am following the examples in background forward message, but the popup can not get the message, I am bit confused what's happening here.

Based on the code, I am expecting it should receive a response and display it, but the response is actually undefined here.
image
I tried the suggestion here but it is still not working..
https://github.com/wxt-dev/wxt/discussions/971

Reproduction

https://github.com/wxt-dev/examples/tree/main/examples/background-message-forwarder

Steps to reproduce

run the example, see if you could get the response displayed

System Info
System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M4
    Memory: 319.52 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
    pnpm: 8.6.2 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 131.0.6778.205
    Safari: 18.2
Used Package Manager

npm

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

Run the examples/background-message-forwarder reproduction and inspect the popup script and background-forward-message flow described in the issue. Confirm why the popup receives undefined, then verify that the expected response is displayed when the example is run.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.