sidorares / node-rfb2

rfb wire protocol client and server
MIT License
139 stars 27 forks source link

requestUpdate throws TypeError: undefined #4

Open ChrisEineke opened 10 years ago

ChrisEineke commented 10 years ago

requestUpdate throws a TypeError due to undefined:

.../rfb2/rfbclient.js:446 tile.foregroundColor.copy(tile.buffer, offset); ^ TypeError: Cannot call method 'copy' of undefined

I noticed that foregroundColor was misspelled ("foreroundColor", missing a 'g'). I fixed the naming, but that didn't solve it.

sidorares commented 10 years ago

could you make PR? Also, this indicates you have hextile encoding in your list of accepted encodings. It's implementation is still very buggy, I suggest to specify explicitly with encodings parameter:

var r = rfb.createConnection({
  host: '127.0.0.1',
  port: 5900,
  password: 'secret',
  encodings: [rfb.encodings.raw, rfb.encodings.copyRect]
});
ChrisEineke commented 10 years ago

I made a pull request for the misspelled 'foreround' property. After fixing that though, overriding the encodings still throws the same error.

sidorares commented 10 years ago

Thanks! I'm not sure what else I can do here - if you don't have sensitive data maybe you post tshark/wireshark session dumps with working client and with rfb2?