{"action":"opened","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1497","repository_url":"https://api.github.com/repos/mitmproxy/mitmproxy","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1497/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1497/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1497/events","html_url":"https://github.com/mitmproxy/mitmproxy/issues/1497","id":172333046,"number":1497,"title":"mitmdump crashes on start of server-replay: KeyError: 'marked'","user":{"login":"markus-kusano","id":4606345,"avatar_url":"https://avatars.githubusercontent.com/u/4606345?v=3","gravatar_id":"","url":"https://api.github.com/users/markus-kusano","html_url":"https://github.com/markus-kusano","followers_url":"https://api.github.com/users/markus-kusano/followers","following_url":"https://api.github.com/users/markus-kusano/following{/other_user}","gists_url":"https://api.github.com/users/markus-kusano/gists{/gist_id}","starred_url":"https://api.github.com/users/markus-kusano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus-kusano/subscriptions","organizations_url":"https://api.github.com/users/markus-kusano/orgs","repos_url":"https://api.github.com/users/markus-kusano/repos","events_url":"https://api.github.com/users/markus-kusano/events{/privacy}","received_events_url":"https://api.github.com/users/markus-kusano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-21T18:10:58Z","updated_at":"2016-08-21T18:10:58Z","closed_at":null,"body":"[rec.zip](https://github.com/mitmproxy/mitmproxy/files/428987/rec.zip)\r\n\r\n##### Steps to reproduce the problem:\r\n\r\n1. Run mitmdump with the attached recording: `mitmdump --server-replay findastation.out`\r\n2. An exception is thrown:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/markus/src/mitmproxy/venv3.5/bin/mitmdump\", line 11, in <module>\r\n    load_entry_point('mitmproxy', 'console_scripts', 'mitmdump')()\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/main.py\", line 102, in mitmdump\r\n    master = dump.DumpMaster(server, dump_options)\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/dump.py\", line 64, in __init__\r\n    self._readflow(options.server_replay),\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/dump.py\", line 96, in _readflow\r\n    return flow.read_flows_from_paths(paths)\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/flow/io.py\", line 83, in read_flows_from_paths\r\n    flows.extend(FlowReader(f).stream())\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/flow/io.py\", line 49, in stream\r\n    yield models.FLOW_TYPES[data[\"type\"]].from_state(data)\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/models/flow.py\", line 112, in from_state\r\n    f.set_state(state)\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/models/flow.py\", line 107, in set_state\r\n    super(Flow, self).set_state(state)\r\n  File \"/home/markus/src/mitmproxy/mitmproxy/stateobject.py\", line 55, in set_state\r\n    val = state.pop(attr)\r\nKeyError: 'marked'\r\n```\r\n\r\n##### What is the expected behavior?\r\n\r\n`mitmdump` continues running and the replayed page is served\r\n\r\n\r\n##### Any other comments? What have you tried so far?\r\n\r\nNote that this is a recording made with an olderversion of mitmproxy, probably from about 2 months ago. Other recordings do not crash similarly.\r\n\r\nRunning on commit 62ab2f2fd5188f31e99560dce788ba85c2933a1a with Python 3.5 on Linux.\r\n\r\nThanks :)\r\n\r\n<!-- Please use the mitmproxy forums (https://discourse.mitmproxy.org/) for support/how-to questions. Thanks! :) -->\r\n"}}
{"actor":{"display_login":"markus-kusano"}}