Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5028

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

$
0
0

Hi,

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.

Thanks
Gabriel


Viewing all articles
Browse latest Browse all 5028