Solved: Cannot read property 'executeScript' of undefined
So you are trying to use the new chrome.scripting.executeScript API, but chrome.scripting is undefined. It is undefined due to the new more granular permissions system in Chrome extension manifest v3 version. You are missing a permission. Continue reading...