Hello all!
I’m a bit flustered. I inherited an environment that use janus in conjunction with duktape + javascript plugin, and the previous maintainer can’t provide me help. I’ve been tasked with updating the codebase since we are starting to see some instability. For now, I’m trying to upgrade to version 0.13.3
I manage to build the service and start it, but I get a few errors popping up in the log :
The context
Version running : 0.11.6
Target version : 0.13.3
OS : Ubuntu 22.04 / Ubuntu 20.04. Willing to change the version to a specific one if there’s any issues.
We build our janus machines on Ubuntu VMs on the cloud.
We first build a docker file for a base build, and then use an install script to pull the repo with the useful scripts and the base build.
We run this command
docker run --rm -v "/janus-update/janus-gateway":"/src" -v "/opt/janus":"/opt/janus" -v "/usr":"/hostusr" -w "/src" --name="janus-base-build" <image tag> /bin/bash -c "sh ./Scripts/build.sh"
And lastly, we start + enable janus-gateway
The problems
First error showing up :
vroom.js Module loaded
[ERR] [plugins/janus_vroom.c:janus_vroom_init:1733] Error loading JS script /opt/janus/share/janus/vroom/vroom.js: SyntaxError: unterminated statement (line 414, end of input) (at
[WARN] The 'janus.plugin.vroom' plugin could not be initialized
Thing I don’t totally get : the file vroom.js stops at line 339, so checking what is at line 414 is only possible for my 5th dimension homologue.
My best guess is that the evaluation done in C with duktape changes the files during initialization. I’ve made sure that all lines were correctly terminated with semicolumns (some weren’t). Still, after I rebuilt the service, it still gives me the same error. Anyone else found themselves facing this specific problem?
Second error
Might be due to the first, might not :
Loading plugin 'libjanus_duktape.so'...
[ERR] [janus.c:main:5495] Couldn't load plugin 'libjanus_duktape.so': /opt/janus/lib/janus/plugins/libjanus_duktape.so: undefined symbol: duk_eval_raw
This one seems to be a file built during the installation script, and I don’t have a file with an identical name. The closest I have is janus_duktape.c
, which is in the /plugin/ folder. However, there are no direct calls to duk_eval_raw
in the file ; it is defined in duktape.c
, and used in duktape.h
.
Third error
Finally, and this one I think is less of a problem :
[ERR] [plugins/janus_lua.c:janus_lua_init:1422] Error loading Lua script /opt/janus/share/janus/lua/echotest.lua: /opt/janus/share/janus/lua/echotest.lua:6: module 'json' not found:
no field package.preload['json']
no file '/usr/local/share/lua/5.3/json.lua'
no file '/usr/local/share/lua/5.3/json/init.lua'
no file [... you get the idea...]
[WARN] The 'janus.plugin.lua' plugin could not be initialized
This one I care a bit less about, since we’re not using Lua. I was looking for a way to disable it in the documentation, but couldn’t find any. Maybe I missed it, since I’ve been working on the same issue since Monday and must admit, I’m getting a bit frustrated. I’m sure you get it
[EDIT BEFORE SENDING : Just noticed --enable-plugin-lua
as an argument in build.sh. Guessed this would take care of things, but the logs still shows the same after doing that. )
But anyway, I’m pretty sure this is linked to the issue I’m having with duktape.
I don’t know which information would help to provide me with the information / tip that’ll make me realize what the problem is, so for now I’ll leave it at that.
Thanks for reading, and another thanks if you’re willing to contribute your knowledge to help me retain my sanity!