Enrico
Enrico
PD🧩 Plasmo Developers
Created by Enrico on 3/26/2024 in #👾extension
ReferenceError: _messaging is not defined while using sendToBackground()
I am getting this weird error while trying to use the plasmo messaging package from my content script to send a message to one of the listeners (aiRequest) in my background worker Here is the code that the error is happening at:
const aiResponse = await sendToBackground({
name: "aiRequest",
body: {
question: question,
choices: choices.length === 0 ? "" : choices
},
extensionId: "fhgalfkajbagfafnfofdkpamchjhfgce"
});

console.log(aiResponse);
const aiResponse = await sendToBackground({
name: "aiRequest",
body: {
question: question,
choices: choices.length === 0 ? "" : choices
},
extensionId: "fhgalfkajbagfafnfofdkpamchjhfgce"
});

console.log(aiResponse);
Is this an issue with the new update?
1 replies