开发 二月 20, 2019

Js Console报错排查及解决方案

文章字数 2.3k 阅读约需 2 mins. 阅读次数 0

# 前言 开发过程中有时经常看到一个报错,脑海中浮现出曾经遇到过这样的错误,并也经历过解决方案,但是突然就说想不起来之前是怎么解决的,所以这里记录日常开发中Chrome浏览器Console报错排查及解决方案&思路

Console报错:Unchecked runtime.lastError: The message port closed before a response was received.

中文翻译:不受控制的运行时。lastError:消息端口在接收到响应之前关闭。

原因:this does not look like a Caddy error. (Caddy errors would not be rendered client-side.) 是一个浏览器扩展问题,或者是由于您的页面上加载了一些JS。这里没有任何东西指向凯蒂的问题。参考链接

If that is not solving your issue. You could try disabling all the chrome extensions and check if that solve your issue.
To disable you could type the below code in chrome url:
chrome://extensions/
or could go on
Settings > Extensions
After that you could enable each extensions and check the culprit.

解决方案:检查你浏览器安装的扩展程序,一个个关闭扩展程序看看是那个扩展程序影响的。

0%