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
ReferenceError: val is not defined #39
Comments
I can't answer for @amilajack, so the best way to learn here is probably to try it out. It's probably pretty straightforward to do. |
Sorry for the late response. I might have not seen the notification. I reverted all the changes I made: https://github.com/thibauts/node-castv2/pull/31/files So nothing should be broken (at least by my changes), since the update practically never occurred. @dcposch updating protobuf is risky because testing it is very difficult. You need every kind of chromecast device (to be safe) |
It would still be nice to upgrade protobufjs. So if someone wants to give a try, I'll merge the changes. |
@thibauts, but we need a formal way of testing. Without that, I think updating deps is risky. Maybe we can write a script that runs node-cast against a local network and the tester will manually have to check if the content is streamed to the device. (Doesn't seem like a very elegant testing method but it guess it kind of works). The script should be run by multiple testers on multiple devices to increase the guarantee that it will work as expected. |
Unless I'm mistaken, the newest version of Testing on one device should do the trick. If the module passes authentication and is able to get a status update, every possible packet formats will have been read / written on the wire... |
The API of the newest protobufjs version is not backwards compatible. We need to update the code of this module to reflect the new API changes.
Is it possible to do this kind of testing on a VM so we can run tests on Travis CI or appveyor? |
I just looked up the API, it seems pretty much backwards compatible. Can you show me what breaks exactly when run ? |
Regarding testing, you could build a bare bones server with the included Server class to test against. Look here https://github.com/thibauts/node-castv2/blob/master/lib/server.js If the issue is related to a protocol upgrade on some Chromecasts you'll miss it though. So Travis CI may not be the answer here. |
Closing for inactivity |
A moderate vulnerability has been discovered in versions of From reading past discussion on this, it seems that the older version was kept due to lack of ability to test across all Chromecast devices, correct? I would be willing to work on evaluating how viable it is to update the dependency if you wouldn't mind enumerating the test that would be necessary to proceed. |
Alright, I'm back a few months later armed with a better understanding of protobufs. I've upgraded the version and accounted for breaking changes in EDIT: Pull request is here if anyone would like to review. |
Currently,
node-castv2
depends on an old version ofprotobufjs
(3.x instead of the latest 5.x), which depends on an old version ofbytebuffer
, which has the following error:I saw
ReferenceError: val is not defined
in our telemetry for WebTorrent Desktop.That's weird, I thought-- reference errors are almost like syntax errors, they can be caught with a linter and should never happen at runtime.
So I ran
standard
on our wholenode_modules
folder, which crunched for a few minutes and then found the error above.I think the easiest way to fix it is for
node-castv2
to upgrade to the latestprotobufjs
.The text was updated successfully, but these errors were encountered: