I had to create a new tab to get this to

I had to create a new tab to get this to work.
Adeel Ehsan
Adeel Ehsan•145d ago
can you explain what do you mean had to create new tab ?
Brandon
Brandon•145d 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•145d ago
Okay. Do i have to create the content folder and then create the file inside it? Or the content.txt is fine ?
Brandon
Brandon•145d ago
I have contents/content.tsx
Adeel Ehsan
Adeel Ehsan•145d ago
let me try that. new tab is't working for me
Brandon
Brandon•145d ago
Adeel Ehsan
Adeel Ehsan•145d ago
still no luck
Brandon
Brandon•145d ago
Can you share the files you have?
Adeel Ehsan
Adeel Ehsan•145d ago
Adeel Ehsan
Adeel Ehsan•145d ago
would that work? or I should share all the files in zip folder ?
Brandon
Brandon•145d ago
change const res = await sendToContentScript({ name: "getContent" }) to const res = await sendToContentScript({ name: "content" })
Arcane
Arcane•145d ago
@Brandon has reached level 2. GG!
Brandon
Brandon•145d ago
in popup.tsx
Adeel Ehsan
Adeel Ehsan•145d ago
still no luck same error
Brandon
Brandon•145d 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•145d ago
Hmmm. strange tried that as well
Arcane
Arcane•145d ago
@Adeel Ehsan has reached level 2. GG!
Adeel Ehsan
Adeel Ehsan•145d ago
Do you have other tabs open? can you please share package.json?
Brandon
Brandon•145d 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•145d 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
Brandon•142d 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
More Posts
Where can i see the logs from my popup.vue or popup.tsx?Where can i see the logs from my popup.vue or popup.tsx?Need help getting started?I've got an idea to add hyperlinks on a catalog page, specific to my university. I'd take a specificReceiving end does not exist.Hey there, new Plasmo user here. I'm trying to pull some information from the DOM (of the currently Google Analytics 4Update the https://docs.plasmo.com/quickstarts/with-google-analytics to be using https://developer.cConfirmation email link for supabase template not workingI get the following when I click the link on the supabase confirmation email (see image). The confiGetting data from the current tabs localStorageHello everyone. I did look at the previous messages but still not sure how this works. What i want tHot swap Svelte components```html <script lang="ts"> import cssText from "data-text:./Insights.scss"; import { getGlobalElExtension being rejected for remote code when using Google Analytics with PlasmoI've added Google Analytics to my popup and I'm getting rejected by Google play store. InterestinglyUsing raw html for CSUI componentsI have opened this issue some time ago. https://github.com/PlasmoHQ/plasmo/issues/789 I need to knoCannot read properties of undefinedThis is the base tutorial, plasmo dev fails with "Cannot Read properties of undefined (reading 'inde`Firefox can’t establish a connection to the server at wss://localhost:1815/.`while development, it keeps spamming this and closes my pages while im watching console, which is anCommunicate Between 2 Content ScriptsHi, is it possible to communicate between 2 content scripts? I have been looking at the documentatioExample of extending Plasmo to use another library?I'm looking for to use Plasmo with Elm, parcel has native support for elm and I'm looking for some gSvelte CSUI behaving unexpectedlyThe CSUI contains both `<script lang="ts">` and `<script lang="ts" context="module">` Suppose I haveHow do I retrieve data with Plasmo storage apiI have the following code in a JSX component ``` const [selectedDeck, setSelectedDeck] = useStoragIs there any method to specify when to run content scripts?I have a content script widget with max z-index, but still it is not at the top all the time. For soGetting issues with Content Security PolicyHey, I am getting issues when trying to test the extension in device mode (iPhone) on Chrome. I am uAutofill a Form using PlasmoI am very new on building extension. I want to build an extension that auto fill a specific form wheEmail VerificationHello, We've recently starting building with Plasmo and have created an account via the web-app. ThIncluding remotely hosted code in a Manifest V3 item.Hello @louis I've created a web extension using plasmo. And after successfully completing the extens