Can't connect to content script on first load of extension.

Hey guys when I first open my extension, I get the following error in chrome: "Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist." If i reopen the same window or open a new window, I don't get this error. Any help would be appreciated. Thanks
1 Reply
Hassaan
Hassaan•12mo ago
I solved it but the solution is a bit of a hack. To inject the content script I reload all of the open tabs with the chrome api which solves this problem.
Want results from more Discord servers?
Add your server