[nodebb-plugin-camo] Make embedded images look secure!
-
@Bri I'm running as a regular user.
I've not been able to find anything useful yet based on that error.
I pushed another update that cleans up some things, maybe it will give us some more info.
My node version is v0.10.25
-
Have you by chance tried re-installing the plugin? It installs camo from github, which can sometimes cause issues.
Edit: Also, I just noticed, this plugin doesn't consider that you may have camo installed globally, which may cause that error.
-
@yariplus I definitely haven't installed it globally. I can try and reinstall. I'm also wondering if the key has something to do with it? You were saying that if the internal proxy was selected, then you wouldn't need to specify a key? Looking at the code here, it's still trying to grab a key from the settings module.
So now the error looks the same, slightly different:
21/4 21:36 [19483] - info: [Camo]: Starting Camo worker... 21/4 21:36 [19483] - error: Error: spawn node ENOENT at exports._errnoException (util.js:870:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:437:9) at process._tickCallback (node.js:351:17) Error: spawn node ENOENT at exports._errnoException (util.js:870:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:437:9) at process._tickCallback (node.js:351:17)
EDIT: Also, the new version (1.2.2) crashes nodebb, where 1.2.1 fails, but nodebb stays up
-
And if I go to node v0.10.25,
npm rebuild
andnpm i
:21/4 22:23 [24989] - error: [CamoProxy]: events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:988:11) at Process.ChildProcess._handle.onexit (child_process.js:779:34)
I tried deleting the entire node_modules folder under nodebb, and reinstalling under node v0.10.25, and then manually installing [email protected]. Still getting that error
What env are you running on? Did you have to install anything special (like node-gyp or ...? )
-
Here's some more information: I can actually get it running this way, if I set the plugin to use an external camo instance, and then run camo (the one in your plugin as a dependency) like this:
~/NodeBB/node_modules/nodebb-plugin-camo/node_modules/camo$ /usr/bin/env PORT=8082 CAMO_KEY="<key generated by your plugin>" node server.js
-
Perfect! I figured it was something like that. Odd though.
-
Yeah, curious how it was working for you... I'm using nvm to manage node versions on my server, so it makes sense that the path to node would be different and require the right path in the PATH variable
-
Everything looks good! I deployed it to my prod server and am seeing messages in the logs from the camo server
-
I pushed a small update that should make clustered setups work properly without needing a restart.
I also updated the source to use es2015, if anyone is interested in that.
-
@julian nope, it is being compiled down to ES5 with babeljs IIRC
EDIT: Yes, it indeed is: https://github.com/minora-oss/nodebb-plugin-camo/blob/master/package.json#L50-L60
-
Yep yep. The distributed code on NPM is babeled down. Works with node >=0.10.0
-
@lenovouser said in [nodebb-plugin-camo] Make embedded images look secure!:
@teh_g Yep, should still work and there is also the option that you don't have to set up camo manually thanks to @yariplus
Hmm, I will have to try this out. I was hoping to run camo and iframely on another box, but the documentation for doing that is terrible. This will at least make camo easier