-
Notifications
You must be signed in to change notification settings - Fork 79
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
[binding-coap] node-aead-crypto package not being installed for node 10+ leads to problems #136
Comments
There have been issues in the past around We do not depend on Hence, I am not sure what is the best solution. There is a later version for |
I don't think the latest version of |
Sorry to intrude, updating to latest version of
Anyway, @danielpeintner it would be awesome if you and WoT Working Group could get in contact with Nodejs devs and ask them to implement DTLS. DTLS discussion started in 2015 but unfortunately didn't produce any results. Without proper DTLS support it will be difficult have secure CoAP clients. |
Thanks for the hint, but I think the changelog refers to the fact, that they changed the |
I updated Let's give it a try.
Anyone can open an issue on their side/repo or work on a PR. Feel free to go ahead! |
With |
Well, at least we tried 🙂
Been there, done that... but didn't get any positive response. I though that maybe WoT WG's authority could move things forward.... Anyway, it was just an idea. |
I don't think there is anything we can do right now. |
The implementation where we faced this issue is now open source: https://github.com/tum-esi/wade and the problem still persists... |
For a future brave soul who stumbles upon this, a workaround is to add a postinstall script that comments out some lines in the dtls package. You can see an example at https://github.com/tum-esi/wade/blob/master/postinstall.js and also below in case the script moves somewhere else: fs = require("fs");
const PATH_AEAD = "./node_modules/node-dtls-client/build/lib/AEADCrypto.js"
// Commenting out line in node-dtls-client
let lines = [""];
try {
lines = fs.readFileSync(PATH_AEAD).toString().split("\n");
console.log("Read file " + PATH_AEAD + " successfully");
} catch (err) {
console.error(err);
return
}
for(let i=51; i<55; i++){
if(!lines[i].startsWith("// ")) lines[i] = "// " + lines[i];
}
let text = lines.join("\n");
fs.writeFile(PATH_AEAD, text, function (err) {
if (err) return console.log(err)
else console.log("Written to file " + PATH_AEAD + " successfully");
}); Probably, the issue should be left open since the root of the problem is still there. We think this shows up when a bundler like webpack tries to resolve dependencies and thinks this is needed and installs it. |
@egekorkan do you know whether this is still an issue or has been fixed by now? We use |
I can test it properly once it is published on npm :) |
Old issue w.r.t. Node.js v10 which is no longer supported -> closing |
Setup
Doing
npm install
npm run electron:build
(calls vue-dev tool script that launches the electron-builder in production mode)OR
npm install
npm run electron:serve
(same as above, but in development mode)Problem
The build fails with the Error Message:
Notes
npm install
the output appears:...
...
npm ls node-aead-crypto
:Workaround
A quick fix is force installing the crypto package, adding it to the own package doesn't do the trick, because npm will then throw an error at
npm install
as your own package requires an package that should not be needed anymore. Sonpm install -f node-aead-crypto
helps. (and removing node-aead-crypto from your own package list if you commit your package.json)The text was updated successfully, but these errors were encountered: