Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HubInvokeCallback, onError #50

Open
emilan opened this issue Aug 7, 2014 · 1 comment
Open

HubInvokeCallback, onError #50

emilan opened this issue Aug 7, 2014 · 1 comment

Comments

@emilan
Copy link

emilan commented Aug 7, 2014

Hi,

I occasionally get the message "failed to invoke [method]on [hub]" in my logs. However, I do not get a callback to the OnError method in my HubInvokeCallback. I see that in HubProxy.java, line 67 is commented out. Could this be the issue? What is the reason it is commented out? Example invoke code is attached below and the OnError method is never called.

/Emil

public void doSomething(String str) {
    HubInvokeCallback callback = new HubInvokeCallback() {          
        @Override
        public void OnResult(boolean succeeded, String response) {
            android.util.Log.d(TAG, "doSomething, OnResult( " + succeeded + ", " + response + ")");
        }

        @Override
        public void OnError(Exception ex) {
            android.util.Log.e(TAG, "doSomething, OnError( " + ex.getMessage() + ")");
        }
    };
    List<String> args = new ArrayList<String>();
    args.add(str);
    _hub.Invoke("doSomething", args, callback);
}
@erizet
Copy link
Owner

erizet commented Aug 11, 2014

To be honest - I don't remember. :) I think it might be a threading issue or maybe it's a problem if the error sholud be set in the transport layer. I think OnResult in your code is called from another location in the code... I'm sorry I can't be more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants