{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/14422","repository_url":"https://api.github.com/repos/ariya/phantomjs","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/14422/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/14422/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/14422/events","html_url":"https://github.com/ariya/phantomjs/issues/14422","id":167073548,"number":14422,"title":"JavaScript in target page causes evaluation errors","user":{"login":"steenbras","id":20600214,"avatar_url":"https://avatars0.githubusercontent.com/u/20600214?v=4","gravatar_id":"","url":"https://api.github.com/users/steenbras","html_url":"https://github.com/steenbras","followers_url":"https://api.github.com/users/steenbras/followers","following_url":"https://api.github.com/users/steenbras/following{/other_user}","gists_url":"https://api.github.com/users/steenbras/gists{/gist_id}","starred_url":"https://api.github.com/users/steenbras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steenbras/subscriptions","organizations_url":"https://api.github.com/users/steenbras/orgs","repos_url":"https://api.github.com/users/steenbras/repos","events_url":"https://api.github.com/users/steenbras/events{/privacy}","received_events_url":"https://api.github.com/users/steenbras/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-22T15:39:55Z","updated_at":"2017-09-01T11:46:04Z","closed_at":null,"author_association":"NONE","body":"Using PhantomJS v 2.1.1\n\nOn v 2.1.1 on OS/X it works, but on Ubuntu in a Docker container I have failures. The page I am trying to render is on MixPanel and I get the error using a simple grab script:\n\n`var page = require('webpage').create();\npage.open(\"https://mixpanel.com/report/\", function() {\n  page.render('/page.png');\n  phantom.exit();\n});`\n\nOutput is as follows:\n\n```\n# phantomjs grab.js \nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:96\nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:168 in global code\nTypeError: undefined is not an object (evaluating 'mp.report.init_tracking')\n\n  https://mixpanel.com/login/?next=/report/:239 in global code\nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:257 in global code\nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:267 in global code\nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:334 in global code\nReferenceError: Can't find variable: $\n\n  https://mixpanel.com/login/?next=/report/:338 in global code\n```\n\nOperating system is Ubuntu 16.04 Xenial LTS, running in a Docker container I built using the ubuntu:16.04 image\n\nI used the prebuilt binary and built from source, got the same result.\n"},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/326560222","html_url":"https://github.com/ariya/phantomjs/issues/14422#issuecomment-326560222","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/14422","id":326560222,"user":{"login":"yogesh-desai","id":7662633,"avatar_url":"https://avatars0.githubusercontent.com/u/7662633?v=4","gravatar_id":"","url":"https://api.github.com/users/yogesh-desai","html_url":"https://github.com/yogesh-desai","followers_url":"https://api.github.com/users/yogesh-desai/followers","following_url":"https://api.github.com/users/yogesh-desai/following{/other_user}","gists_url":"https://api.github.com/users/yogesh-desai/gists{/gist_id}","starred_url":"https://api.github.com/users/yogesh-desai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogesh-desai/subscriptions","organizations_url":"https://api.github.com/users/yogesh-desai/orgs","repos_url":"https://api.github.com/users/yogesh-desai/repos","events_url":"https://api.github.com/users/yogesh-desai/events{/privacy}","received_events_url":"https://api.github.com/users/yogesh-desai/received_events","type":"User","site_admin":false},"created_at":"2017-09-01T11:46:04Z","updated_at":"2017-09-01T11:46:04Z","author_association":"NONE","body":"Thank you @Vitallium. and @steenbras. This helped me a lot."}}
{"actor":{"display_login":"yogesh-desai"}}