Support Topics Documentation Slack YouTube Blog

Publish message error in some device! code: Internal client exception

(Reza Ahmadi) #1

I’d like to send push notification from my android’s work fine in some device but in some device it receive push very well but can’t publish push and got this error: Internal client exception.
this is my code:
Backendless.initApp(this, “my_applicationId”, “my_secretKey”, appVersion);

Backendless.Messaging.registerDevice(“my_GCM_sender_id”, new AsyncCallback<Void>() {
public void handleResponse(Void arg0) {
new Thread(new Runnable() {
public void run() {
try {
MessageStatus status=Backendless.Messaging.publish(“defult”, “message text”);
}catch (Exception e){
public void handleFault(BackendlessFault arg0) {
Log.i(“GCM”, “=”+arg0.getMessage());

(Mark Piller) #2

See the section marked as “IMPORTANT” at:

(Reza Ahmadi) #3

thanks mark.i know about sync and async call and i try all ways.
i said it’s work fine in some device.i think maybe that devices block publish message because other backendless calls work very well.i got this error only when wants to publish message on some device.

(Mark Piller) #4

You’re using the sync version of Backendless.Messaging.publish. You will get that exception on any device that runs Android for the reason described in the documentation.

(Reza Ahmadi) #5

i try this too but got same result:
DeliveryOptions deliveryOptions = new DeliveryOptions();
Backendless.Messaging.publish(“defult”, content, publishOptions, deliveryOptions, new AsyncCallback<MessageStatus>() {
public void handleResponse(MessageStatus messageStatus) {
Log.i(“Send Ok”, “=” + messageStatus.getStatus() + “–” + messageStatus.getErrorMessage());


public void handleFault(BackendlessFault backendlessFault) {
    Log.i("Send Error", "=" + backendlessFault.getMessage() + "-code=" + backendlessFault.getCode()


(Mark Piller) #6

What is the result? Is there a stack trace? Perhaps an error code?

(Reza Ahmadi) #7

no just it :
code:internal client exception

(Mark Piller) #8

Please debug it and see which line of code causes the exception. Let us know what you find.

(Reza Ahmadi) #9

06-25 00:43:21.979 W/System.err: BackendlessException{ code: ‘Internal client exception’, message: ‘null’ }
06-25 00:43:21.979 W/System.err: at com.backendless.Invoker$SyncResponder.errorHandler(
06-25 00:43:21.979 W/System.err: at com.backendless.core.responder.AdaptingResponder.errorHandler(
06-25 00:43:21.979 W/System.err: at weborb.client.ioEngine.HttpIOEngine.send(
06-25 00:43:21.979 W/System.err: at weborb.client.ioEngine.HttpIOEngine.invoke(
06-25 00:43:21.979 W/System.err: at weborb.client.WeborbClient.invoke(
06-25 00:43:21.979 W/System.err: at com.backendless.Invoker.invokeSync(
06-25 00:43:21.979 W/System.err: at com.backendless.Invoker.invokeSync(
06-25 00:43:21.979 W/System.err: at com.backendless.Messaging.publish(
06-25 00:43:21.979 W/System.err: at com.backendless.Messaging.publish(
06-25 00:43:21.979 W/System.err: at com.backendless.Messaging.publish(

(Mark Piller) #10

This tells me that your code still invokes the synchronous version of the method. Here, take a look, line 423 in is right in the sync version of “publish”:

(Reza Ahmadi) #11

finally i found the problem.
error occurred when both device use of same wifi network.but when network is different both device work very well.
Mark can you solve this problem? it’s very necessary,because my app is an social network and it’s possible people of a family use of app and then they can’t send message on their wifi network.

(Mark Piller) #12

The problem with “internal client exception” has nothing to do with what network you use. It occurs only if you use sync api on the main UI thread in Android.

We’d be happy to look into the problem in your code. Since this is outside of the free support, you’d need to purchase “single-incident support” as described at: