hh
Posts: 0
Joined: Sat Feb 04, 2017 10:07 am

Problem with executing REST services from mobile preview but not from app ide since yesterday

All REST request returns Bad request. I have this for every request since yesterday. When I try the script from the App IDE it's no problem and everything is fine but when executing through Mobile preview or from mobile I get this fault. I have tried several scripts and the problem is there all the time. API Express don't work either.

hh
Posts: 0
Joined: Sat Feb 04, 2017 10:07 am

Problem with executing REST services from mobile preview but not from app ide since yesterday

I use Iconic app.

I have a small page with only one filed as input mapping and added the service to the function by drag and drop.

I have never had this problem before and it have alwas worked so my question is if you have done anything in the environment that can be the cause. I use v1.2 of the libraries

The error message is
{"code":"BCXX002","description":"Cannot consume content type"}

The request is
/*
Request URL: ....
Request Method:POST
Status Code:400 Bad Request400 Bad Request
Query String Parameters
username:
Request Payload
username=
Response Headers
Content-Type:application/json
*/

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Problem with executing REST services from mobile preview but not from app ide since yesterday

Hello -

We didn't made any changes in our platform Backend.

Could you please explain what exactly you service call actually do? - is it a database service or is it a server code script?

Actually you're getting a backend common (BC) error from your service settings, in the most cases you should check your service parameters configuration.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Problem with executing REST services from mobile preview but not from app ide since yesterday

Please make sure that you've configured header parameters correctly for your service and it has a "Content-Type" in request parameters.

ch
Posts: 0
Joined: Wed Dec 23, 2015 3:48 pm

Problem with executing REST services from mobile preview but not from app ide since yesterday

Hi,
Content-Type is text/plain as usually.
In the problem section one other quy had the same probelm but his solution didn't work for me. I tried to go back to v1.1 of the library but then my app don't work at all so I maybe use som new component.

I have tried to empty the browser cache but it don't help. The problem also is there on mobilephone.

this is for sure a problem but maybe because of wrong library in the browser but I have tried on several MACs.

And I have never had this probelm before and I'm sure it come from going to v1.2 of the library.

ch
Posts: 0
Joined: Wed Dec 23, 2015 3:48 pm

Problem with executing REST services from mobile preview but not from app ide since yesterday

As I have written before I can't even do this

1) Create a server code service with default content
2) import the service
3) attach the service to a function called from a page
4) the fault occurs

And as I said, the service works without any problem from inside the app builder but when it's called from the app it's don't work because of the load error. Sometimes I can click on the link in the debug window and then get the result and it's the same link that don't work in the app.

So something going wrong with the v1.2 library when running the app

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Problem with executing REST services from mobile preview but not from app ide since yesterday

Could you please clarify which project type you're using and what specific Libraries versions you're changing?

Return to “Issues”