{"action":"created","issue":{"url":"https://api.github.com/repos/assaf/zombie/issues/751","labels_url":"https://api.github.com/repos/assaf/zombie/issues/751/labels{/name}","comments_url":"https://api.github.com/repos/assaf/zombie/issues/751/comments","events_url":"https://api.github.com/repos/assaf/zombie/issues/751/events","html_url":"https://github.com/assaf/zombie/issues/751","id":42029668,"number":751,"title":"browser.visit() breaks","user":{"login":"beshur","id":532273,"avatar_url":"https://avatars.githubusercontent.com/u/532273?v=3","gravatar_id":"","url":"https://api.github.com/users/beshur","html_url":"https://github.com/beshur","followers_url":"https://api.github.com/users/beshur/followers","following_url":"https://api.github.com/users/beshur/following{/other_user}","gists_url":"https://api.github.com/users/beshur/gists{/gist_id}","starred_url":"https://api.github.com/users/beshur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beshur/subscriptions","organizations_url":"https://api.github.com/users/beshur/orgs","repos_url":"https://api.github.com/users/beshur/repos","events_url":"https://api.github.com/users/beshur/events{/privacy}","received_events_url":"https://api.github.com/users/beshur/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/assaf/zombie/labels/Valid","name":"Valid","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-09-05T09:34:26Z","updated_at":"2016-01-19T18:20:21Z","closed_at":"2014-09-25T21:21:00Z","body":"Hi.\r\n\r\nI'm using Zombie with Mocha to test my project.\r\n\r\nIn one of the tests I'm making a `browser.visit()` call. In fact it works and does everything that it should, but also throws such an error which eventually breaks the test (also breaks subsequent timeout):\r\n\r\n```\r\n    Uncaught TypeError: Cannot read property '2' of null\r\n     at EventQueue.clearTimeout (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/lib/zombie/eventloop.js:277:24)\r\n     at SocketConnection.processReply (<anonymous>:147:11)\r\n     at WebSocket.SocketConnection.socket.onmessage (<anonymous>:31:9)\r\n     at WebSocket.onMessage (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/WebSocket.js:360:18)\r\n     at WebSocket.EventEmitter.emit (events.js:98:17)\r\n     at Receiver.self._receiver.ontext (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/WebSocket.js:697:1\r\n)\r\n     at Receiver.opcodes.1.finish (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/Receiver.js:397:14)\r\n     at Receiver.expectHandler (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/Receiver.js:384:31)\r\n     at Receiver.add (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/Receiver.js:93:24)\r\n     at Socket.firstHandler (/home/linups/Documents/ezlo/euser-on-express/tests/node_modules/zombie/node_modules/ws/lib/WebSocket.js:678:22)\r\n     at Socket.EventEmitter.emit (events.js:95:17)\r\n     at Socket.<anonymous> (_stream_readable.js:746:14)\r\n     at Socket.EventEmitter.emit (events.js:92:17)\r\n     at emitReadable_ (_stream_readable.js:408:10)\r\n     at emitReadable (_stream_readable.js:404:5)\r\n     at readableAddChunk (_stream_readable.js:165:9)\r\n     at Socket.Readable.push (_stream_readable.js:127:10)\r\n     at TCP.onread (net.js:526:21)\r\n```\r\n\r\nUsing `browser.clickLink()` instead now."},"comment":{"url":"https://api.github.com/repos/assaf/zombie/issues/comments/172939893","html_url":"https://github.com/assaf/zombie/issues/751#issuecomment-172939893","issue_url":"https://api.github.com/repos/assaf/zombie/issues/751","id":172939893,"user":{"login":"assaf","id":5158,"avatar_url":"https://avatars.githubusercontent.com/u/5158?v=3","gravatar_id":"","url":"https://api.github.com/users/assaf","html_url":"https://github.com/assaf","followers_url":"https://api.github.com/users/assaf/followers","following_url":"https://api.github.com/users/assaf/following{/other_user}","gists_url":"https://api.github.com/users/assaf/gists{/gist_id}","starred_url":"https://api.github.com/users/assaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assaf/subscriptions","organizations_url":"https://api.github.com/users/assaf/orgs","repos_url":"https://api.github.com/users/assaf/repos","events_url":"https://api.github.com/users/assaf/events{/privacy}","received_events_url":"https://api.github.com/users/assaf/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T18:20:20Z","updated_at":"2016-01-19T18:20:20Z","body":"TL;DR don't expect the browser to do anything after you destroy it.\r\n\r\nThe browser will not wait for anything to happen on the socket, the sockets are not yet integrated into the event loop."}}