I\'ve already read the documentation from Google on \'message passing\' a few times and have probably looked at over 10 other questions with the same problem and already tri
Careful reading of this answer may help you. Every point there applies to your problem.
Your problem is in when your main script is executing, and when your content scripts are. You need to ensure there is a content script listening before you send a message to it, in worst case injecting it programmatically.
And to get it working in a popup, follow KAdot's answer.