Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript chrome不允许我使用会话方法?_Javascript_Google Chrome_Session - Fatal编程技术网

Javascript chrome不允许我使用会话方法?

Javascript chrome不允许我使用会话方法?,javascript,google-chrome,session,Javascript,Google Chrome,Session,我试图在扩展的扩展中显示最近的选项卡 当我尝试运行此代码时 chrome.sessions.getDevices(function(data) { console.log(data);}); 我得到这个错误 TypeError: Cannot read property 'getDevices' of undefined 我已经给了manifest.json会话权限,无法理解为什么它会给我这个权限。我必须清除我的chrome缓存才能重新加载权限吗?嗨,我已经检查了这个问题,我已经添加了权限,

我试图在扩展的扩展中显示最近的选项卡

当我尝试运行此代码时

chrome.sessions.getDevices(function(data) { console.log(data);});
我得到这个错误

TypeError: Cannot read property 'getDevices' of undefined

我已经给了manifest.json会话权限,无法理解为什么它会给我这个权限。我必须清除我的chrome缓存才能重新加载权限吗?

嗨,我已经检查了这个问题,我已经添加了权限,检查了我的google chrome版本,我正在正确的上下文中编写脚本,我仍然会生成这个error@KyleCasey你找到那辆车了吗solution@ManiKandanSelvanathan已经很久了,但我记得我需要本地缓存权限或类似的权限,我必须完全删除我的插件并将其添加到chrome中,这样chrome才会提示我为插件提供正确的权限