Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#9408 closed defect (fixed)

subscription to channel denied - incorrectly handled

Reported by: Prutkar Owned by: Greg Wilkins
Priority: high Milestone: 1.7
Component: DojoX Cometd Version: 1.3.1
Keywords: subscription denied Cc:
Blocked By: Blocking:


Server: Jetty 6.1.17
Client: Dojo 1.3.1


dojox.cometd.subscribe("/chat/room, this, "_chat", {user: "User"});

Response from server: Subscription request rejected

Expected behavior: Callback function "_chat" will be called containing message "error":"403::cannot subscribe"... (or is this incorrect expectation?)

Description of failure: Legitimate rejection of subscription request to the channel by the server, dojo code goes into reconnect/handshake procedure. Callback function "_chat" is never being called, user can not be notified of his subscription failure. (seems like dojo is executing code which handles detection of lost connection)

FireBug? logs start.

Post 1:
:"v5kwsj263bzhkank7i","id":"6","timestamp":"Mon, 15 Jun 2009 04:00:13 GMT"}]

Response 1:
[{"id":"6","error":"403::cannot subscribe","subscription":"/chat/room","successful":false,"channel":"

Post 2:
,"timestamp":"Mon, 15 Jun 2009 04:10:00 GMT"}]

Response 2:

Post 2:
[{"channel":"/meta/disconnect","clientId":"z3kzkjps8c4na28qba","id":"7","timestamp":"Mon, 15 Jun 2009
 04:10:00 GMT"}]

Response 2:

Error: xhr cancelled dojoType=cancel message=xhr cancelled

Post 3:
,"timestamp":"Mon, 15 Jun 2009 04:10:11 GMT"}]

Response 3:
[{"error":"402::Unknown client","successful":false,"advice":{"reconnect":"handshake","interval":500}

Post 4:
:["long-polling","long-polling-json-encoded","callback-polling"],"timestamp":"Mon, 15 Jun 2009 04:10
:12 GMT","ext":{"ack":true}}]

Response 4:

Post 5:
,"timestamp":"Mon, 15 Jun 2009 04:10:12 GMT"}]

Response 5:

Post 6:
,"timestamp":"Mon, 15 Jun 2009 04:10:12 GMT"}]

FireBug? logs end.

Note: In case there is channel reconnect procedure inserted into the reconnect/re-handshake procedure (taken from examples), this is going to loop with no end. Like this code:

this._meta = dojo.subscribe("/cometd/meta", this, function (e) {
	if (e.action == "handshake") {
		if (e.reestablish) {
			if (e.successful) {
				dojox.cometd.subscribe("/chat/room", bc_chat, "_chat", {
					user: chatter.username_local_present,
				dojox.cometd.publish("/chat/room", {
					join: true,
					user: "User",

Change History (4)

comment:1 Changed 13 years ago by dante

Milestone: tbdfuture

comment:2 Changed 11 years ago by Chris Mitchell

Resolution: wontfix

closing as wontfix, as cometd client is now maintained at query will be sent to cometd team/Simone Bordet for review by cometd project leads

comment:3 Changed 11 years ago by dylan

Resolution: wontfixfixed
Status: newclosed

This appears to work with the cometd hosted version of the client. If not, please file a ticket with the cometd project.

comment:4 Changed 11 years ago by bill

Milestone: future1.7
Note: See TracTickets for help on using tickets.