Error Code 0 when quering a document using Storage Service

0 votes
Hi,

I'm using the storage service to save player information.

The way I am handling a new user is, I send a query to see if a document exists with a specific player name. If the document does not exist, then the code creates a new document and saves the player information.

When I run this code in the authoring environment, I get an error code "2608" when there is no document. However when I upload this to my web server and test it, I always get an error code of 0.

I'm not sure what the error code 0 means.

I'm using the App42 Flash SDK and my IDE is Flash Develop.

Regards,

Mariam
asked Oct 8, 2015 in App42 Cloud API-BaaS by mariam.d (10 points)

1 Answer

0 votes

Hello Mariam,

Could you please print the internal logs of that method while calling it from browser. It will help us to provide better support to you. 

Toprint the internal logs, puth the below line of code before making App42 request:

App42Log.setDebug(true);

P.S Please make sure that you are using browser version of  App42 SDK for running into web browser. 

Regards,

Himanshu Sharma

App42 Team

answered Oct 8, 2015 by hs00105 (2,005 points)
Thanks Himanshu. I'm using the Web Browser SDK but I still get 0.
Below is the log from my IDE where the build works fine. It is only when uploaded that it doesn't work correctly.

Below is the log. I've removed the API key and signature values. Not sure if you'll need those.

Configuration Properties https://api.shephertz.com/cloud/
Signature :
Http url : 1.0/storage/findDocsByQuery/dbName/GameDatabase/collectionName/IBC
Setting value :jsonQuery : [{"value":"Rohan","key":"playerName","operator":"$eq"}]
QueryString is ?jsonQuery=%5B%7B%22value%22%3A%22Rohan%22%2C%22key%22%3A%22playerName%22%2C%22operator%22%3A%22%24eq%22%7D%5D&
Requested URL is https://api.shephertz.com/cloud/1.0/storage/findDocsByQuery/dbName/GameDatabase/collectionName/IBC?jsonQuery=%5B%7B%22value%22%3A%22Rohan%22%2C%22key%22%3A%22playerName%22%2C%22operator%22%3A%22%24eq%22%7D%5D&
 Setting Header value : SDKName : AS3
 Setting Header value : apiKey :
 Setting Header value : dataACL : [{"null":null}]
 Setting Header value : resource : storage
 Setting Header value : signature :
 Setting Header value : timeStamp : 2015-10-08T8:25:50.794Z
 Setting Header value : version : 1.0
Hi Himanshu,

Sending the print from the browser -

Configuration Properties https://api.shephertz.com/cloud/
Signature :
Http url : 1.0/storage/findDocsByQuery/dbName/GameDatabase/collectionName/IBC
Setting value :jsonQuery : [{"operator":"$eq","key":"playerName","value":"Rohan"}]
QueryString is ?jsonQuery=%5B%7B%22operator%22%3A%22%24eq%22%2C%22key%22%3A%22playerName%22%2C%22value%22%3A%22Rohan%22%7D%5D&
Requested URL is https://api.shephertz.com/cloud/1.0/storage/findDocsByQuery/dbName/GameDatabase/collectionName/IBC?jsonQuery=%5B%7B%22operator%22%3A%22%24eq%22%2C%22key%22%3A%22playerName%22%2C%22value%22%3A%22Rohan%22%7D%5D&
 Setting Header value : SDKName : AS3
 Setting Header value : apiKey :
 Setting Header value : dataACL : [{"null":null}]
 Setting Header value : resource : storage
 Setting Header value : signature :
 Setting Header value : timeStamp : 2015-10-08T16:32:8.926Z
 Setting Header value : version : 1.0

Error : 0
Error is Unexpected end of input
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...