Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

App crash on start #452

Closed
bori87 opened this issue Mar 2, 2018 · 4 comments
Closed

App crash on start #452

bori87 opened this issue Mar 2, 2018 · 4 comments
Labels

Comments

@bori87
Copy link

bori87 commented Mar 2, 2018

// Snapshot the ~/app.css and the theme
var application = require("application");
require("ui/styling/style-scope");
var appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/);
global.registerWebpackModules(appCssContext);
application.loadAppCss();
require("./vendor-platform");
require("reflect-metadata");
require("@angular/platform-browser");
require("@angular/core");
require("@angular/common");
require("@angular/forms");
require("@angular/http");
require("@angular/router");
require("nativescript-angular/platform-static");
require("nativescript-angular/forms");
require("nativescript-angular/router");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVuZG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmVuZG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHVDQUF1QztBQUN2QyxJQUFNLFdBQVcsR0FBRyxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDM0MsT0FBTyxDQUFDLHdCQUF3QixDQUFDLENBQUM7QUFDbEMsSUFBTSxhQUFhLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxFQUFFLGlDQUFpQyxDQUFDLENBQUM7QUFDdEYsTUFBTSxDQUFDLHNCQUFzQixDQUFDLGFBQWEsQ0FBQyxDQUFDO0FBQzdDLFdBQVcsQ0FBQyxVQUFVLEVBQUUsQ0FBQztBQUV6QixPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FBQztBQUU3QixPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQztBQUM1QixPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0FBQztBQUNyQyxPQUFPLENBQUMsZUFBZSxDQUFDLENBQUM7QUFDekIsT0FBTyxDQUFDLGlCQ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KTtcblxucmVxdWlyZShcIm5hdGl2ZXNjcmlwdC1hbmd1bGFyL3BsYXRmb3JtLXN0YXRpY1wiKTtcbnJlcXVpcmUoXCJuYXRpdmVzY3JpcHQtYW5ndWxhci9mb3Jtc1wiKTtcbnJlcXVpcmUoXCJuYXRpdmVzY3JpcHQtYW5ndWxhci9yb3V0ZXJcIik7XG4iXX0=

image

{
  "name": "npu",
  "version": "0.0.0",
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.domain.project",
    "tns-android": {
      "version": "3.4.1"
    }
  },
  "dependencies": {
    "@angular/animations": "~5.0.0",
    "@angular/common": "~5.0.0",
    "@angular/compiler": "~5.0.0",
    "@angular/core": "~5.0.0",
    "@angular/forms": "~5.0.0",
    "@angular/http": "~5.0.0",
    "@angular/platform-browser": "~5.0.0",
    "@angular/platform-browser-dynamic": "~5.0.0",
    "@angular/router": "~5.0.0",
    "email-validator": "^1.1.1",
    "font-awesome": "^4.7.0",
    "nativescript-angular": "5.0.0",
    "nativescript-bitmap-factory": "^1.7.1",
    "nativescript-camera": "^3.2.1",
    "nativescript-fresco": "^3.0.6",
    "nativescript-google-maps-sdk": "^2.4.3",
    "nativescript-google-maps-utils": "^0.1.3",
    "nativescript-google-places": "0.0.3",
    "nativescript-imagepicker": "^4.0.1",
    "nativescript-plugin-firebase": "^5.1.4",
    "nativescript-pro-ui": "^3.3.0",
    "nativescript-theme-core": "1.0.4",
    "reflect-metadata": "0.1.10",
    "rxjs": "^5.5.0",
    "tns-core-modules": "^3.4.1",
    "tns-platform-declarations": "^3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~5.0.0",
    "@ngtools/webpack": "~1.9.4",
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "copy-webpack-plugin": "~4.3.0",
    "css-loader": "~0.28.7",
    "extract-text-webpack-plugin": "~3.0.2",
    "lazy": "1.0.11",
    "nativescript-dev-sass": "^1.3.5",
    "nativescript-dev-typescript": "0.5.1",
    "nativescript-dev-webpack": "^0.9.2",
    "nativescript-worker-loader": "~0.8.1",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.2.1",
    "sass-loader": "~6.0.6",
    "typescript": "~2.4.2",
    "uglifyjs-webpack-plugin": "~1.1.6",
    "webpack": "~3.10.0",
    "webpack-bundle-analyzer": "^2.9.1",
    "webpack-sources": "~1.1.0"
  }
}
@NickIliev
Copy link
Contributor

@bori87 I am using this test app with the same package.json and vendor.ts but I am not able to reproduce the issue on my side. Please let me know if you have sample project that can reproduce the issue and what is the exact command used for building the project including on what environment (Mac, Win, Linux)

@bori87
Copy link
Author

bori87 commented Mar 2, 2018

@NickIliev Thank You, i have launched your example end everything working fine (except long app opening time). I am using windows 10, normal build working fine the apk file is weight over 30MB and i am able to launch it on my device. I am using this command:

tns build android --bundle --env.aot --env.uglify --env.snapshot

[...]
Project successfully built.

The apk size in 16MB. I am able to install it on the device but then my app is crashing. Any ideas?

@Dennis-Do
Copy link

Dennis-Do commented Mar 5, 2018

This problem is related to old debug data on your android device. Delete all related data from data/local/tmp to remove the error.

To do that, follow the instructions from rosen-vladimirov.

Good luck

@NickIliev
Copy link
Contributor

@bori87 regarding

 am able to install it on the device but then my app is crashing

By "my app" I guess you are meaning your own project - try updating all angular and web pack related dependencies (as in my linked project) and also let us know if it fails with the very same error after the app start.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants