Skip to content
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.

List argument must be an Array of Buffers #10

Closed
SevereOverfl0w opened this issue Feb 15, 2016 · 16 comments
Closed

List argument must be an Array of Buffers #10

SevereOverfl0w opened this issue Feb 15, 2016 · 16 comments

Comments

@SevereOverfl0w
Copy link

When trying to :UpdateRemotePlugins node-host has started failing for js, I see this in my .nvimlog:

2016/02/15 12:29:49 [info @ main:523] 19017 - Starting Neovim main loop.
2016/02/15 12:29:52 [error @ forward_stderr:333] 19017 - Channel 3 stderr: events.js:154
      throw er; // Unhandled 'error' event
      ^

TypeError: list argument must be an Array of Buffers
    at Function.Buffer.concat (buffer.js:229:13)
    at BufferList.copy (/home/dominic/.config/nvim/plugged/node-host/node_modules/bl/bl
2016/02/15 12:29:52 [error @ forward_stderr:333] 19017 - Channel 3 stderr: .js:118:21)
    at BufferList.slice (/home/dominic/.config/nvim/plugged/node-host/node_modules/bl/bl.js:93:15)
    at Object.encode (/home/dominic/.config/nvim/plugged/node-host/node_modules/msgpack5/index.js:188:18)
    at Encoder._transform (/home/domin
2016/02/15 12:29:52 [error @ forward_stderr:333] 19017 - Channel 3 stderr: ic/.config/nvim/plugged/node-host/node_modules/msgpack5/lib/streams.js:37:25)
    at Encoder.Transform._read (/home/dominic/.config/nvim/plugged/node-host/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Encoder.Transform._write (/home
2016/02/15 12:29:52 [error @ forward_stderr:333] 19017 - Channel 3 stderr: /dominic/.config/nvim/plugged/node-host/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/dominic/.config/nvim/plugged/node-host/node_modules/readable-stream/lib/_stream_writable.js:279:12)
    at writeOrBuffer (/home/dom
2016/02/15 12:29:52 [error @ forward_stderr:333] 19017 - Channel 3 stderr: inic/.config/nvim/plugged/node-host/node_modules/readable-stream/lib/_stream_writable.js:266:5)
    at Encoder.Writable.write (/home/dominic/.config/nvim/plugged/node-host/node_modules/readable-stream/lib/_stream_writable.js:211:11)
@bigfish
Copy link

bigfish commented Feb 19, 2016

I'm seeing this as well ... Just pulled from head and built on Ubuntu.

nvim-log

@nhynes
Copy link
Contributor

nhynes commented Feb 19, 2016

Huh, I'm not getting this issue on the most recent [dev] build of neovim. Perhaps if you have time you could try installing from neovim HEAD? Otherwise my question is whether you have any node rplugins. The API for node-host recently changed in a very backwards-incompatible way.

@SevereOverfl0w
Copy link
Author

I use nvim-refactor.js, but that is a recent plugin, and I believe using the latest api

I'll try updating my neovim.

Before update, nvim --version output:

NVIM v0.1.2-398-g8f22031
Build type: Dev

Post update, output:

NVIM v0.1.3-138-g00347ec
Build type: Dev

Still unable to run.

@bigfish
Copy link

bigfish commented Feb 19, 2016

Hmm, what was the API change to node-host? I'm the author of a nvim plugin using node-host, so it may be that my plugin is broken because of this change...

@snoe
Copy link
Contributor

snoe commented Feb 19, 2016

@nhynes I think I narrowed this down to a change between node 5.0.0 and 5.6.0 - 5.0 works and 5.6 gives this error.

@snoe
Copy link
Contributor

snoe commented Feb 19, 2016

@bigfish I believe this ce637f5 is the api change commit - *Sync handlers now take a callback. #5

@bigfish
Copy link

bigfish commented Feb 19, 2016

It's working for me on node 5.4.1.. on mac at least.

I'm not using any *Sync calls, so I don't think that can be the cause. Also, the plugin is working with newest node-host, so I don't think it can be that.

@SevereOverfl0w
Copy link
Author

Arch Linux node versions 5.5 and 5.6 do not work for me. It's possible 5.4 introduced the issues, but I was using this with 5.5 not long ago (I believe, I don't have 5.4 in my package cache).

@bigfish
Copy link

bigfish commented Feb 22, 2016

This looks like the node commit that breaks it
nodejs/node@58d67e26a2

looks like the bl module in breaking because of it. which is part of Neovim itself.
Not sure if this is relevant.. rvagg/bl#13

so more of a Neovim issue than nodehost one? Perhaps an issue should be filed there instead.

@SevereOverfl0w
Copy link
Author

Yeah, that issue is definitely relevant. That check that was introduced into the node code is incompatible with bl. It's a major flaw in bl that it doesn't work.

Now that node are checking types more seriously, it's stopped bl from working in that function.

The issue is downstream. It's possibly fixed in the latest version of msgpack, but msgpack5rpc is using an outdated version. I feel some pressure may need applying to @tarruda to make this happen. https://github.com/tarruda/node-msgpack5rpc

@SevereOverfl0w
Copy link
Author

I've made a few PRs, and made a few forks, you can fix this locally if you're in a pickle like I was:

cd ~/.config/nvim/plugged/node-host
rm -rf node_modules
npm i -S https://github.com/SevereOverfl0w/node-client.git
npm install

In writing: Go to node-host, rm your node_modules directory (clean the old and bad cached modules), switch to my node-client fork temporarily, and then install all your modules.

Disclaimer: When node-host is fixed, to update you will need to do this:

git checkout -- package.json

before updating.

@SevereOverfl0w
Copy link
Author

Latest version of node-client is published, updating the version will fix this issue.

@bigfish
Copy link

bigfish commented Feb 25, 2016

yes, updating to latest node-client works for me, too. Thanks, @SevereOverfl0w !
But, we still need to get @nhynes to update
"neovim-client": "^1.0.7" -->
"neovim-client": "^1.0.8"
before the issue can really be closed.

@nhynes
Copy link
Contributor

nhynes commented Feb 25, 2016

Yep, sorry for the delay. I'm scheduled to do node-* stuff this afternoon.

@SevereOverfl0w
Copy link
Author

🎈 No worries, thank you for helping us track this down and resolve it.

@nhynes
Copy link
Contributor

nhynes commented Feb 26, 2016

Done. Thanks again for finding and fixing the bug!

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

No branches or pull requests

4 participants