Background process with JSON gives error -400 with real device, but works with SIM

I have a problem. Simulator processes the json output from a file that outputs few values in JSON, but real device gives error -400 always, what could be wrong?

The data that is coming out is short:

It comes from a secure server, and the output type is JSON. Headers are sent also as Content-type: application/json and all programs validates it as correct JSON format.
What am I missing here? If you need more information, or access to the data, please let me know.

Every time background process timeout has gone, I log in the simulator, and this comes out:

and simulator data updates with correct data.

Tested with simulator putting on Settings->Use Device HTTPS Requirements

and now it gives error -1001

SECURE_CONNECTION_REQUIRED -1001

2.3.0

Indicates an https connection is required for the request.

But, it's on secure server, browser shows lock icon and the request is made with https://

  • got it working, trackin with Settings->Use Device HTTPS Requirements and -1001 indeed helped. There was something wrong with the https certificate, and now it works. I leave this thread here, if somebody else struggling with errorcodes -400 and -1001.