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

Unsupported send() data function Writer() #51

Open
mathiskeeper opened this issue Nov 16, 2022 · 1 comment
Open

Unsupported send() data function Writer() #51

mathiskeeper opened this issue Nov 16, 2022 · 1 comment

Comments

@mathiskeeper
Copy link

mathiskeeper commented Nov 16, 2022

Hello, Currently when building a POST request im getting the below error when attempting to send the payload. After debugging i see if fails during this check :

else if (data.buffer && data.buffer instanceof ArrayBuffer) {
// ArrayBufferView
body = Buffer.alloc(data.byteLength);
offset = data.byteOffset;
view = new Uint8Array(data.buffer);
for (i = k = 0, ref1 = data.byteLength; (0 <= ref1 ? k < ref1 : k > ref1); i = 0 <= ref1 ? ++k : --k) {
body[i] = view[i + offset];
}
this._body = body;

then the following exception occurs

Unsupported send() data function Writer() {
/**
* Current length.
* @type {number}
/
this.len = 0;
/
*
* Operations head.
* @type {Object}
/
this.head = new Op(noop, 0, 0);
/
*
* Operations tail
* @type {Object}
/
this.tail = this.head;
/
*
* Linked forked states.
* @type {Object|null}
*/
this.states = null;

Any idea on what I would need to check or change ?

@geco
Copy link

geco commented Jan 13, 2023

I've the same problem, doing a simple Axios Post with an attached file, using package form-data.
Code is not changed from working version.
Unsupported send() data [object FormData]
at XMLHttpRequestUpload._setData (node_modules/xhr2/lib/xhr2.js:1196:15)
at XMLHttpRequest._sendHttp (node_modules/xhr2/lib/xhr2.js:458:21)
at XMLHttpRequest.send (node_modules/xhr2/lib/xhr2.js:278:18)
at dispatchXhrRequest (node_modules/axios/dist/node/axios.cjs:3160:13)

Can you help me please?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants