apache / skywalking

APM, Application Performance Monitoring System
https://skywalking.apache.org/
Apache License 2.0
23.91k stars 6.53k forks source link

[Bug][skywalking-client-js]broke when I request a cross domain request (arraybuffer) #12759

Closed Mikey-Lucky closed 2 weeks ago

Mikey-Lucky commented 2 weeks ago

Search before asking

Apache SkyWalking Component

NodeJS Client Side Agent (apache/skywalking-client-js)

What happened

When I request a cross domain request,the console display that "Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer')".The stack display the error is generated by ”Ajax Error Collection“.

What you expected to happen

index.js:1 Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer'). at eval (index.js:1:6619) at XMLHttpRequest.f (index.js:1:22756) at XMLHttpRequest.eval (index.js:1:20573)

How to reproduce

let xhr= new XMLHttpRequest(); xhr.open('GET','...',true);// blocked by CORS xhr.responseType = 'arraybuffer'; xhr.send();

Anything else

No response

Are you willing to submit a pull request to fix on your own?

Code of Conduct