After updating to DF 2.0.4 the server side scripts will fail when calling platform.api.post(“user/session”,{}).
How to replicate: I created a service test1 that will execute this:
var param = {"email": "test1@bitperbit.info", "password": "test1","remember_me": true, "duration": 64000};
var res_login = platform.api.post("user/session",param);
event.response = res_login ;
return;
This will return an 500 Internal Server Error, with this message:
<span class="exception_title">
<abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in
<a title="/home/bitnami/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/app/Http/Middleware/AuthCheck.php line 29" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">AuthCheck.php line 29</a>:
</span>
<span class="exception_message">Call to a member function query() on a non-object</span>
</h2>
<div class="block">
<ol class="traces list_exception">
<li> in
<a title="/home/bitnami/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/app/Http/Middleware/AuthCheck.php line 29" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">AuthCheck.php line 29</a>
</li>
</ol>
</div>
This i happening only on custom serverside script. If you make direct calls to “api/v2/user/session” with the API Docs or via Postman it works. It seems to be broken only on scripts.
Does anyone has the same issue? I’m hoping for quick workaround, this issue has broken my login.
I have filed a bug-fix request here.
I tried upgrading to 2.1 (at least 3 times, clean install 2.0.4 and following upgrade steps Installation - DreamFactory) but in Config tab I still see:
The same is happening to me. I repeated the update process a number of times but still see Admin App Version as 2.1.1 and DreamFactory Version as 2.0.4.
I’m getting some weird results from SSS, I think it has something to do with this.
This is fixed now, but the functionality is broken on a different point.
The event scripting post-process is not returning any custom data at all. I see that other reported already the bug (here), I hope this will be fixed soon. Otherwise I have to rollback to v2.0.1.
I did that soon after the update. The return is working for custom services (BTW, great improvement to be able to change the response code), but this is not working for scrips on post-process events. I think is a bug.
To verify version numbers, you can always check the readme and/or changelog files in the repositories.
@bitperbit what type of service are you trying to do a post process on, and what specifically is not working in the script?
(sorry, I’m a little confused after reading through this thread.)
I was referring to an issue regarding the post_process scripting when inserting a record in a mysql table.
I have open a bug-fix request here, with additional details.