Debugging calls of self.call() self.publish() self.subscribe()

#1

Hello,

I spent a lot of time yesterday between joy and frustration.
Once I successfully made my components work fine, 1min later all went away.

Is there a way to trace the calls of self.call/publish/subscribe() ?

What’s happened currently is that when something wrong occurs, there is no error message, and the call of a registered procedure is never done at all.

0 Likes

#2

Both with subscribing and registering, there is a return value which is a deferred/promise. You need to attach to that to check for errors:

try:
res = yield self.subscribe(…)
except Exception as :
print(e)

or

session.subscribe(…).then(
function (res) {
console.log(“success”, res);
},
function (err) {
console.log(“error”, err);
}
);

···

Am Sonntag, 22. Februar 2015 16:50:42 UTC+1 schrieb foxmask:

Hello,

I spent a lot of time yesterday between joy and frustration.
Once I successfully made my components work fine, 1min later all went away.

Is there a way to trace the calls of self.call/publish/subscribe() ?

What’s happened currently is that when something wrong occurs, there is no error message, and the call of a registered procedure is never done at all.

0 Likes

#3

I found that somewhere hidden in the examples of configuration

runner = ApplicationRunner(
url=“ws://127.0.0.1:8080/ws”,
realm=“realm1”,
debug=False, # low-level WebSocket debugging
debug_wamp=False, # WAMP protocol-level debugging
debug_app=False, # app-level debugging
extra=config)

I can then switch False to True so track whats worng.

···

Le dimanche 1 mars 2015 22:35:37 UTC+1, Tobias Oberstein a écrit :

Both with subscribing and registering, there is a return value which is a deferred/promise. You need to attach to that to check for errors:

try:
res = yield self.subscribe(…)
except Exception as :
print(e)

or

session.subscribe(…).then(
function (res) {
console.log(“success”, res);
},
function (err) {
console.log(“error”, err);
}
);

Am Sonntag, 22. Februar 2015 16:50:42 UTC+1 schrieb foxmask:

Hello,

I spent a lot of time yesterday between joy and frustration.
Once I successfully made my components work fine, 1min later all went away.

Is there a way to trace the calls of self.call/publish/subscribe() ?

What’s happened currently is that when something wrong occurs, there is no error message, and the call of a registered procedure is never done at all.

0 Likes

#4

Hi!

This is now an issue for the Autobahn|Python documentation:

https://github.com/tavendo/AutobahnPython/issues/354

Regards,

Alex

···

Am Montag, 2. März 2015 14:11:53 UTC+1 schrieb foxmask:

I found that somewhere hidden in the examples of configuration

runner = ApplicationRunner(
url=“ws://127.0.0.1:8080/ws”,
realm=“realm1”,
debug=False, # low-level WebSocket debugging
debug_wamp=False, # WAMP protocol-level debugging
debug_app=False, # app-level debugging
extra=config)

I can then switch False to True so track whats worng.

Le dimanche 1 mars 2015 22:35:37 UTC+1, Tobias Oberstein a écrit :

Both with subscribing and registering, there is a return value which is a deferred/promise. You need to attach to that to check for errors:

try:
res = yield self.subscribe(…)
except Exception as :
print(e)

or

session.subscribe(…).then(
function (res) {
console.log(“success”, res);
},
function (err) {
console.log(“error”, err);
}
);

Am Sonntag, 22. Februar 2015 16:50:42 UTC+1 schrieb foxmask:

Hello,

I spent a lot of time yesterday between joy and frustration.
Once I successfully made my components work fine, 1min later all went away.

Is there a way to trace the calls of self.call/publish/subscribe() ?

What’s happened currently is that when something wrong occurs, there is no error message, and the call of a registered procedure is never done at all.

0 Likes