In my popup.html, I have this
<script src="popup.js"></script>
so then in my popup.js I try to run
chrome.storage.sync.set({"testkey": 'test'});
I got error of Uncaught TypeError: Cannot read property 'sync' of undefined
I'd declare my permission properly :
"permissions": [
"http://*/*", "https://*/*","storage"
],
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
}