I built a React based Chrome extension, I want to do an AJAX call to my server from the extension.
So I'm using chrome.runtime.sendMessage and chrome.runtime.onMessage.addListener.
I took the simplest example from Chrome Message Passing , but I'm getting the following error:
Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
I tried disabling all other Chrome extensions but that didn't help.
I'm quite confident it has to do with webpack and scoping but I couldn't figure it out.