Backendless Support
 
Solved

Custom event handler not found

SDK: 4.0b3

Error: FAULT = 'Server.Processing' [None of the handlers were able to invoke the target service. The service may not be found:com.backendless.services.servercode.EventHandler. Make sure exceptions are logged - check server log for details] <None of the handlers were able to invoke the target service. The service may not be found:com.backendless.services.servercode.EventHandler. Make sure exceptions are logged - check server log for details>

Details: I have a custom event called "home" created in JS. It can't seem to find it.

iOS code

  1. backendless?.events.dispatch("home", args: [:], response: { (results) in

    print("Results: \(String(describing: results))")

    }, error: { (fault) in

    print("Server reported an error (async): \(String(describing: fault))")

    })

Leave a Comment

Comments (16)

photo
1

Hi Brian,

What's your app ID?

photo
1

C2B7BE43-739E-D530-FF82-13812C620F00

photo
photo
1

Hi Brian,

I just ran the following request (replaced your REST API key with YOUR-REST-API-KEY-HERE)and got a response from the event handler:

  1. curl -H Content-Type:application/json -d '{"foo":"bar"}' -X POST https://api.backendless.com/C2B7BE43-739E-D530-FF82-13812C620F00/YOUR-REST-API-KEY-HERE/servercode/events/home

Response:

  1. {"advice":{"image":null,"author":"Lucas Bazemore","title":"What is a Personal Relationship Manager (PRM)?","excerpt":"Today there are one hundred and one ways to connect with people online. The internet has provided the ability to cast a massively wide net, but with such large networks, &#8230;\n","url":"https://ryzeapp.co/personal-relationship-manager/";}}

Regards,

Mark

photo
1

Awesome, we get the same response as well. How come it doesn't work for the iOS side?

photo
photo
1

Not sure, I need to defer it to our iOS folks. We'll look into it and report back.

Regards,

Mark

photo
1

Thank you!

photo
1

Have you tried passing specific values for the argument instead of "args: [:]" ? I am not sure if an empty object map would be properly serialized and it might be causing the exception.

photo
1

Yes I have. It still gives the same error.

photo
1

Any progress?

photo
1

Not a lot of progress with the issue today. We should have an update for you tomorrow.

photo
photo
1

Hi Brian,

The issue has been fixed, please verify.

photo
1

When calling on the iOS side, our event handler doesn't seem to be getting called. The response I get on the iOS side is just an empty dictionary.

photo
1

Do you get a response with a REST call?

photo
1

Yes

photo
1

Could you try creating another event handler and see if you can call it?

photo
1

Sorry for the late response, but this is solved

photo