I had to create a new tab to get this to

I had to create a new tab to get this to work.
21 Replies
Adeel Ehsan
Adeel Ehsan•12mo ago
can you explain what do you mean had to create new tab ?
Brandon
BrandonOP•12mo ago
I just mean after I reloaded the extension, I had to use a new tab. All existing tabs wouldn't work.
Adeel Ehsan
Adeel Ehsan•12mo ago
Okay. Do i have to create the content folder and then create the file inside it? Or the content.txt is fine ?
Brandon
BrandonOP•12mo ago
I have contents/content.tsx
Adeel Ehsan
Adeel Ehsan•12mo ago
let me try that. new tab is't working for me
Adeel Ehsan
Adeel Ehsan•12mo ago
still no luck
Brandon
BrandonOP•12mo ago
Can you share the files you have?
Adeel Ehsan
Adeel Ehsan•12mo ago
would that work? or I should share all the files in zip folder ?
Brandon
BrandonOP•12mo ago
change const res = await sendToContentScript({ name: "getContent" }) to const res = await sendToContentScript({ name: "content" })
Arcane
Arcane•12mo ago
@Brandon has reached level 2. GG!
Brandon
BrandonOP•12mo ago
in popup.tsx
Adeel Ehsan
Adeel Ehsan•12mo ago
still no luck same error
Brandon
BrandonOP•12mo ago
I copied and pasted yours and it's working for me* with my suggested change Someone suggested closing the browser and restarting it
Adeel Ehsan
Adeel Ehsan•12mo ago
Hmmm. strange tried that as well
Arcane
Arcane•12mo ago
@Adeel Ehsan has reached level 2. GG!
Adeel Ehsan
Adeel Ehsan•12mo ago
Do you have other tabs open? can you please share package.json?
Brandon
BrandonOP•12mo ago
json {
"name": "Chrome Extension",
"displayName": "Web Chrome Extension",
"version": "0.0.1",
"description": "Here's the description of the app",
"author": "Me",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
"@plasmohq/messaging": "^0.6.1",
"plasmo": "0.84.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@types/chrome": "0.0.251",
"@types/jquery": "^3.5.29",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"prettier": "3.0.3",
"typescript": "5.2.2"
},
"manifest": {
"host_permissions": [
"https://*/*"
]
}
}
json {
"name": "Chrome Extension",
"displayName": "Web Chrome Extension",
"version": "0.0.1",
"description": "Here's the description of the app",
"author": "Me",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
"@plasmohq/messaging": "^0.6.1",
"plasmo": "0.84.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@types/chrome": "0.0.251",
"@types/jquery": "^3.5.29",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"prettier": "3.0.3",
"typescript": "5.2.2"
},
"manifest": {
"host_permissions": [
"https://*/*"
]
}
}
I didn't make any changes to my package.json yeah I have a whole bunch of tabs open, but every time I reload the extension, I open a new tab
Adeel Ehsan
Adeel Ehsan•12mo ago
I have closed all the tabs and restart the browser and then opened only single tab only are you using npm or pnpm ? I am using npm can you please share the zip folder of your project ? if possible
Brandon
BrandonOP•11mo ago
I'm using pnpm pnpm dev @Adeel Ehsan Not sure if you figured it out, but I just ran into it again. I deleted the build folder and built it again. Then it worked. Something else to try
Want results from more Discord servers?
Add your server