{"action":"created","issue":{"url":"https://api.github.com/repos/gimite/web-socket-js/issues/159","labels_url":"https://api.github.com/repos/gimite/web-socket-js/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/gimite/web-socket-js/issues/159/comments","events_url":"https://api.github.com/repos/gimite/web-socket-js/issues/159/events","html_url":"https://github.com/gimite/web-socket-js/issues/159","id":77187128,"number":159,"title":"Security violation in processEvents()","user":{"login":"borisreitman","id":408599,"avatar_url":"https://avatars.githubusercontent.com/u/408599?v=3","gravatar_id":"","url":"https://api.github.com/users/borisreitman","html_url":"https://github.com/borisreitman","followers_url":"https://api.github.com/users/borisreitman/followers","following_url":"https://api.github.com/users/borisreitman/following{/other_user}","gists_url":"https://api.github.com/users/borisreitman/gists{/gist_id}","starred_url":"https://api.github.com/users/borisreitman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisreitman/subscriptions","organizations_url":"https://api.github.com/users/borisreitman/orgs","repos_url":"https://api.github.com/users/borisreitman/repos","events_url":"https://api.github.com/users/borisreitman/events{/privacy}","received_events_url":"https://api.github.com/users/borisreitman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-17T02:21:17Z","updated_at":"2015-11-05T09:02:02Z","closed_at":null,"body":"I have flash debug player version installed: 17.0.0.188, testing on IE9.\r\n\r\nI get the error of Security violation trying to access \"unknown\", in ExternalInterface call, in processEvent(). It is hard to reproduce, and I didn't copy exact error. I found the same kind of error posted by someone else:\r\n\r\n```\r\nSecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://example.com/path/my.swf cannot access <unknown>.\r\nat flash.external::ExternalInterface$/_evalJS()\r\nat flash.external::ExternalInterface$/call()\r\n```\r\n\r\nHere's a suggested patch:\r\n\r\n```\r\ndiff --git a/flash-src/src/net/gimite/websocket/WebSocketMain.as b/flash-src/src/net/gimite/websocket/WebSocketMa\r\nindex 3daa572..9839984 100644\r\n--- a/flash-src/src/net/gimite/websocket/WebSocketMain.as\r\n+++ b/flash-src/src/net/gimite/websocket/WebSocketMain.as\r\n@@ -150,8 +150,12 @@ public class WebSocketMain extends Sprite implements IWebSocketLogger{\r\n    */\r\n   public function processEvents():void {\r\n     if (eventQueue.length == 0) return;\r\n-    if (!ExternalInterface.call(\"WebSocket.__onFlashEvent\")) {\r\n-      setTimeout(processEvents, 500);\r\n+    try {\r\n+      if (!ExternalInterface.call(\"WebSocket.__onFlashEvent\")) {\r\n+        setTimeout(processEvents, 500);\r\n+      }\r\n+    } catch(e:SecurityError){\r\n+      trace(\"caught SecurityError when trying to processEvents. Not retrying again.\");\r\n     }\r\n   }\r\n```"},"comment":{"url":"https://api.github.com/repos/gimite/web-socket-js/issues/comments/153994432","html_url":"https://github.com/gimite/web-socket-js/issues/159#issuecomment-153994432","issue_url":"https://api.github.com/repos/gimite/web-socket-js/issues/159","id":153994432,"user":{"login":"yangfan1122","id":11402675,"avatar_url":"https://avatars.githubusercontent.com/u/11402675?v=3","gravatar_id":"","url":"https://api.github.com/users/yangfan1122","html_url":"https://github.com/yangfan1122","followers_url":"https://api.github.com/users/yangfan1122/followers","following_url":"https://api.github.com/users/yangfan1122/following{/other_user}","gists_url":"https://api.github.com/users/yangfan1122/gists{/gist_id}","starred_url":"https://api.github.com/users/yangfan1122/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangfan1122/subscriptions","organizations_url":"https://api.github.com/users/yangfan1122/orgs","repos_url":"https://api.github.com/users/yangfan1122/repos","events_url":"https://api.github.com/users/yangfan1122/events{/privacy}","received_events_url":"https://api.github.com/users/yangfan1122/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T09:02:02Z","updated_at":"2015-11-05T09:02:02Z","body":"About the SecurityError, it works well now? I got a same problem"}}