tns run android --bundle fails with 'onNavigatingTo' of undefined












0














My application runs fine when I run using tns run android but when I use tns run android --bundle then it gives me exception.Following is a stacktrace:



System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property 'onNavigatingTo' of undefined
System.err: File: "file:///data/data/com.travel/files/app/vendor.js, line: 32768, column: 36
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._onNavigatingTo', file:'file:///data/data/co
m.travel/files/app/vendor.js', line: 32768, column: 37
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.performNavigation', file:'file:///data/data/
com.travel/files/app/vendor.js', line: 32740, column: 14
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._processNextNavigationEntry', file:'file:///
data/data/com.travel/files/app/vendor.js', line: 32733, column: 22
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._processNextNavigationEntry', file:'file:///data/data/c
om.travel/files/app/vendor.js', line: 33206, column: 58
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._onAttachedToWindow', file:'file:///data/data/com.trav
el/files/app/vendor.js', line: 33181, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/com.travel/files/app/vendor.js', line: 33
098, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)


Following is my package.json



{
"nativescript": {
"id": "com.travel",
},
"scripts": {
"lint": "tslint "app/**/*.ts""
},
"dependencies": {
"nativescript-appversion": "^1.4.1",
"nativescript-grid-view": "^4.1.1",
"nativescript-purchase": "^2.0.5",
"nativescript-social-share": "^1.5.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-chart": "^3.9.1",
"nativescript-ui-sidedrawer": "~5.0.0",
"rxjs": "~6.2.0",
"tns-core-modules": "~5.0.0"
},
"devDependencies": {
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.18.0",
"tns-platform-declarations": "^5.0.2",
"tslint": "~5.11.0",
"typescript": "~2.7.2"
}
}


Can someone please guide me what's wrong here?










share|improve this question




















  • 1




    Must be something specific to your code / project, do you have a sample repo or playground example?
    – Manoj
    Nov 23 '18 at 21:40






  • 1




    Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
    – Rakesh
    Nov 23 '18 at 21:48










  • Is it on only run bundle?
    – DrAchernar
    Nov 24 '18 at 0:01










  • yes. tns run android runs fine its only bundle which gives the exception given above.
    – Rakesh
    Nov 24 '18 at 7:19
















0














My application runs fine when I run using tns run android but when I use tns run android --bundle then it gives me exception.Following is a stacktrace:



System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property 'onNavigatingTo' of undefined
System.err: File: "file:///data/data/com.travel/files/app/vendor.js, line: 32768, column: 36
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._onNavigatingTo', file:'file:///data/data/co
m.travel/files/app/vendor.js', line: 32768, column: 37
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.performNavigation', file:'file:///data/data/
com.travel/files/app/vendor.js', line: 32740, column: 14
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._processNextNavigationEntry', file:'file:///
data/data/com.travel/files/app/vendor.js', line: 32733, column: 22
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._processNextNavigationEntry', file:'file:///data/data/c
om.travel/files/app/vendor.js', line: 33206, column: 58
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._onAttachedToWindow', file:'file:///data/data/com.trav
el/files/app/vendor.js', line: 33181, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/com.travel/files/app/vendor.js', line: 33
098, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)


Following is my package.json



{
"nativescript": {
"id": "com.travel",
},
"scripts": {
"lint": "tslint "app/**/*.ts""
},
"dependencies": {
"nativescript-appversion": "^1.4.1",
"nativescript-grid-view": "^4.1.1",
"nativescript-purchase": "^2.0.5",
"nativescript-social-share": "^1.5.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-chart": "^3.9.1",
"nativescript-ui-sidedrawer": "~5.0.0",
"rxjs": "~6.2.0",
"tns-core-modules": "~5.0.0"
},
"devDependencies": {
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.18.0",
"tns-platform-declarations": "^5.0.2",
"tslint": "~5.11.0",
"typescript": "~2.7.2"
}
}


Can someone please guide me what's wrong here?










share|improve this question




















  • 1




    Must be something specific to your code / project, do you have a sample repo or playground example?
    – Manoj
    Nov 23 '18 at 21:40






  • 1




    Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
    – Rakesh
    Nov 23 '18 at 21:48










  • Is it on only run bundle?
    – DrAchernar
    Nov 24 '18 at 0:01










  • yes. tns run android runs fine its only bundle which gives the exception given above.
    – Rakesh
    Nov 24 '18 at 7:19














0












0








0







My application runs fine when I run using tns run android but when I use tns run android --bundle then it gives me exception.Following is a stacktrace:



System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property 'onNavigatingTo' of undefined
System.err: File: "file:///data/data/com.travel/files/app/vendor.js, line: 32768, column: 36
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._onNavigatingTo', file:'file:///data/data/co
m.travel/files/app/vendor.js', line: 32768, column: 37
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.performNavigation', file:'file:///data/data/
com.travel/files/app/vendor.js', line: 32740, column: 14
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._processNextNavigationEntry', file:'file:///
data/data/com.travel/files/app/vendor.js', line: 32733, column: 22
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._processNextNavigationEntry', file:'file:///data/data/c
om.travel/files/app/vendor.js', line: 33206, column: 58
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._onAttachedToWindow', file:'file:///data/data/com.trav
el/files/app/vendor.js', line: 33181, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/com.travel/files/app/vendor.js', line: 33
098, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)


Following is my package.json



{
"nativescript": {
"id": "com.travel",
},
"scripts": {
"lint": "tslint "app/**/*.ts""
},
"dependencies": {
"nativescript-appversion": "^1.4.1",
"nativescript-grid-view": "^4.1.1",
"nativescript-purchase": "^2.0.5",
"nativescript-social-share": "^1.5.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-chart": "^3.9.1",
"nativescript-ui-sidedrawer": "~5.0.0",
"rxjs": "~6.2.0",
"tns-core-modules": "~5.0.0"
},
"devDependencies": {
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.18.0",
"tns-platform-declarations": "^5.0.2",
"tslint": "~5.11.0",
"typescript": "~2.7.2"
}
}


Can someone please guide me what's wrong here?










share|improve this question















My application runs fine when I run using tns run android but when I use tns run android --bundle then it gives me exception.Following is a stacktrace:



System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property 'onNavigatingTo' of undefined
System.err: File: "file:///data/data/com.travel/files/app/vendor.js, line: 32768, column: 36
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._onNavigatingTo', file:'file:///data/data/co
m.travel/files/app/vendor.js', line: 32768, column: 37
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.performNavigation', file:'file:///data/data/
com.travel/files/app/vendor.js', line: 32740, column: 14
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._processNextNavigationEntry', file:'file:///
data/data/com.travel/files/app/vendor.js', line: 32733, column: 22
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._processNextNavigationEntry', file:'file:///data/data/c
om.travel/files/app/vendor.js', line: 33206, column: 58
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._onAttachedToWindow', file:'file:///data/data/com.trav
el/files/app/vendor.js', line: 33181, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/com.travel/files/app/vendor.js', line: 33
098, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)


Following is my package.json



{
"nativescript": {
"id": "com.travel",
},
"scripts": {
"lint": "tslint "app/**/*.ts""
},
"dependencies": {
"nativescript-appversion": "^1.4.1",
"nativescript-grid-view": "^4.1.1",
"nativescript-purchase": "^2.0.5",
"nativescript-social-share": "^1.5.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-chart": "^3.9.1",
"nativescript-ui-sidedrawer": "~5.0.0",
"rxjs": "~6.2.0",
"tns-core-modules": "~5.0.0"
},
"devDependencies": {
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.18.0",
"tns-platform-declarations": "^5.0.2",
"tslint": "~5.11.0",
"typescript": "~2.7.2"
}
}


Can someone please guide me what's wrong here?







android webpack bundle nativescript






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 8:20







Rakesh

















asked Nov 23 '18 at 20:33









RakeshRakesh

721617




721617








  • 1




    Must be something specific to your code / project, do you have a sample repo or playground example?
    – Manoj
    Nov 23 '18 at 21:40






  • 1




    Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
    – Rakesh
    Nov 23 '18 at 21:48










  • Is it on only run bundle?
    – DrAchernar
    Nov 24 '18 at 0:01










  • yes. tns run android runs fine its only bundle which gives the exception given above.
    – Rakesh
    Nov 24 '18 at 7:19














  • 1




    Must be something specific to your code / project, do you have a sample repo or playground example?
    – Manoj
    Nov 23 '18 at 21:40






  • 1




    Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
    – Rakesh
    Nov 23 '18 at 21:48










  • Is it on only run bundle?
    – DrAchernar
    Nov 24 '18 at 0:01










  • yes. tns run android runs fine its only bundle which gives the exception given above.
    – Rakesh
    Nov 24 '18 at 7:19








1




1




Must be something specific to your code / project, do you have a sample repo or playground example?
– Manoj
Nov 23 '18 at 21:40




Must be something specific to your code / project, do you have a sample repo or playground example?
– Manoj
Nov 23 '18 at 21:40




1




1




Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
– Rakesh
Nov 23 '18 at 21:48




Can this be with my webpack.config.js? The webpack.config.js update instruction dont work on windows as given on docs.nativescript.org/performance-optimizations/…. /node_modules/.bin/update-ns-webpack --configs --deps Usage. I will create a repo to replicate this issue.
– Rakesh
Nov 23 '18 at 21:48












Is it on only run bundle?
– DrAchernar
Nov 24 '18 at 0:01




Is it on only run bundle?
– DrAchernar
Nov 24 '18 at 0:01












yes. tns run android runs fine its only bundle which gives the exception given above.
– Rakesh
Nov 24 '18 at 7:19




yes. tns run android runs fine its only bundle which gives the exception given above.
– Rakesh
Nov 24 '18 at 7:19












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53452664%2ftns-run-android-bundle-fails-with-onnavigatingto-of-undefined%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53452664%2ftns-run-android-bundle-fails-with-onnavigatingto-of-undefined%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)