{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/3361","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/3361/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/3361/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/3361/events","html_url":"https://github.com/bokeh/bokeh/issues/3361","id":122614331,"number":3361,"title":"Opening same session of sliders example in two tabs breaks","user":{"login":"havocp","id":218689,"avatar_url":"https://avatars.githubusercontent.com/u/218689?v=3","gravatar_id":"","url":"https://api.github.com/users/havocp","html_url":"https://github.com/havocp","followers_url":"https://api.github.com/users/havocp/followers","following_url":"https://api.github.com/users/havocp/following{/other_user}","gists_url":"https://api.github.com/users/havocp/gists{/gist_id}","starred_url":"https://api.github.com/users/havocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havocp/subscriptions","organizations_url":"https://api.github.com/users/havocp/orgs","repos_url":"https://api.github.com/users/havocp/repos","events_url":"https://api.github.com/users/havocp/events{/privacy}","received_events_url":"https://api.github.com/users/havocp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20bug","name":"type: bug","color":"C02942"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bokeh/bokeh/milestones/22","html_url":"https://github.com/bokeh/bokeh/milestones/0.11.0","labels_url":"https://api.github.com/repos/bokeh/bokeh/milestones/22/labels","id":1320524,"number":22,"title":"0.11.0","description":"","creator":{"login":"mattpap","id":27475,"avatar_url":"https://avatars.githubusercontent.com/u/27475?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpap","html_url":"https://github.com/mattpap","followers_url":"https://api.github.com/users/mattpap/followers","following_url":"https://api.github.com/users/mattpap/following{/other_user}","gists_url":"https://api.github.com/users/mattpap/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpap/subscriptions","organizations_url":"https://api.github.com/users/mattpap/orgs","repos_url":"https://api.github.com/users/mattpap/repos","events_url":"https://api.github.com/users/mattpap/events{/privacy}","received_events_url":"https://api.github.com/users/mattpap/received_events","type":"User","site_admin":false},"open_issues":47,"closed_issues":362,"state":"open","created_at":"2015-09-23T15:04:43Z","updated_at":"2015-12-30T22:45:31Z","due_on":"2015-12-31T06:00:00Z","closed_at":null},"comments":6,"created_at":"2015-12-16T22:06:43Z","updated_at":"2015-12-30T22:56:53Z","closed_at":null,"body":"* be sure you have the fix in https://github.com/bokeh/bokeh/pull/3356 so the error fixed there won't confuse the issue\r\n* Run `bokeh serve examples/app/sliders.py`\r\n* Open two tabs to `http://localhost:5006/sliders?bokeh-session-id=foo` (so they have the same session)\r\n* it is not necessary to interact with the app in any way\r\n\r\nIt is not typical to use the same session in two tabs, but in some local-notebook kind of scenarios we might do the equivalent, and in any case if our code is correct this should work.\r\n\r\nThe errors look like:\r\n\r\n```\r\nDEBUG:bokeh.server.session:Sending pull-doc-reply from session 'foo'\r\nERROR:bokeh.server.protocol.server_handler:error handling message Message 'PATCH-DOC' (revision 1): RuntimeError('Cannot apply patch to Span-108FAC630C8C4966B57ABC4D2A36DD8D which is not in the document',)\r\nDEBUG:bokeh.server.protocol.server_handler:  message header {'msgid': 'D2F4C9324B2747FC9A4006260D55EED6', 'msgtype': 'PATCH-DOC'} content {'references': [], 'events': [{'new': 'canvas', 'attr': 'render_mode', 'kind': 'ModelChanged', 'model': {'type': 'Span', 'id': 'Span-108FAC630C8C4966B57ABC4D2A36DD8D'}}]}\r\nTraceback (most recent call last):\r\n  File \"/home/hp/checkout/bokeh/bokeh/server/protocol/server_handler.py\", line 38, in handle\r\n    work = yield handler(message, connection)\r\n  File \"/home/hp/bin/Anaconda-2.2.0/envs/py3/lib/python3.4/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/home/hp/bin/Anaconda-2.2.0/envs/py3/lib/python3.4/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"<string>\", line 3, in raise_exc_info\r\n  File \"/home/hp/bin/Anaconda-2.2.0/envs/py3/lib/python3.4/site-packages/tornado/gen.py\", line 1017, in run\r\n    yielded = self.gen.send(value)\r\n  File \"/home/hp/checkout/bokeh/bokeh/server/session.py\", line 36, in _needs_document_lock_wrapper\r\n    result = func(self, *args, **kwargs)\r\n  File \"/home/hp/checkout/bokeh/bokeh/server/session.py\", line 255, in _handle_patch\r\n    message.apply_to_document(self.document)\r\n  File \"/home/hp/checkout/bokeh/bokeh/server/protocol/messages/patch_doc.py\", line 80, in apply_to_document\r\n    doc.apply_json_patch(self.content)\r\n  File \"/home/hp/checkout/bokeh/bokeh/document.py\", line 682, in apply_json_patch\r\n    raise RuntimeError(\"Cannot apply patch to %s which is not in the document\" % (str(patched_id)))\r\nRuntimeError: Cannot apply patch to Span-108FAC630C8C4966B57ABC4D2A36DD8D which is not in the document\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/168090959","html_url":"https://github.com/bokeh/bokeh/issues/3361#issuecomment-168090959","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/3361","id":168090959,"user":{"login":"fpliger","id":1084690,"avatar_url":"https://avatars.githubusercontent.com/u/1084690?v=3","gravatar_id":"","url":"https://api.github.com/users/fpliger","html_url":"https://github.com/fpliger","followers_url":"https://api.github.com/users/fpliger/followers","following_url":"https://api.github.com/users/fpliger/following{/other_user}","gists_url":"https://api.github.com/users/fpliger/gists{/gist_id}","starred_url":"https://api.github.com/users/fpliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpliger/subscriptions","organizations_url":"https://api.github.com/users/fpliger/orgs","repos_url":"https://api.github.com/users/fpliger/repos","events_url":"https://api.github.com/users/fpliger/events{/privacy}","received_events_url":"https://api.github.com/users/fpliger/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T22:56:53Z","updated_at":"2015-12-30T22:56:53Z","body":"@havocp this seems to still be broken.. I get a `TypeError: Cannot read property 'add_edit_variable' of undefined` on the JS console."}}