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?
- Was scripting working previously, but now whenever you modify a script it breaks?
- 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? - What steps can we take to replicate this behavior? What environment are you using so that we may replicate that too?
Hi @jeffreystables,
It sounds a similar issue to this: get system user crashes swagger
-
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.
-
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.
-
probably already explained in 1 &2 above.
Main culprit seems to point to V8Js.php???
LOG EXTRACT:
[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}
REQUEST_URI=/admin/%7B%7BiframeUrl%7D%7D
HTTP_REFERER=http://MYDOMAIN.info/admin/
[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
REQUEST_URI=/rest/db/bsoc_applaunch
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