-
-
Notifications
You must be signed in to change notification settings - Fork 241
Cannot start my app after upgrading to 2.2 #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In main.ts, I add NS_HTTP_PROVIDERS. import {NS_HTTP_PROVIDERS} from 'nativescript-angular/http'; |
After adding NS_HTTP_PROVIDERS a get following error:
|
@kozakvoj I can confirm this. I added NS_HTTP_PROVIDERS in main.ts which resulted in that error message |
In your
Until a new version is released. |
Edit tsconfig.json
|
After applying the fixes proposed here I´m getting this error: `java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: TypeError: global.moduleMerge is not a function StackTrace: The stacktrace continues - I´m not getting the complete trace from the clipboard for some reason - and includes ns-http.js and http.js. |
@NathanWalker i tried the "nativescript-angular": "next" but i still get the same error. |
@NathanWalker It works for me. Thanks. |
i already do that i even try the re-install "nativescript-angular" as next but i am still getting the error at the top. because of that i had to downgrade both my "nativescript-angular" and "tns-core-modules" for my app to work again. but i do need to upgrade. |
@tomylee001001 I've got the experience that sometimes the recompilation gets stuck for some reason. When it does the safest way out is to delete platforms, node_modules and run tns run adroid again for a full recompilation. My current nativescript-angular version is 0.3.1-2016-08-08-788. The other dependecies include:
main.ts looks like:
I hope this helps. It works for me this way. |
My previous comment wasn't really correct. I've just tried to recompile all and ended with the error again. But I've found a bizarre workaround.
|
i am still getting the error and after trying some more my app became completely goes the wrong way and it dont even starts properly without giving me any error. at that poin i had to return my back up to start trying again. my current package.json "dependencies": { and my current main.ts import "reflect-metadata"; nativeScriptBootstrap(AppComponent, [HTTP_PROVIDERS, APP_ROUTER_PROVIDERS]); |
if i change import {HTTP_PROVIDERS} from "@angular/http"; to import {NS_HTTP_PROVIDERS} from 'nativescript-angular/http'; in my main.ts my app coudnt open my login page or splash screen just give me this error; java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: TypeError: global.moduleMerge is not a function StackTrace: |
@tommylee001001 I have the same issue (as you can see above in the posts). When I downgrade to tns 2.1.0 things work just fine. |
@TruckerG i know that after i downgrade my app continue working but i need to upgrade because this upgrade solve couple of my problems. |
@tomylee001001: yeah me too! |
We just pushed Note: To be on the safe side you can try deleting |
@vakrilov i also try that version as well as tried tns plugin add nativescript-angular@next to get the highest version but my problem isnt Class 'NSHttp' incorrectly extends base class 'Http' error . Currently as in the example of groceries angular i am using "@angular/http" both for "HTTP_PROVIDERS" in my main.ts and for http.post in my service to get data from my webservice. com.tns.NativeScriptException: EXCEPTION: Error in pages/login/login.html:6:49 but if i change "@angular/http" to "nativescript-angular/http" both my main.ts and my service files not even my splash screen or login page open and i get the following error as soon as i open my app java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: TypeError: global.moduleMerge is not a function StackTrace: i need to upgrade my app because new version solve couple of my importanted problems but i cant upgrade because of these error.is there any workaround for these while waiting to the next stable version. |
@TruckerG placing the import {nativeScriptBootstrap} from "nativescript-angular/application"; to the first line in my main.ts solve this problem for me. |
@tomylee001001: yes it solves the problem! |
From @tomylee001001 on August 12, 2016 15:7
Hi ,
i upgraded the tns-core-modules to 2.2 and nativescript-angular 0.3 but after upgrading my apps login screen opens but when i click the login button i get the following error.
com.tns.NativeScriptException:
Calling js method onClick failed
EXCEPTION: Error in pages/login/login.html:6:49
ORIGINAL EXCEPTION: Error: not implemented
ORIGINAL STACKTRACE:
Error: not implemented
at NativeScriptDomAdapter.Parse5DomAdapter.getCookie (/data/data/org.nativescript.platformtest/files/app/tns_modules/@angular/platform-server/src/parse5_adapter.js:619:68)
at CookieXSRFStrategy.configureRequest (/data/data/org.nativescript.platformtest/files/app/tns_modules/@angular/http/src/backends/xhr_backend.js:150:82)
at XHRBackend.createConnection (/data/data/org.nativescript.platformtest/files/app/tns_modules/@angular/http/src/backends/xhr_backend.js:165:28)
at httpRequest (/data/data/org.nativescript.platformtest/files/app/tns_modules/@angular/http/src/http.js:22:20)
at Http.post (/data/data/org.nativescript.platformtest/files/app/tns_modules/@angular/http/src/http.js:78:16)
at UserService.login (/data/data/org.nativescript.platformtest/files/app/pages/shared/user/user_service.js
My login html
<StackLayout #container>
![]()
<TextField hint="E-Posta" keyboardType="email" [(ngModel)]="user.email"
autocorrect="false" autocapitalizationType="none">
<TextField hint="Şifre" secure="true" [(ngModel)]="user.password">
and my codes for submit
i had no problem before the upgrade.
Copied from original issue: NativeScript/NativeScript#2575
The text was updated successfully, but these errors were encountered: