{"action":"opened","issue":{"url":"https://api.github.com/repos/NathanWalker/nativescript-ng2-magic/issues/10","repository_url":"https://api.github.com/repos/NathanWalker/nativescript-ng2-magic","labels_url":"https://api.github.com/repos/NathanWalker/nativescript-ng2-magic/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/NathanWalker/nativescript-ng2-magic/issues/10/comments","events_url":"https://api.github.com/repos/NathanWalker/nativescript-ng2-magic/issues/10/events","html_url":"https://github.com/NathanWalker/nativescript-ng2-magic/issues/10","id":159149569,"number":10,"title":"com.tns.Runtime.callJSMethod failing","user":{"login":"cescoferraro","id":6259987,"avatar_url":"https://avatars.githubusercontent.com/u/6259987?v=3","gravatar_id":"","url":"https://api.github.com/users/cescoferraro","html_url":"https://github.com/cescoferraro","followers_url":"https://api.github.com/users/cescoferraro/followers","following_url":"https://api.github.com/users/cescoferraro/following{/other_user}","gists_url":"https://api.github.com/users/cescoferraro/gists{/gist_id}","starred_url":"https://api.github.com/users/cescoferraro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cescoferraro/subscriptions","organizations_url":"https://api.github.com/users/cescoferraro/orgs","repos_url":"https://api.github.com/users/cescoferraro/repos","events_url":"https://api.github.com/users/cescoferraro/events{/privacy}","received_events_url":"https://api.github.com/users/cescoferraro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-08T12:19:07Z","updated_at":"2016-06-08T12:19:07Z","closed_at":null,"body":"I am starting a new project, but getting this:\r\n\r\n```\r\nBUILD SUCCESSFUL\r\n\r\nTotal time: 4.916 secs\r\n\r\nThis build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.10/userguide/gradle_daemon.html\r\nProject successfully built.\r\nUsing  /home/cesco/code/src/bitbucket.org/cescoferraro/track/nativescript/platforms/android/build/outputs/apk/nativescript-debug.apk\r\nWaiting for emulator device initialization...\r\ninstalling /home/cesco/code/src/bitbucket.org/cescoferraro/track/nativescript/platforms/android/build/outputs/apk/nativescript-debug.apk through adb\r\nrunning /home/cesco/code/src/bitbucket.org/cescoferraro/track/nativescript/platforms/android/build/outputs/apk/nativescript-debug.apk through adb\r\nJS: heloooo\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.callJSMethodNative(Native Method)\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:861)\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.callJSMethodImpl(Runtime.java:726)\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:712)\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:693)\r\n06-08 07:51:01.005  1796  1796 W System.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:683)\r\n``` \r\n\r\nThe device spits \r\n\r\n```\r\njava.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.nativescript/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: \r\nCalling js method onCreate failed\r\n\r\nTypeError: Cannot read property 'ContentLayout' of undefined\r\nFile: \"/data/data/org.nativescript.nativescript/files/app/tns_modules/ui/frame/frame.js, line: 229, column: 47\r\n\r\nStackTrace: \r\n\tFrame: function:'Frame._createUI', file:'/data/data/org.nativescript.nativescript/files/app/tns_modules/ui/frame/frame.js', line: 229, column: 48\r\n\tFrame: function:'View._onContextChanged', file:'/data/data/org.nativescript.nativescript/files/app/tns_modules/ui/core/view.js', line: 209, column: 14\r\n\tFrame: function:'View._onAttached', file:'/data/data/org.nativescript.nativescript/files/app/tns_modules/ui/core/view.js', line: 165, column: 14\r\n\tFrame: function:'NativeScriptActivity.onCreate', file:'/data/data/org.nativescript.nativescript/files/app/tns_modules/ui/frame/frame.js', line: 606, column: 18\r\n\r\n\r\n\tat android.app.ActivityThread.per\r\n```\r\n\r\nHere is my `nativescript/app/main.ts`\r\n\r\n```\r\n// this import should be first in order to load some required settings (like globals and reflect-metadata)\r\nimport {nativeScriptBootstrap} from \"nativescript-angular/application\";\r\nimport {NS_ROUTER_PROVIDERS, NS_ROUTER_DIRECTIVES} from \"nativescript-angular/router\";\r\nimport {MagicService} from \"nativescript-ng2-magic\";\r\nMagicService.ROUTER_DIRECTIVES = NS_ROUTER_DIRECTIVES;\r\n\r\n// import your root component here\r\nconsole.log(\"heloooo\");\r\nimport {TrackAppComponent} from \"./app/track.component\";\r\n\r\nnativeScriptBootstrap(TrackAppComponent, [NS_ROUTER_PROVIDERS], { startPageActionBarHidden: false });\r\n```\r\n\r\nHere is my `nativescript/app/app/track.component.ts`\r\n\r\n```\r\nimport { Component } from 'nativescript-ng2-magic';\r\n\r\n@Component({\r\n  selector: 'track-app',\r\n  templateUrl: './app/track.component.html',\r\n  styleUrls: ['./app/track.component.css']\r\n})\r\nexport class TrackAppComponent {\r\n  title = 'track works!';\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"cescoferraro"}}