// quasar background-hook.js
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
if (request.accessToken !== '') {
chrome.storage.local.set({ accessToken: request.accessToken }, () => {
sendResponse({ farewell: 'success' })
})
}
// Fix, Unchecked runtime.lastError: The message port closed before a response was received.
return true
})

Refer:chrome.runtime.onMessage

Refer:https://stackoverflow.com/questions/54126343/how-to-fix-unchecked-runtime-lasterror-the-message-port-closed-before-a-respon

Link:https://www.cnblogs.com/farwish/p/12236444.html

[FAQ] chrome.runtime.onMessage 问题, Unchecked runtime.lastError: The message port closed before a response was received的更多相关文章

  1. Chrome 控制台报错Unchecked runtime.lastError: The message port closed before a response was received

    Chrome浏览器控制台报错提示 Unchecked runtime.lastError: The message port closed before a response was received ...

  2. Chrome报错提示Unchecked runtime.lastError: The message port closed before a response was received.

    经过查询,此错误是Chrome扩展插件引起的.由于Chrome修改了API接口,原来的请求被拦截.(Chrome 73 onwards disallows cross-origin requests ...

  3. Unchecked runtime.lastError: The message port closed before a response was received.

    这是由于某个 Chrome 扩展程序造成的. 打开 chrome://extensions/,逐一关闭排查.我这边是由于“迅雷下载支持”这个扩展引起的,将其关闭即可.

  4. 谷歌浏览器报错Unchecked runtime.lastError: The message port closed before a response was received.。

    浏览器版本 : 报错原因:扩展程序问题 解决建议:打开chrome://extensions/,逐一关闭排查

  5. 谷歌浏览器控制台出现 Unchecked runtime.lastError: The message port closed before a response was received. 的报错

    错误截图: 解决:经过网上搜索说是浏览器扩展程序的问题,把那个扩展程序删除或者禁用就可以了

  6. Chrome Is The New C Runtime

    出处:https://www.mobilespan.com/content/chrome-is-the-new-c-runtime Chrome Is The New C Runtime Date:  ...

  7. 重写成员“log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)”时违反了继承安全性规则

    在.NET 4.0下使用最新版本的log4Net 1.2.10,会遇到下面这样的错误: 重写成员“log4net.Util.ReadOnlyPropertiesDictionary.GetObject ...

  8. iOS runtime探究(二): 从runtime開始深入理解OC消息转发机制

    你要知道的runtime都在这里 转载请注明出处 http://blog.csdn.net/u014205968/article/details/67639289 本文主要解说runtime相关知识, ...

  9. golang程序编译时提示“package runtime: unrecognized import path "runtime" (import path does not begin with hostname)”

    在编译golang的工程时提示错误的, 提示的错误信息如下: package bytes: unrecognized import path "bytes" (import pat ...

  10. iOS-浅谈runtime运行时机制-runtime简单使用(转)

    转自http://www.cnblogs.com/guoxiao/p/3583432.html 由于OC是运行时语言,只有在程序运行时,才会去确定对象的类型,并调用类与对象相应的方法.利用runtim ...

随机推荐

  1. Python实践:基于Matplotlib实现某产品全年销量数据可视化

    本文分享自华为云社区<画图实战-Python实现某产品全年销量数据多种样式可视化>,作者:虫无涯. 学习心得 有时候我们需要对某些数据进行分析,得到一些可视化效果图,而这些效果图可以直观展 ...

  2. AsyncTask异步任务类

    目录介绍 01.先看下AsyncTask用法 02.AsyncTask源码深入分析 2.1 构造方法源码分析 2.2 看execute(Params... params)方法 2.3 mWorker和 ...

  3. 记录--源码视角,Vue3为什么推荐使用ref而不是reactive

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 ref 和 reactive 是 Vue3 中实现响应式数据的核心 API.ref 用于包装基本数据类型,而 reactive 用于处理对 ...

  4. Avalonia项目生成银河麒麟操作系统安装包

    1 在项目根目录添加xxx.desktop文件,文件内容: [Desktop Entry] Name=xxx Type=Application Exec=/usr/share/xxx/xxx Icon ...

  5. Oracle NLSSORT 拼音排序 笔画排序 部首排序

    create table test(name varchar2(20)); insert into test values('中国'); insert into test values('美国'); ...

  6. 自建AXI4的IP核的地址问题

    自建AXI4的IP核的地址问题 1.问题概述 在AXI4中,对应的操作通过对对应的寄存器设置来完成.其中的寄存器又分为数据寄存器和地址寄存器.其中,如果只是想要操作数据的话,只需要使用数据寄存器即可. ...

  7. sys_spacequota 扩展插件介绍

    插件sys_spacequota简介 sys_spacequota可以对指定表空间的大小进行限额,一旦大于该限额,例如对此表空间里的数据进行insert, update, copy to, selec ...

  8. 探索Django REST框架构建强大的API

    本文分享自华为云社区<探索Django REST框架构建强大的API>,作者:柠檬味拥抱. 在当今的Web开发中,构建强大的API已经成为了不可或缺的一部分.而在Python领域,Djan ...

  9. #线性dp#洛谷 5999 [CEOI2016]kangaroo

    题目 问有多少个长度为 \(n\) 的排列满足首项为 \(st\),末项为 \(ed\), 并且 \(\forall i\in (1,n),\left[a_{i-1}<a_i \oplus a_ ...

  10. #特殊判断#牛客练习赛71 A 回文数

    题目 分析 首先出现奇数次的数超过1显然无解 并且只有多个0或者只有一个非0数字并且其它都是0也无解 然后由于没有前导0所以先要找到最小的非0数,先占据首尾 最后按照常规方法前一半从左到右依次递增 注 ...