CustomCode - Read Timed out

0 votes

In android I'm trying to run a custom code but I always get a read timed out exception. Running the code from the console works fine...

com.shephertz.app42.paas.sdk.android.App42Exception: java.net.SocketTimeoutException: Read timed out

Can I somewhere set this time out?

asked Feb 22, 2015 in App42 Cloud API-BaaS by mflisar85 (40 points)
edited Feb 22, 2015 by mflisar85
Are you able to run other methods from your app apart of custom code? What is the SDK version you are using? Please share the console logs if problem is not resolved.

Thanks,
Himanshu Sharma
Yes, I can run all the code from my custom code (some count functions) manually on my android phone.

And there is no console output, the custom code runs fine. If I remove some count functions from the code (I use the same function for different tables!), then the call from the app works, it really is a timeout in the app. It does not want to wait long enough.

I'm using App42_JAVA_SDK_2.5.1.jar with app42CCLib-0.5.jar in the custom code project.

And App42_ANDROID_SDK_3.0.1.jar in the android app.
btw, this https://github.com/shephertz/App42_CustomCode_Sample/archive/master.zip should be updated... as this seems to be quite a old file...
ok, problem solved... Your answer made me look for new versions for all files. App42_ANDROID_SDK_3.2.jar in my android app solves the problem...
Hello,
 
Great to hear that your query has been resolved and thanks for your valuable feedback. We look forward into it and update the sample as well. Requested you to close this thread, if you don't have more questions related to this.

Thanks,
Himanshu Sharma
ok... currently nothing works anymore...

I uploaded a testfile that only writes a log message... Even that does not work...

I always get following answer when running code from the console:

Status: undefined
Output: undefined

I even tried a test file with following code:

     @Override
    public HttpResponseObject execute(HttpRequestObject request)
    {
        StorageService storageService = mApi.buildStorageService();
        LogService logger = mApi.buildLogService();

        logger.debug("start...", moduleName);

        JSONObject body = request.getBody();
        JSONObject jsonResponse = new JSONObject();

        return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse);
    }

Still I get the undefined answer... and no log is written by the logging service...

1 Answer

0 votes
 
Best answer

Hello, 

 
It looks strange, could you please share your app name & custom code name which you are running at support@shephertz.com. It will help us to find the root cause of this issue.  
 
Thanks,
Himanshu Sharma

 

answered Feb 23, 2015 by hs00105 (2,005 points)
selected Feb 24, 2015 by mflisar85
I will do so
We have checked from the backend and its working fine from our end. Could you please deploy the same custom code with new name and see if it solves the issue? Or, you can re-deploy it by deleting the old one and deploying the new.

Let me know if it helps.
 
Thanks,
Himanshu Sharma
Solved by mail. I used java sdk 8 and this does not work...
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
...