Error on service after upgrading to 2.1


#1

I have a service that is a passthrough to a geolocation api. It was working fine before (in both a 1.x DSP and the 2.04 DSP) but after upgrading to 2.1 I am now getting this error:

“Argument 1 passed to DreamFactory\Library\Utility\ArrayUtils::get() must be of the type array, null given, called in /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-rws/src/Services/RemoteWeb.php on line 216 and defined”


Platform.api.post("user/session",{}) is broken after updating from DF 2.0.1 -> DF 2.0.4
#2

After upgrade to 2.1, I not able to return any data with a custom scripting service.

Just for example, using 2.0.4, this v8js script works fine:

return {“test”:“ok”};

but after upgrading to 2.1, i get a blank response. No errors in df log.


#3

Getting the same error as @greywire here… and also noticed the same problem as @andersonmuller


#4

@greywire @Elvis_Fernandes Yep, it is a bug. Workaround is to add an option (default one from clicking the + is fine), save the service, then remove the option and save again and it should work. Seems the API is not handling no config for the option well. Will be fixed in the next release.


#5

@andersonmuller 2.1.0 has a couple of “breaking” changes documented in the release notes on the wiki.

“Event Scripting post-process scripts, and custom scripting services (V8Js, NodeJs, and PHP) now utilize a “event.response” object that allows for custom status code and content type settings. Scripts should no longer use return statements to return data.”


Platform.api.post("user/session",{}) is broken after updating from DF 2.0.1 -> DF 2.0.4
#6

Thanks @leehicks,

Sorry, I missed that in release notes, but, please update the wiki :slightly_smiling:
http://wiki.dreamfactory.com/DreamFactory/Features/Scripting
http://wiki.dreamfactory.com/DreamFactory/Features/Scripting/V8Js

here it is already updated: http://wiki.dreamfactory.com/DreamFactory/Tutorials/V8_custom_scripting_service


v2.0 Remote Web Service - headers not passed across
#7

Any update to the PHP tut?


#8

Yep, that workaround fixes the problem…