I am getting a timeout error in the logs after I deploy a custom event handler to production that worked correctly when debugging with CodeRunner.
Steps:
- Add the following to a custom event code generated project:
@BackendlessEvent( "echo" )
public class EchoEventHandler extends com.backendless.servercode.extension.CustomEventHandler
{
@Override
public Map handleEvent( RunnerContext context, Map eventArgs )
{
System.out.println("eventArgs=" + eventArgs);
return eventArgs; // echo
}
}
-
Run with CodeRunner and call API via curl with params {“weather”:“sunny”}. We get the expected result of the console printout on CodeRunner and the param is also returned to curl.
-
After running Deploy.sh and seeing the message “successfully deployed”, I make sure there is no stale debug connections in the Debug tab on the Dashboard/Business Logic/Custom Events screen.
-
I re-run curl and get an empty response {}. Clicking on “view” under History and Logs shows the status as “timeout” for each attempt to run curl.