NetworkError: Failed to execute 'send' on 'XMLHttpRequest' with Chrome Browser - Ext JS

NetworkError: Failed to execute 'send' on 'XMLHttpRequest' with Chrome Browser - Ext JS

我在通过 Chrome 浏览器退出应用程序时遇到错误。

Chrome 浏览器版本 86.0

Blocked alert('Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://host-name/web/base/logout?id=40dee37f-cf1d-40f9-b01d-2a414d446a77&tenant=ABC&isFrameMode=true&_dc=1602665141328': Synchronous XHR in page dismissal. See https://www.chromestatus.com/feature/4664843055398912 for more details.. line: 1. url: https://hostname/web/base/abc/app.js?_dc=20161213063112') during unload.

用于从应用程序注销的代码:

var vRequest = { url: vUrl, async: false },
Ext.Ajax.request(vRequest);

已尝试将异步属性值从 false 更改为 true,但现在请求状态在开发人员工具中显示为已取消。

问题不在于 ajax 调用。问题是,根据您收到的错误,调用是在不再允许的事件期间发生的,beforeunload、unload、pagehide、visibilitychange...等等

Here are some alternate ways to return data to the server on logout.