{"action":"created","issue":{"url":"https://api.github.com/repos/karma-runner/karma/issues/1098","labels_url":"https://api.github.com/repos/karma-runner/karma/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/karma-runner/karma/issues/1098/comments","events_url":"https://api.github.com/repos/karma-runner/karma/issues/1098/events","html_url":"https://github.com/karma-runner/karma/pull/1098","id":35504917,"number":1098,"title":"fix: catch exceptions from SourceMapConsumer","user":{"login":"afischer-sfly","id":5973591,"avatar_url":"https://avatars.githubusercontent.com/u/5973591?v=3","gravatar_id":"","url":"https://api.github.com/users/afischer-sfly","html_url":"https://github.com/afischer-sfly","followers_url":"https://api.github.com/users/afischer-sfly/followers","following_url":"https://api.github.com/users/afischer-sfly/following{/other_user}","gists_url":"https://api.github.com/users/afischer-sfly/gists{/gist_id}","starred_url":"https://api.github.com/users/afischer-sfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afischer-sfly/subscriptions","organizations_url":"https://api.github.com/users/afischer-sfly/orgs","repos_url":"https://api.github.com/users/afischer-sfly/repos","events_url":"https://api.github.com/users/afischer-sfly/events{/privacy}","received_events_url":"https://api.github.com/users/afischer-sfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-06-11T17:07:40Z","updated_at":"2015-03-26T20:30:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/karma-runner/karma/pulls/1098","html_url":"https://github.com/karma-runner/karma/pull/1098","diff_url":"https://github.com/karma-runner/karma/pull/1098.diff","patch_url":"https://github.com/karma-runner/karma/pull/1098.patch"},"body":"The symptom of this issue is that the test runner will die with the following error:\r\n\r\n    Fatal error: Line must be greater than or equal to 1, got 0\r\n\r\nThe way the error happened:\r\n\r\n1) One of my specs was failing when calling getComputedStyle(). In Firefox this resulted in an error message with some weird formatting: \"TypeError: Argument 1 of Window.getComputedStyle does not implement interface Element. in http://172.20.132.80:8080/base/app/SilverApp/services/DragAvatarProducer.js?dc125e476a15c0e2f62b00901b3d0c1b6c407af8 (line 85)\". The problem with that string is the line number is formatted \"(line 85)\" when it should be like \":85:7\". This might be a bug against Firefox.\r\n2) Karma's source-map support tried to parse the line & column, but couldn't because the formatting was weird. (see: https://github.com/karma-runner/karma/blob/master/lib/reporter.js#L36 )\r\n3) Karma uses defaults of 0 for the line & column numbers. (see: https://github.com/karma-runner/karma/blob/master/lib/reporter.js#L45 )\r\n4) The source-map library throws an exception if line or column is 0. (see: https://github.com/mozilla/source-map/blob/master/lib/source-map/source-map-consumer.js#L277 )\r\n\r\nThis pull request wraps `SourceMapConsumer.originalPositionFor` in a try-catch block."},"comment":{"url":"https://api.github.com/repos/karma-runner/karma/issues/comments/86702053","html_url":"https://github.com/karma-runner/karma/pull/1098#issuecomment-86702053","issue_url":"https://api.github.com/repos/karma-runner/karma/issues/1098","id":86702053,"user":{"login":"maksimr","id":616193,"avatar_url":"https://avatars.githubusercontent.com/u/616193?v=3","gravatar_id":"","url":"https://api.github.com/users/maksimr","html_url":"https://github.com/maksimr","followers_url":"https://api.github.com/users/maksimr/followers","following_url":"https://api.github.com/users/maksimr/following{/other_user}","gists_url":"https://api.github.com/users/maksimr/gists{/gist_id}","starred_url":"https://api.github.com/users/maksimr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksimr/subscriptions","organizations_url":"https://api.github.com/users/maksimr/orgs","repos_url":"https://api.github.com/users/maksimr/repos","events_url":"https://api.github.com/users/maksimr/events{/privacy}","received_events_url":"https://api.github.com/users/maksimr/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T20:30:26Z","updated_at":"2015-03-26T20:30:26Z","body":"LGTM"}}