{"action":"created","issue":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/2279","repository_url":"https://api.github.com/repos/scala-js/scala-js","labels_url":"https://api.github.com/repos/scala-js/scala-js/issues/2279/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/2279/comments","events_url":"https://api.github.com/repos/scala-js/scala-js/issues/2279/events","html_url":"https://github.com/scala-js/scala-js/issues/2279","id":138778980,"number":2279,"title":"requiring angular causes phantomJS to crash without help on debugging.","user":{"login":"axos88","id":1281218,"avatar_url":"https://avatars.githubusercontent.com/u/1281218?v=3","gravatar_id":"","url":"https://api.github.com/users/axos88","html_url":"https://github.com/axos88","followers_url":"https://api.github.com/users/axos88/followers","following_url":"https://api.github.com/users/axos88/following{/other_user}","gists_url":"https://api.github.com/users/axos88/gists{/gist_id}","starred_url":"https://api.github.com/users/axos88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axos88/subscriptions","organizations_url":"https://api.github.com/users/axos88/orgs","repos_url":"https://api.github.com/users/axos88/repos","events_url":"https://api.github.com/users/axos88/events{/privacy}","received_events_url":"https://api.github.com/users/axos88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-06T10:08:42Z","updated_at":"2016-06-04T16:32:14Z","closed_at":null,"body":"Starting from https://github.com/sjrd/scala-js-example-app, upgrading to latest scalajs (0.6.7) and adding this to the build.sbt:\r\n```\r\njsDependencies ++= Seq(\r\n    RuntimeDOM\r\n    ,\"org.webjars.bower\" % \"angular\" % \"1.4.9\" / \"angular.js\"\r\n  )\r\n\r\nscalaJSUseRhino in Global := false\r\n```\r\n\r\nCauses sbt test to fail: \r\n\r\n```\r\nakovanm0:scala-js-example-app avandra$ sbt test\r\n[info] Loading project definition from projects/scala-js-example-app/project\r\n[info] Set current project to Example (in build file:projects/scala-js-example-app/)\r\norg.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2\r\n\tat org.scalajs.jsenv.ExternalJSEnv$AbstractExtRunner.waitForVM(ExternalJSEnv.scala:110)\r\n\tat org.scalajs.jsenv.ExternalJSEnv$ExtRunner.run(ExternalJSEnv.scala:159)\r\n\tat org.scalajs.sbtplugin.FrameworkDetector.detect(FrameworkDetector.scala:66)\r\n\tat org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$56.apply(ScalaJSPluginInternal.scala:705)\r\n\tat org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$56.apply(ScalaJSPluginInternal.scala:688)\r\n\tat scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)\r\n\tat sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)\r\n\tat sbt.std.Transform$$anon$4.work(System.scala:63)\r\n\tat sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)\r\n\tat sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)\r\n\tat sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)\r\n\tat sbt.Execute.work(Execute.scala:235)\r\n\tat sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)\r\n\tat sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)\r\n\tat sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)\r\n\tat sbt.CompletionService$$anon$2.call(CompletionService.scala:28)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n[error] (test:loadedTestFrameworks) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2\r\n[error] Total time: 6 s, completed Mar 6, 2016 11:02:16 AM\r\n```\r\n\r\nWith debug enabled:\r\n\r\n```\r\n[debug] > test\r\n[debug] Evaluating tasks: test:test\r\n[debug] Running task... Cancel: Null, check cycles: false, forcegc: true\r\n[debug]\r\n[debug] Initial source changes:\r\n[debug] \tremoved:Set()\r\n[debug] \tadded: Set()\r\n[debug] \tmodified: Set()\r\n[debug] Invalidated products: Set()\r\n[debug] External API changes: API Changes: Set()\r\n[debug] Modified binary dependencies: Set()\r\n[debug] Initial directly invalidated sources: Set()\r\n[debug]\r\n[debug] Sources indirectly invalidated by:\r\n[debug] \tproduct: Set()\r\n[debug] \tbinary dep: Set()\r\n[debug] \texternal source: Set()\r\n[debug] All initially invalidated sources: Set()\r\n[debug] Copy resource mappings:\r\n[debug]\r\n[debug]\r\n[debug] Initial source changes:\r\n[debug] \tremoved:Set()\r\n[debug] \tadded: Set()\r\n[debug] \tmodified: Set()\r\n[debug] Invalidated products: Set()\r\n[debug] External API changes: API Changes: Set()\r\n[debug] Modified binary dependencies: Set()\r\n[debug] Initial directly invalidated sources: Set()\r\n[debug]\r\n[debug] Sources indirectly invalidated by:\r\n[debug] \tproduct: Set()\r\n[debug] \tbinary dep: Set()\r\n[debug] \texternal source: Set()\r\n[debug] All initially invalidated sources: Set()\r\n[debug] Copy resource mappings:\r\n[debug]\r\n[debug] Loading JSEnv with linked file projects/scala-js-example-app/target/scala-2.11/example-test-fastopt.js\r\n[trace] Stack trace suppressed: run last test:loadedTestFrameworks for the full output.\r\n[error] (test:loadedTestFrameworks) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2\r\n[error] Total time: 6 s, completed Mar 6, 2016 11:05:14 AM\r\n```\r\n\r\nNow this may be a bug with the angular library, however I'd like to see at least some help on what causes phantomjs to exit (such as the javascript console output)\r\nPoking around in the scalajs sbt plugin it seems that exit code 2 is caused by the webpage calling onError:\r\n\r\nhttps://github.com/scala-js/scala-js/blob/f27a42c6aa83833bb44e9efe8d58b426131893f9/js-envs/src/main/scala/org/scalajs/jsenv/phantomjs/PhantomJSEnv.scala#L443\r\n\r\nThanks for the help,"},"comment":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/comments/223764934","html_url":"https://github.com/scala-js/scala-js/issues/2279#issuecomment-223764934","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/2279","id":223764934,"user":{"login":"axos88","id":1281218,"avatar_url":"https://avatars.githubusercontent.com/u/1281218?v=3","gravatar_id":"","url":"https://api.github.com/users/axos88","html_url":"https://github.com/axos88","followers_url":"https://api.github.com/users/axos88/followers","following_url":"https://api.github.com/users/axos88/following{/other_user}","gists_url":"https://api.github.com/users/axos88/gists{/gist_id}","starred_url":"https://api.github.com/users/axos88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axos88/subscriptions","organizations_url":"https://api.github.com/users/axos88/orgs","repos_url":"https://api.github.com/users/axos88/repos","events_url":"https://api.github.com/users/axos88/events{/privacy}","received_events_url":"https://api.github.com/users/axos88/received_events","type":"User","site_admin":false},"created_at":"2016-06-04T16:32:14Z","updated_at":"2016-06-04T16:32:14Z","body":"```\r\n> myproject-js/run\r\n[debug]\r\n[debug] Initial source changes:\r\n[debug]     removed:Set()\r\n[debug]     added: Set()\r\n[debug]     modified: Set()\r\n[debug] Removed products: Set()\r\n[debug] External API changes: API Changes: Set()\r\n[debug] Modified binary dependencies: Set()\r\n[debug] Initial directly invalidated sources: Set()\r\n[debug]\r\n[debug] Sources indirectly invalidated by:\r\n[debug]     product: Set()\r\n[debug]     binary dep: Set()\r\n[debug]     external source: Set()\r\n[debug] All initially invalidated sources: Set()\r\n[debug] Copy resource mappings:\r\n[debug]\r\n[debug] Loading JSEnv with linked file myproject/scalajs/target/scala-2.11/myproject-js-fastopt.js\r\n[info] Running JSBoot\r\n[debug] with JSEnv ExternalJSEnv for PhantomJS\r\n[debug] PhantomJS using webpage launcher at: /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher-webpage2601653425101094794.html\r\n[debug] PhantomJS using launcher at: /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher7773494781003381759.js\r\n[debug] Starting process: phantomjs /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher7773494781003381759.js\r\nSyntaxError: Parse error\r\norg.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2\r\n    at org.scalajs.jsenv.ExternalJSEnv$AbstractExtRunner.waitForVM(ExternalJSEnv.scala:107)\r\n    at org.scalajs.jsenv.ExternalJSEnv$ExtRunner.run(ExternalJSEnv.scala:156)\r\n    at org.scalajs.sbtplugin.ScalaJSPluginInternal$.org$scalajs$sbtplugin$ScalaJSPluginInternal$$jsRun(ScalaJSPluginInternal.scala:640)\r\n    at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$57$$anonfun$apply$40$$anonfun$apply$41.apply(ScalaJSPluginInternal.scala:700)\r\n    at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$57$$anonfun$apply$40$$anonfun$apply$41.apply(ScalaJSPluginInternal.scala:694)\r\n    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)\r\n[trace] Stack trace suppressed: run last myproject-js/compile:run for the full output.\r\n[error] (myproject-js/compile:run) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2\r\n[error] Total time: 4 s, completed Jun 4, 2016 6:33:02 PM\r\n```"}}
{"actor":{"display_login":"axos88"}}