voryx/angular-wamp

failing transport due to protocol violation: SUBSCRIBED received for non-pending request ID

Closed this issue · 3 comments

Only the angular-wamp client is having trouble with the router that I am using. The issue is only with the subscription, as it is able to publish without error. The issue seems to be with the ID that is returned by the server.

failing transport due to protocol violation: SUBSCRIBED received for non-pending request ID 9223372036854775807

I have tried the fixes proposed on the thruway issues side, and none of them have been effective. The precision setting does not make any difference, and encoding large integers as strings has also failed. The server is currently running on windows 7 x64.

Here is the Autobahn error log.

AutobahnJS debug enabled
autobahn.min.js:33 trying to create WAMP transport of type: websocket
autobahn.min.js:33 using WAMP transport type: websocket
autobahn.min.js:33 WebSocket transport send [1,"realm1",{"roles":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"progressive_call_results":true}},"publisher":{"features":{"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"publisher_identification":true}},"subscriber":{"features":{"publisher_identification":true}}}}]
autobahn.min.js:33 WebSocket transport receive [2,1892156065,{"roles":{"broker":{"features":{"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"subscriber_metaevents":true}},"dealer":{"features":{"caller_identification":true,"progressive_call_results":true}}}}]
angular.js:10264 Congrats!  You're connected to the WAMP server!
autobahn.min.js:33 WebSocket transport send [32,7047175104102400,{},"com.myapp.hello"]
autobahn.min.js:33 WebSocket transport receive [33,"9223372036854775807",3918414]
autobahn.min.js:33 failing transport due to protocol violation: SUBSCRIBED received for non-pending request ID 9223372036854775807
autobahn.min.js:115 Uncaught InvalidAccessError: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1002 is neither.18.a.create.window.c.close @ autobahn.min.js:11516.f._protocol_violation @ autobahn.min.js:8316.f._process_SUBSCRIBED @ autobahn.min.js:8316.f._socket.onmessage @ autobahn.min.js:9418.a.create.window.b.onmessage @ autobahn.min.js:114
angular.js:8644t @ angular.js:8440$get.f @ angular.js:8160n.promise.then.J @ angular.js:11592n.promise.then.J @ angular.js:11592(anonymous function) @ angular.js:11678$get.h.$eval @ angular.js:12769$get.h.$digest @ angular.js:12573$get.h.$apply @ angular.js:12873(anonymous function) @ angular.js:14390e @ angular.js:4498(anonymous function) @ angular.js:4799
autobahn.min.js:33 WebSocket transport send [16,3144473462702080,{},"com.myapp.hello",["Hello World"]]
autobahn.min.js:33 WebSocket transport receive [36,3918414,1216462910,{},["Hello from PHP"]]
autobahn.min.js:33 failing transport due to protocol violation: EVENT received for non-subscribed subscription ID 3918414
autobahn.min.js:115 Uncaught InvalidAccessError: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1002 is neither.

What version of Thruway are you using? Can you make sure that to turn off encoding large integers as strings?

I have tried using 0.3.* as well as the 0.4.*dev. The string encoding is disabled. I disabled it after having tried it and it did not work.. Precision is set to 16 in php.ini. serialize_precision is 17. The error persists regardless of what these settings are changed to.

WebSocket transport receive [33,9.223372036854776e+18,272637018]
autobahn.min.js:33 failing transport due to protocol violation: SUBSCRIBED received for non-pending request ID 9223372036854776000
autobahn.min.js:115 Uncaught InvalidAccessError: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1002 is neither.

I suppose it is a Thruway specific issue looking into it further...Autobahn.js by itself is displaying the same behavior.

Yeah, it's almost defiantly a Thruway/PHP issue. Can you open an issue there and include your PHP version, operating system information and processor information?