I don't see your code, but judging by the error you're still
trying to access the contents of iframe from outside, which won't
work. The point of "all_frames": true is to have a
separate instance of the content script running inside the iframe,
so it can access its document directly.
in my case not working
Assuming you reloaded the extension in chrome://extensions page and reloaded the tab, the problem is in your other code and you'll have to debug it. Use devtools to set breakpoints and see what happens when the message arrives. Note that it will trigger more than one time because each instance of the content script receives a message. You can tell the difference by checking (window === top)
still problem is not solved provide me correct solution