S-S Scripting broken

Seems that on my instance of DSP any attempt on server-side scripting breaks.
Even adding a single line comment breaks the relevant calls.
Anybody seen this before, could it be install related or script engine related?

I have not seen this before, @rbleeker. Could you provide us some more details?

  1. Was scripting working previously, but now whenever you modify a script it breaks?
  2. What error or other behavior are you seeing when it breaks? What is logged in your web.*.log file (found in /htdocs/log/) when it breaks?
  3. What steps can we take to replicate this behavior? What environment are you using so that we may replicate that too?
1 Like

Hi @jeffreystables,

It sounds a similar issue to this: get system user crashes swagger

  1. Didn’t work for me at any stage. Tried re-installing DSP (1.8.2) several times, on brand new instances of Ubuntu14.04, 14.10, and now on Debian 7.7. No difference, system works fine until I add any text to a Server-Side script… I do mean it breaks only the Server-Side script associated calls. It breaks both the online and iOS API calls. Tried the both DSP ios-sdk and AFNetworking classes in the native iOS app.

  2. I add a single comment “//hello” (or anything at all without the quotes) in a GET pre-processor (same issues for pre & post), then make a call with the associated GET API “db.bsoc_applaunch.get” (using online interface as it’s easiest to test) just to get a list of records, then it thinks for a while and reloads the API doc’s iframe with a error’ed copy of the DSP site (or part of the site). See log extract below.

  3. probably already explained in 1 &2 above.

Main culprit seems to point to V8Js.php???

[2014-12-30 08:04:46][app][ERROR ] REST Exception #404 > “db.bsoc_applaunch.get.pre_process” was not found. {“host”:“MYDOMAIN.info”,"req$
[2014-12-30 08:04:51][app][ERROR ] * System error deleting swagger cache file: portal.json
[2014-12-30 08:04:51][app][INFO ] Building Swagger cache
[2014-12-30 08:04:51][app][DEBUG ] * Discovered 17 event(s).
[2014-12-30 08:04:51][app][DEBUG ] * Discovered 82 event(s).
[2014-12-30 08:04:51][app][DEBUG ] * Discovered 73 event(s).
[2014-12-30 08:04:51][app][DEBUG ] * Discovered 1 event(s).
[2014-12-30 08:04:51][app][DEBUG ] * Discovered 30 event(s).
[2014-12-30 08:04:51][app][INFO ] * No Swagger content found for service “portal”
[2014-12-30 08:04:51][app][INFO ] Swagger cache build process complete
[2014-12-30 08:04:51][app][DEBUG ] Dispatcher: event “swagger.cache_rebuilt” triggered by /system/script/db.bsoc_applaunch.get.pre_proces$
[2014-12-30 08:04:55][app][ERROR ] exception ‘CHttpException’ with message ‘Unable to resolve the request “admin/{{iframeUrl}}”.’ in /opt$
Stack trace:
0 /opt/dreamfactory/platform/vendor/dreamfactory/yii/framework/yiilite.php(1665): CWebApplication->runController(‘admin/{{iframeU…’)
1 /opt/dreamfactory/platform/vendor/dreamfactory/yii/framework/yiilite.php(1190): CWebApplication->processRequest()
2 /opt/dreamfactory/platform/vendor/dreamfactory/lib-php-common-yii/src/Utility/Pii.php(218): CApplication->run()
3 /opt/dreamfactory/platform/web/index.php(69): DreamFactory\Yii\Utility\Pii::run(’/opt/dreamfacto…’, Object(Composer\Autoload\ClassLoade$
4 {main}

[2014-12-30 08:05:22][app][ERROR ] include(V8Js.php): failed to open stream: No such file or directory (/opt/dreamfactory/platform/vendor$
Stack trace:
0 unknown(0): spl_autoload_call()
1 /opt/dreamfactory/platform/vendor/dreamfactory/lib-php-common-platform/src/Scripting/ScriptEngine.php(193): ReflectionClass->__construct()
2 - 28 … removed for space

Hi, following up more on the V8Js error, I found some previous mention about this missing library from the git install of DSP.

Found the linked article on how to install the V8Js library: Installing-V8js

I stumbled my way though the instructions and got it installed, did have to adjust a missing directory path error but with a little ‘ls’ directory searching I found what file was trying to be copied.

I haven’t tried a full Server-Side script yet, but at least it doesn’t break with the simple comment text in the pre-process script.

Tomorrow I will test a full script, but expect it to be fine now… fingers crossed.

Thanks @jeffreystables for prompting me to dig a little more in the error logs :smile: