Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.12.0 错误请求导致CPU暴增页面卡死 #515

Closed
xuqianjin opened this issue Mar 9, 2022 · 7 comments
Closed

v3.12.0 错误请求导致CPU暴增页面卡死 #515

xuqianjin opened this issue Mar 9, 2022 · 7 comments
Labels

Comments

@xuqianjin
Copy link

vConsole Version:v3.12.0以上
使用axios发送请求..只要请求出现任意错误..CPU直接跑满
复现步骤:

<button onClick={() => { axios.get('http://baidu.com'); }}>
        点击
</button>

image

@Maizify
Copy link
Collaborator

Maizify commented Mar 14, 2022

axios版本呢?
另外vConsole和Axios的引入先后顺序是怎样的呢?

@Maizify Maizify added the Details wanted Need more details label Mar 14, 2022
@xuqianjin
Copy link
Author

xuqianjin commented Mar 21, 2022

axios版本呢? 另外vConsole和Axios的引入先后顺序是怎样的呢?

vconsole : 3.12.1
axios : 0.21.4

先通过script 标签在html头部引入vConsole,并且执行new window.VConsole()
然后引入经过打包的项目js(里面包含了axios)

@Maizify
Copy link
Collaborator

Maizify commented Mar 23, 2022

试一下3.14.0?这版重写了XMLHttpRequest的注入逻辑,看看是否还存在跟Axios的冲突。

@pocketChao
Copy link

遇到了同样的问题,返回的数据200多K 5000多条数据 直接卡死 cpu瞬间满了 js堆也好打 好久才会恢复

@Maizify
Copy link
Collaborator

Maizify commented Mar 29, 2022

遇到了同样的问题,返回的数据200多K 5000多条数据 直接卡死 cpu瞬间满了 js堆也好打 好久才会恢复

@pocketChao 如何复现呢?是瞬间返回5000个XHR吗?

@Maizify
Copy link
Collaborator

Maizify commented Mar 29, 2022

已经查明问题,是字符串处理有问题。

@Maizify Maizify added Done and removed Details wanted Need more details labels Mar 29, 2022
@Maizify
Copy link
Collaborator

Maizify commented Mar 31, 2022

已在v3.14.4中修复。

@Maizify Maizify closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants