如何处理页面加载时发生的reactjs错误?

voase2hg  于 2023-03-17  发布在  React
关注(0)|答案(6)|浏览(238)

在启动js react应用程序时,我遇到了以下错误:

commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE isLogsEnabled null
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE options getValues
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
update @ commons.js:2
C @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE options getValues
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
update @ commons.js:2
ve.onUpdate.e.<computed>.O @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE contextMenu createContextMenu
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
send @ commons.js:2
setContextMenuItem @ commons.js:2
enable @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE tabClipper initCompleted
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE options getValue
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Channel: Error in handleResponse UNK/SW_UNREACHABLE options getValue
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.then (async)
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.then (async)
update @ commons.js:2
C @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.then (async)
update @ commons.js:2
ve.onUpdate.e.<computed>.O @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
send @ commons.js:2
setContextMenuItem @ commons.js:2
enable @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.catch (async)
_sendMessageToExtension @ commons.js:2
sendToExtension @ commons.js:2
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.then (async)
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1
commons.js:2 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
fromGeneric @ commons.js:2
fromAny @ commons.js:2
_handleResponsePromise @ commons.js:2
(anonymous) @ commons.js:2
Promise.then (async)
Le @ commons.js:2
168 @ commons.js:2
l @ content.js:1
(anonymous) @ content.js:1
l.O @ content.js:1
(anonymous) @ content.js:1
(anonymous) @ content.js:1

我已经注解了我所有的组件,但错误仍然发生。它发生在页面加载时,我不需要做任何事情,它会在每次刷新网页后显示几秒钟。有什么想法吗?

0g0grzrc

0g0grzrc1#

我今天在一个特定的页面上遇到了同样的问题。对我来说,这个问题是谷歌浏览器的一个名为“Evernote”的附加组件。如果你也有这个问题,试着删除它!

dtcbnfnu

dtcbnfnu2#

我在Mac上的Edge也遇到了同样的问题。解决方案:
仅在单击时启用(在扩展可用之前重新加载页面):

2mbi3lxu

2mbi3lxu3#

DraconiaN BG的上述解决方案对我也很有效(即禁用Evernote网页裁剪器扩展)。有人知道原因吗?我使用Evernote裁剪器这么久了,这是我第一次遇到这样的问题?我会测试更多的例子,如果我发现什么,我会写在这里。
我使用的是Chrome浏览器。版本111.0.5563.64(官方版本)(x86_64)

sg3maiej

sg3maiej4#

你用的是什么浏览器?今天更新后,我在最新版本的Vivaldi浏览器上遇到了同样的问题。我在最新版本的Chrome浏览器上没有遇到这个问题(版本111.0.5563.64(官方版本)(arm 64))。禁用扩展功能有帮助(Evernote就是其中之一)。
在这两种浏览器中,它都帮助强制扩展更新。在那之后,即使重新激活我的扩展,你帖子中描述的日志也消失了。
您可以通过打开扩展选项卡(Vivaldi:菜单“工具/扩展”,Chrome浏览器:“窗口/扩展”),然后用右上角的开关激活“开发者模式”。一些按钮出现,“更新”在其中。单击它,扩展就会更新。
Update Button

zmeyuzjn

zmeyuzjn5#

我今天在一个特定的页面上遇到了同样的问题。对我来说,这个问题是谷歌浏览器的一个名为“Evernote”的附加组件。如果你也有这个问题,试着删除它!
→我可以修复这个错误来做到这一点。谢谢!

6qfn3psc

6qfn3psc6#

对我来说,这个问题确实与Evernote Web Clipper有关。一个比简单地允许扩展在点击时读取网站数据更持久的选择是尝试将www.evernote.com列入广告拦截器(如果使用的话)。我也在运行uBlock Origin扩展,一旦将Evernote列入白名单,错误就停止了。这可能是最近两个扩展之间引入的冲突。

相关问题