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

clientId from token auth is ignored for presence #198

Closed
mattheworiordan opened this issue Jan 13, 2016 · 2 comments
Closed

clientId from token auth is ignored for presence #198

mattheworiordan opened this issue Jan 13, 2016 · 2 comments
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@mattheworiordan
Copy link
Member

Here is some code to demonstrate the bug:

ably = new Ably.Realtime({ authUrl: '/realtime-token', log: { level: 5 } });
channel = this.ably.channels.get('backlog-1');
ably.connection.once('connected', function() {
  that.backlogChannel.presence.enter({ name: 'Joe' });
});

The URL /realtime-token returns the following token request:

{"keyName":"T4FCEQ.gk_T5w","clientId":"1","ttl":3600000,"timestamp":1452719054195,"capability":"{\"*\":[\"*\"]}","nonce":"32258c73c4d68b6db539ef6808b5438f","mac":"M791zWcn16vWqmixn/3bmmeBn99LSQARnjTQ8zBRrC4="}

The error in the logs is:

ably.min.js:formatted:1863Ably: EventEmitter.emit(): Unexpected listener exception: Error: clientId must be specified to enter a presence channel; stack = Error: clientId must be specified to enter a presence channel
    at Error (native)
    at g.enter (http://cdn.ably.io/lib/ably.min.js:221:424)
    at Object.<anonymous> (http://localhost:3000/assets/views/backlog_presence_view.js?body=1:29:40)
    at g (http://cdn.ably.io/lib/ably.min.js:76:12)
    at e.emit (http://cdn.ably.io/lib/ably.min.js:78:373)
    at http://cdn.ably.io/lib/ably.min.js:198:43

It seems the Ably client library is not picking up the clientId from the ConnectionDetails correctly, although this may simply be caused by #195 so this can be ignored if that is the case. Feel free to close if it is definitely caused by that issue, which I expect it is.

Full log from console:

Ably: Rest(): started
2016-01-13 22:04:12.874 ably.min.js:formatted:1863Ably: Auth(): using token auth with authUrl
2016-01-13 22:04:12.875 ably.min.js:formatted:1863Ably: Realtime.ConnectionManager(): started
2016-01-13 22:04:12.876 ably.min.js:formatted:1863Ably: Realtime.ConnectionManager(): requested transports = [web_socket,xhr,iframe,jsonp]
2016-01-13 22:04:12.876 ably.min.js:formatted:1863Ably: Realtime.ConnectionManager(): available http transports = [xhr,iframe,jsonp]
2016-01-13 22:04:12.876 ably.min.js:formatted:1863Ably: Realtime.ConnectionManager(): available transports = [web_socket,xhr,iframe,jsonp]
2016-01-13 22:04:12.876 ably.min.js:formatted:1863Ably: Realtime.ConnectionManager(): http hosts = [rest.ably.io,A.ably-realtime.com,B.ably-realtime.com,C.ably-realtime.com]
2016-01-13 22:04:12.877 ably.min.js:formatted:1863Ably: Realtime.connect(): 
2016-01-13 22:04:12.877 ably.min.js:formatted:1863Ably: Connection.connect(): 
2016-01-13 22:04:12.878 ably.min.js:formatted:1863Ably: ConnectionManager.requestState(): requested state: connecting
2016-01-13 22:04:12.878 ably.min.js:formatted:1863Ably: ConnectionManager.cancelTransitionTimer(): 
2016-01-13 22:04:12.879 ably.min.js:formatted:1863Ably: ConnectionManager.enactStateChange: setting new state: connecting; reason = undefined
2016-01-13 22:04:12.880 ably.min.js:formatted:1863Ably: RealtimeChannel(): started; name = backlog-7344
2016-01-13 22:04:12.880 ably.min.js:formatted:1863Ably: Channel(): started; name = backlog-7344
2016-01-13 22:04:13.689 jquery.js?body=1:8383 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
2016-01-13 22:04:14.158 ably.min.js:formatted:1863Ably: ConnectionManager.connectImpl(): starting connection
2016-01-13 22:04:14.158 ably.min.js:formatted:1863Ably: ConnectionManager.startTransitionTimer(): transitionState: connecting
2016-01-13 22:04:14.159 ably.min.js:formatted:1863Ably: Auth.requestToken(): using token auth with auth_url
2016-01-13 22:04:14.160 ably.min.js:formatted:1863Ably: Auth.requestToken().tokenRequestCallback: Sending; /realtime-token; Params: {}
2016-01-13 22:04:14.451 ably.min.js:formatted:1863Ably: Auth.requestToken().tokenRequestCallback: Received; body: {"keyName":"T4FCEQ.gk_T5w","clientId":"1","ttl":3600000,"timestamp":1452719054195,"capability":"{\"*\":[\"*\"]}","nonce":"32258c73c4d68b6db539ef6808b5438f","mac":"M791zWcn16vWqmixn/3bmmeBn99LSQARnjTQ8zBRrC4="}
2016-01-13 22:04:14.452 ably.min.js:formatted:1863Ably: Auth.requestToken().requestToken: Sending POST; function (a){return u.baseUri(a)+"/keys/"+g+"/requestToken"}; Token params: {"keyName":"T4FCEQ.gk_T5w","clientId":"1","ttl":3600000,"timestamp":1452719054195,"capability":"{\"*\":[\"*\"]}","nonce":"32258c73c4d68b6db539ef6808b5438f","mac":"M791zWcn16vWqmixn/3bmmeBn99LSQARnjTQ8zBRrC4="}
2016-01-13 22:04:15.040 ably.min.js:formatted:1863Ably: Auth.getToken(): token received
2016-01-13 22:04:15.040 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransport(): 
2016-01-13 22:04:15.041 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransport(): Transport recovery mode = clean
2016-01-13 22:04:15.041 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransportForHost(): trying xhr
2016-01-13 22:04:15.042 ably.min.js:formatted:1863Ably: CometTransport.connect(): starting
2016-01-13 22:04:15.042 ably.min.js:formatted:1863Ably: CometTransport.connect(): uri: https://rest.ably.io:443/comet/connect
2016-01-13 22:04:15.043 ably.min.js:formatted:1863Ably: Auth.getToken(): using cached token; expires = 1452722655310
2016-01-13 22:04:15.044 ably.min.js:formatted:1863Ably: CometTransport.connect(): connectParams:?v=0.8&access_token=T4FCEQ.D49WsfppCWd886YsDlAdZbyVv10acjIHvpuS9I_RSHnbxJB8qhkWWYdhxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:15.271 ably.min.js:formatted:1863Ably: XHRTransport.tryConnect(): viable transport XHRTransport; uri=https://rest.ably.io:443/comet/; isConnected=false
2016-01-13 22:04:15.272 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransportForHost(): transport xhr connecting
2016-01-13 22:04:15.272 ably.min.js:formatted:1863Ably: ConnectionManager.setTransportPending(): transport = XHRTransport; uri=https://rest.ably.io:443/comet/; isConnected=false; mode = clean
2016-01-13 22:04:15.273 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransport(): Establishing http transport: XHRTransport; uri=https://rest.ably.io:443/comet/; isConnected=false
2016-01-13 22:04:15.274 ably.min.js:formatted:1863Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=CONNECTED; connectionId=TuMU90Vy5F; connectionKey=ac036!TuMU90Vy5FguJWel-5863ac036; connectionSerial=-1]
2016-01-13 22:04:15.274 ably.min.js:formatted:1863Ably: CometTransport.onConnect(): baseUri = https://rest.ably.io:443/comet/ac036!TuMU90Vy5FguJWel-5863ac036; connectionKey = TuMU90Vy5FguJWel-5863ac036
2016-01-13 22:04:15.275 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): transport = XHRTransport; uri=https://rest.ably.io:443/comet/; isConnected=true
2016-01-13 22:04:15.275 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionKey =  ac036!TuMU90Vy5FguJWel-5863ac036
2016-01-13 22:04:15.276 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionSerial =  -1
2016-01-13 22:04:15.276 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionId =  TuMU90Vy5F
2016-01-13 22:04:15.276 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): clientId =  1
2016-01-13 22:04:15.277 ably.min.js:formatted:1863Ably: ConnectionManager.notifyState(): new state: connected
2016-01-13 22:04:15.277 ably.min.js:formatted:1863Ably: ConnectionManager.cancelTransitionTimer(): 
2016-01-13 22:04:15.278 ably.min.js:formatted:1863Ably: ConnectionManager.enactStateChange: setting new state: connected; reason = undefined
2016-01-13 22:04:15.278 ably.min.js:formatted:1863Ably: ConnectionManager.sendQueuedMessages(): sending 0 queued messages
2016-01-13 22:04:15.279 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransport(): upgrading ... connectionKey = ac036!TuMU90Vy5FguJWel-5863ac036
2016-01-13 22:04:15.279 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransportForHost(): trying web_socket
2016-01-13 22:04:15.279 ably.min.js:formatted:1863Ably: WebSocketTransport.startConnectTimeout(): undefined
2016-01-13 22:04:15.280 ably.min.js:formatted:1863Ably: WebSocketTransport.connect(): starting
2016-01-13 22:04:15.280 ably.min.js:formatted:1863Ably: WebSocketTransport.connect(): uri: wss://realtime.ably.io:443/
2016-01-13 22:04:15.281 ably.min.js:formatted:1863Ably: Auth.getToken(): using cached token; expires = 1452722655310
2016-01-13 22:04:15.281 ably.min.js:formatted:1863Ably: WebSocketTransport.connect(): authParams: access_token: T4FCEQ.D49WsfppCWd886YsDlAdZbyVv10acjIHvpuS9I_RSHnbxJB8qhkWWYdhxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn;
2016-01-13 22:04:15.283 ably.min.js:formatted:1863Ably: EventEmitter.emit(): Unexpected listener exception: Error: clientId must be specified to enter a presence channel; stack = Error: clientId must be specified to enter a presence channel
    at Error (native)
    at g.enter (http://cdn.ably.io/lib/ably.min.js:221:424)
    at Object.<anonymous> (http://localhost:3000/assets/views/backlog_presence_view.js?body=1:29:40)
    at g (http://cdn.ably.io/lib/ably.min.js:76:12)
    at e.emit (http://cdn.ably.io/lib/ably.min.js:78:373)
    at http://cdn.ably.io/lib/ably.min.js:198:43
2016-01-13 22:04:16.693 ably.min.js:formatted:1863Ably: WebSocketTransport.onWsOpen(): opened WebSocket
2016-01-13 22:04:16.693 ably.min.js:formatted:1863Ably: WebSocketTransport.tryConnect(): viable transport WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.694 ably.min.js:formatted:1863Ably: ConnectionManager.chooseTransportForHost(): transport web_socket connecting
2016-01-13 22:04:16.694 ably.min.js:formatted:1863Ably: ConnectionManager.setTransportPending(): transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn; mode = upgrade
2016-01-13 22:04:16.695 ably.min.js:formatted:1863Ably: WebSocketTransport.onWsData(): data received; length = 307; type = string
2016-01-13 22:04:16.696 ably.min.js:formatted:1863Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=CONNECTED; connectionId=TuMU90Vy5F; connectionKey=TuMU90Vy5FguJWel-599e6d72c; connectionSerial=-1]
2016-01-13 22:04:16.696 ably.min.js:formatted:1863Ably: ConnectionManager.scheduleTransportActivation(): Scheduling transport; transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.697 ably.min.js:formatted:1863Ably: ConnectionManager.scheduleTransportActivation(): Activating transport; transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.697 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.697 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionKey =  ac036!TuMU90Vy5FguJWel-5863ac036
2016-01-13 22:04:16.697 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionSerial =  -1
2016-01-13 22:04:16.698 ably.min.js:formatted:1863Ably: ConnectionManager.activateTransport(): connectionId =  TuMU90Vy5F
2016-01-13 22:04:16.698 ably.min.js:formatted:1863Ably: ConnectionManager.notifyState(): new state: connected
2016-01-13 22:04:16.698 ably.min.js:formatted:1863Ably: CometTransport.disconnect(): 
2016-01-13 22:04:16.699 ably.min.js:formatted:1863Ably: CometTransport.requestClose(): closing = false
2016-01-13 22:04:16.700 ably.min.js:formatted:1863Ably: ConnectionManager.deactivateTransport(): transport = XHRTransport; uri=https://rest.ably.io:443/comet/; isConnected=false
2016-01-13 22:04:16.701 ably.min.js:formatted:1863Ably: ConnectionManager.deactivateTransport(): state = disconnected
2016-01-13 22:04:16.701 ably.min.js:formatted:1863Ably: ConnectionManager.deactivateTransport(): reason =  Connection to server temporarily unavailable
2016-01-13 22:04:16.702 ably.min.js:formatted:1863Ably: CometTransport.dispose(): 
2016-01-13 22:04:16.702 ably.min.js:formatted:1863Ably: CometTransport.dispose(): aborting recv request
2016-01-13 22:04:16.703 ably.min.js:formatted:1863Ably: Transport.onDisconnect(): err = undefined
2016-01-13 22:04:16.704 ably.min.js:formatted:1863Ably: ConnectionManager.scheduleTransportActivation(): Syncing transport; transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.793 ably.min.js:formatted:1863Ably: WebSocketTransport.onWsData(): data received; length = 63; type = string
2016-01-13 22:04:16.793 ably.min.js:formatted:1863Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=SYNC; connectionId=TuMU90Vy5F; connectionSerial=-1]
2016-01-13 22:04:16.793 ably.min.js:formatted:1863Ably: ConnectionManager.scheduleTransportActivation(): sync successful upgraded transport; transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn; connectionSerial = -1; connectionId = TuMU90Vy5F
2016-01-13 22:04:16.794 ably.min.js:formatted:1863Ably: ConnectionManager.scheduleTransportActivation(): Sending queued messages on upgraded transport; transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?upgrade=ac036!TuMU90Vy5FguJWel-5863ac036&format…hxkkdRbrw2cuz2pS5WUtrtRLsQ2K9ghBvaE9Ww1CZd1YIvcxY7jpa1EuOv9rELZJjF85URpchn
2016-01-13 22:04:16.794 ably.min.js:formatted:1863Ably: ConnectionManager.sendQueuedMessages(): sending 0 queued messages
2016-01-13 22:04:31.690 ably.min.js:formatted:1863 Ably: WebSocketTransport.onWsData(): data received; length = 12; type = string
2016-01-13 22:04:31.691 ably.min.js:formatted:1863 Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=HEARTBEAT]
2016-01-13 22:04:31.691 ably.min.js:formatted:1863 Ably: Transport.onProtocolMessage(): heartbeat; connectionKey = ac036!TuMU90Vy5FguJWel-5863ac036
@mattheworiordan mattheworiordan added bug Something isn't working. It's clear that this does need to be fixed. high priority labels Jan 13, 2016
@mattheworiordan
Copy link
Member Author

I don't think it's related to #195 actually, I configured the library to only use websockets, and I still get the error:

ably.min.js:79 Ably: Rest(): started
2016-01-13 22:10:31.496 ably.min.js:79 Ably: Auth(): using token auth with authUrl
2016-01-13 22:10:31.498 ably.min.js:79 Ably: Realtime.ConnectionManager(): started
2016-01-13 22:10:31.498 ably.min.js:79 Ably: Realtime.ConnectionManager(): requested transports = [web_socket]
2016-01-13 22:10:31.498 ably.min.js:79 Ably: Realtime.ConnectionManager(): available http transports = []
2016-01-13 22:10:31.499 ably.min.js:79 Ably: Realtime.ConnectionManager(): available transports = [web_socket]
2016-01-13 22:10:31.499 ably.min.js:79 Ably: Realtime.ConnectionManager(): http hosts = [rest.ably.io,A.ably-realtime.com,B.ably-realtime.com,C.ably-realtime.com]
2016-01-13 22:10:31.499 ably.min.js:79 Ably: Realtime.connect(): 
2016-01-13 22:10:31.500 ably.min.js:79 Ably: Connection.connect(): 
2016-01-13 22:10:31.500 ably.min.js:79 Ably: ConnectionManager.requestState(): requested state: connecting
2016-01-13 22:10:31.500 ably.min.js:79 Ably: ConnectionManager.cancelTransitionTimer(): 
2016-01-13 22:10:31.501 ably.min.js:79 Ably: ConnectionManager.enactStateChange: setting new state: connecting; reason = undefined
2016-01-13 22:10:31.501 ably.min.js:79 Ably: RealtimeChannel(): started; name = backlog-7344
2016-01-13 22:10:31.502 ably.min.js:79 Ably: Channel(): started; name = backlog-7344
2016-01-13 22:10:32.287 jquery.js?body=1:8383 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
2016-01-13 22:10:32.814 ably.min.js:79 Ably: ConnectionManager.connectImpl(): starting connection
2016-01-13 22:10:32.815 ably.min.js:79 Ably: ConnectionManager.startTransitionTimer(): transitionState: connecting
2016-01-13 22:10:32.816 ably.min.js:79 Ably: Auth.requestToken(): using token auth with auth_url
2016-01-13 22:10:32.816 ably.min.js:79 Ably: Auth.requestToken().tokenRequestCallback: Sending; /realtime-token; Params: {}
2016-01-13 22:10:33.216 ably.min.js:79 Ably: Auth.requestToken().tokenRequestCallback: Received; body: {"keyName":"T4FCEQ.gk_T5w","clientId":"1","ttl":3600000,"timestamp":1452719432848,"capability":"{\"*\":[\"*\"]}","nonce":"ab29fe3fa1e241fee459da398e43b16b","mac":"OxljUB/FlPhTg4oWVAg2kTuDmhnHxKCNfmLcG825hIY="}
2016-01-13 22:10:33.217 ably.min.js:79 Ably: Auth.requestToken().requestToken: Sending POST; function (a){return u.baseUri(a)+"/keys/"+g+"/requestToken"}; Token params: {"keyName":"T4FCEQ.gk_T5w","clientId":"1","ttl":3600000,"timestamp":1452719432848,"capability":"{\"*\":[\"*\"]}","nonce":"ab29fe3fa1e241fee459da398e43b16b","mac":"OxljUB/FlPhTg4oWVAg2kTuDmhnHxKCNfmLcG825hIY="}
2016-01-13 22:10:34.591 ably.min.js:79 Ably: Auth.getToken(): token received
2016-01-13 22:10:34.592 ably.min.js:79 Ably: ConnectionManager.chooseTransport(): 
2016-01-13 22:10:34.592 ably.min.js:79 Ably: ConnectionManager.chooseTransport(): Transport recovery mode = clean
2016-01-13 22:10:34.593 ably.min.js:79 Ably: ConnectionManager.chooseTransport(): No http transports available; ignoring fallback hosts
2016-01-13 22:10:34.593 ably.min.js:79 Ably: ConnectionManager.chooseTransportForHost(): trying web_socket
2016-01-13 22:10:34.594 ably.min.js:79 Ably: WebSocketTransport.startConnectTimeout(): undefined
2016-01-13 22:10:34.594 ably.min.js:79 Ably: WebSocketTransport.connect(): starting
2016-01-13 22:10:34.594 ably.min.js:79 Ably: WebSocketTransport.connect(): uri: wss://realtime.ably.io:443/
2016-01-13 22:10:34.595 ably.min.js:79 Ably: Auth.getToken(): using cached token; expires = 1452723034555
2016-01-13 22:10:34.595 ably.min.js:79 Ably: WebSocketTransport.connect(): authParams: access_token: T4FCEQ.D0umNH2YqlNGpsPN-hR6_ibIa3RdDZ-qHQfotECgbJ70pLDT2dYm2x6hDcI2eWgsKSJHlLCwulfibrG9oUsyq4fGRtaTFBx52Wa4hW8y_w_5V_ao1K5M3UnugRkFLx5iG;
2016-01-13 22:10:36.501 ably.min.js:79 Ably: WebSocketTransport.onWsOpen(): opened WebSocket
2016-01-13 22:10:36.502 ably.min.js:79 Ably: WebSocketTransport.tryConnect(): viable transport WebSocketTransport; uri=wss://realtime.ably.io:443/?format=json&v=0.8&access_token=T4FCEQ.D0umNH2Yq…hDcI2eWgsKSJHlLCwulfibrG9oUsyq4fGRtaTFBx52Wa4hW8y_w_5V_ao1K5M3UnugRkFLx5iG
2016-01-13 22:10:36.503 ably.min.js:79 Ably: ConnectionManager.chooseTransportForHost(): transport web_socket connecting
2016-01-13 22:10:36.504 ably.min.js:79 Ably: ConnectionManager.setTransportPending(): transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?format=json&v=0.8&access_token=T4FCEQ.D0umNH2Yq…hDcI2eWgsKSJHlLCwulfibrG9oUsyq4fGRtaTFBx52Wa4hW8y_w_5V_ao1K5M3UnugRkFLx5iG; mode = clean
2016-01-13 22:10:36.504 ably.min.js:79 Ably: WebSocketTransport.onWsData(): data received; length = 307; type = string
2016-01-13 22:10:36.506 ably.min.js:79 Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=CONNECTED; connectionId=e_Kuo8J0Xy; connectionKey=e_Kuo8J0XyW0Kh3h-59e30dc86; connectionSerial=-1]
2016-01-13 22:10:36.506 ably.min.js:79 Ably: ConnectionManager.activateTransport(): transport = WebSocketTransport; uri=wss://realtime.ably.io:443/?format=json&v=0.8&access_token=T4FCEQ.D0umNH2Yq…hDcI2eWgsKSJHlLCwulfibrG9oUsyq4fGRtaTFBx52Wa4hW8y_w_5V_ao1K5M3UnugRkFLx5iG
2016-01-13 22:10:36.507 ably.min.js:79 Ably: ConnectionManager.activateTransport(): connectionKey =  e_Kuo8J0XyW0Kh3h-59e30dc86
2016-01-13 22:10:36.507 ably.min.js:79 Ably: ConnectionManager.activateTransport(): connectionSerial =  -1
2016-01-13 22:10:36.507 ably.min.js:79 Ably: ConnectionManager.activateTransport(): connectionId =  e_Kuo8J0Xy
2016-01-13 22:10:36.507 ably.min.js:79 Ably: ConnectionManager.activateTransport(): clientId =  1
2016-01-13 22:10:36.509 ably.min.js:79 Ably: ConnectionManager.notifyState(): new state: connected
2016-01-13 22:10:36.509 ably.min.js:79 Ably: ConnectionManager.cancelTransitionTimer(): 
2016-01-13 22:10:36.510 ably.min.js:79 Ably: ConnectionManager.enactStateChange: setting new state: connected; reason = undefined
2016-01-13 22:10:36.510 ably.min.js:79 Ably: ConnectionManager.sendQueuedMessages(): sending 0 queued messages
2016-01-13 22:10:36.513 ably.min.js:79 Ably: EventEmitter.emit(): Unexpected listener exception: Error: clientId must be specified to enter a presence channel; stack = Error: clientId must be specified to enter a presence channel
    at Error (native)
    at g.enter (http://cdn.ably.io/lib/ably.min.js:221:424)
    at Object.<anonymous> (http://localhost:3000/assets/views/backlog_presence_view.js?body=1:29:40)
    at g (http://cdn.ably.io/lib/ably.min.js:76:12)
    at e.emit (http://cdn.ably.io/lib/ably.min.js:78:373)
    at http://cdn.ably.io/lib/ably.min.js:198:43
2016-01-13 22:10:51.180 ably.min.js:79 Ably: WebSocketTransport.onWsData(): data received; length = 12; type = string
2016-01-13 22:10:51.181 ably.min.js:79 Ably: Transport.onProtocolMessage(): received; [ProtocolMessage; action=HEARTBEAT]
2016-01-13 22:10:51.181 ably.min.js:79 Ably: Transport.onProtocolMessage(): heartbeat; connectionKey = e_Kuo8J0XyW0Kh3h-59e30dc86

@SimonWoolf
Copy link
Member

Ah. All the clientid inheritance tests we added were checking that auth.clientId was set correctly, I never thought to check that auth.clientId was where realtimepresence was actually getting its clientId from 😞

PR #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

No branches or pull requests

2 participants