Skip to content

Unable to apply changes on device: xxxxxx. Error is: Socket timed out.. #4916

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

Closed
ValentinMolina500 opened this issue Jul 31, 2019 · 16 comments
Closed
Assignees
Labels

Comments

@ValentinMolina500
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.1.0-2019-07-22-110314-13705
  • Cross-platform modules: 6.1.0-next-2019-07-24-141042-01
  • Android Runtime: 6.1.0-2019-07-29-182447-01
  • Plugin(s):
    "@nstudio/nativescript-checkbox": "^1.0.0",
    "babel-cli": "^6.26.0",
    "babel-preset-react-app": "^3.1.2",
    "font-awesome": "^4.7.0",
    "g": "^2.0.1",
    "nativescript-bottombar": "^3.0.8",
    "nativescript-calendar": "^2.1.0",
    "nativescript-checkbox": "^3.0.3",
    "nativescript-couchbase-plugin": "^0.9.1",
    "nativescript-drop-down": "^5.0.2",
    "nativescript-floatingactionbutton": "^5.1.0",
    "nativescript-image-zoom": "^3.0.3",
    "nativescript-material-icons": "^1.0.3",
    "nativescript-modal-datetimepicker": "^1.2.0",
    "nativescript-nbmaterial-calendar": "^1.0.1",
    "nativescript-ng2-fonticon": "^1.3.4",
    "nativescript-plugin-firebase": "^9.0.3",
    "nativescript-ripple": "^2.2.1",
    "nativescript-social-share": "^1.5.2",
    "nativescript-theme-core": "^2.0.2",
    "nativescript-ui-dataform": "^5.0.0",
    "nativescript-ui-listview": "^7.0.1",
    "nativescript-ui-sidedrawer": "^7.0.0",
    "tns": "^0.2.0",
    "tns-core-modules": "^6.1.0-next-2019-07-20-015811-02"

Describe the bug

For some reason, today I tried running my app, and it keeps saying: Unable to apply changes on device: 3852564c33593398. Error is: Socket connection timed out.. I have tried many of the solutions listed here, such as deleting hooks, platforms, package.json, I've tried wiping my repo, and cloning it again from GitHub from a branch I know works but it still fails. I've tried adding the applicationId in app.gradle but still nada. I've tried different cables, phones emulators, and a whole combination of the above steps. I have updated to NativeScript 6 recently, but that was over a week ago, and it was working fine until today. Note that the errors in the log info were present before this issue occurred.

Log Info
Preparing project...
File change detected. Starting incremental webpack compilation...
Starting type checking service...
Using 1 worker with 4096MB memory limit

webpack is watching the files…

Hash: 78a04e3d1fb6a6cc0769
Version: webpack 4.27.1
Time: 4268ms
Built at: 07/30/2019 7:57:21 PM
Asset Size Chunks Chunk Names
bundle.js 1.34 MiB bundle [emitted] bundle
fonts/BentonSans-Bold.otf 24.8 KiB [emitted]
fonts/BentonSans-Medium.otf 24.9 KiB [emitted]
fonts/BentonSans-Regular.otf 24.7 KiB [emitted]
fonts/HelveticaNeueBold.ttf 59.7 KiB [emitted]
fonts/HelveticaNeueCondensedBlack.ttf 73.3 KiB [emitted]
fonts/HelveticaNeueLight.ttf 124 KiB [emitted]
fonts/HelveticaNeueMedium.ttf 119 KiB [emitted]
fonts/MaterialIcons-Regular.ttf 125 KiB [emitted]
fonts/NotoSans-Regular.ttf 389 KiB [emitted]
fonts/OpenSans-Bold.ttf 219 KiB [emitted]
fonts/OpenSans-Regular.ttf 212 KiB [emitted]
fonts/Roboto-Bold.ttf 167 KiB [emitted]
fonts/Roboto-Regular.ttf 168 KiB [emitted]
fonts/fontawesome-webfont.ttf 162 KiB [emitted]
fonts/fontawesome-webfont.woff 95.7 KiB [emitted]
fonts/materialdesignicons-webfont.ttf 534 KiB [emitted]
images/apartments.png 14.8 KiB [emitted]
images/blank-profile-image.png 22.3 KiB [emitted]
images/brian.png 184 KiB [emitted]
images/category-filter.png 294 bytes [emitted]
images/cupboard.jpg 1.14 MiB [emitted]
images/date-filter.png 287 bytes [emitted]
images/drawer-icon.png 318 bytes [emitted]
images/food-and-beverage-category.png 6.88 KiB [emitted]
images/image.jpg 227 KiB [emitted]
images/lois.png 77.5 KiB [emitted]
images/owe-indicator.png 302 bytes [emitted]
images/owed-indicator.png 302 bytes [emitted]
images/pat.png 171 KiB [emitted]
images/peter.png 446 KiB [emitted]
images/total-indicator.png 302 bytes [emitted]
images/trioLogo.png 195 KiB [emitted]
package.json 157 bytes [emitted]
runtime.js 71.4 KiB runtime [emitted] runtime
tns-java-classes.js 0 bytes [emitted]
vendor.js 4.8 MiB vendor [emitted] vendor
viewmodels/default-profile-picture/default_picture.png 1.25 KiB [emitted]
views/home/app-page/app-images/plusIcon.png 1.09 KiB [emitted]
views/home/app-page/choose-mentor-page/mentor/images/mentorIcon.jpg 21.3 KiB [emitted]
views/home/settings-page/settings-images/settings.png 318 bytes [emitted]
views/login/login_images/Handshake-Home-Page-Button.png 70.3 KiB [emitted]
views/login/login_images/WSU-Apartments-sign.jpg 78.8 KiB [emitted]
views/login/login_images/fafsa.jpg 10 KiB [emitted]
views/login/login_images/logo.png 195 KiB [emitted]
views/login/login_images/maxresdefault.jpg 114 KiB [emitted]
views/login/login_images/mind-human-brain-thought-vector-of-the-brain-gear.jpg 87.8 KiB [emitted]
views/login/login_images/trio-logo.png 66.4 KiB [emitted]
views/login/login_images/wsu-cougarhead.png 10.5 KiB [emitted]
views/login/login_images/wsutc.png 7.28 KiB [emitted]
Entrypoint bundle = runtime.js vendor.js bundle.js
[./ sync ^./app.(css|scss|less|sass)$] . sync nonrecursive ^./app.(css|scss|less|sass)$ 174 bytes {bundle} [built]
[./ sync recursive (?<!\bApp_Resources\b.).(xml|css|js|(?<!.d.)ts|(?<!\b_[\w-].)scss)$] . sync (?<!\bApp_Resources\b.).(xml|css|js|(?<!.d.)ts|(?<!\b_[\w-].)scss)$ 6.03 KiB {bundle} [built]
[./app-root-viewmodel.ts] 1 KiB {bundle} [built]
[./app-root.ts] 421 bytes {bundle} [optional] [built]
[./app-root.xml] 825 bytes {bundle} [optional] [built]
[./app.css] 4.83 KiB {bundle} [optional] [built]
[./app.ts] 1.95 KiB {bundle} [built]
[./constants/advisorDatabaseConstants.js] 1.24 KiB {bundle} [optional] [built]
[./constants/advisorDatabaseConstants.ts] 303 bytes {bundle} [optional] [built]
[./constants/appointmentConstants.js] 593 bytes {bundle} [optional] [built]
[./constants/appointmentConstants.ts] 286 bytes {bundle} [optional] [built]
[./constants/constants.ts] 404 bytes {bundle} [built]
[./material-design-icons.css] 52.7 KiB {bundle} [optional] [built]
[./utils/couchbase.js] 3.92 KiB {bundle} [optional] [built]
[./utils/firebase.ts] 12.2 KiB {bundle} [built]
+ 339 hidden modules

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts
ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(8,40):
TS2305: Module '"../../../../../GitHub/WSUTC_TRIOApp/node_modules/tns-core-modules/ui/frame/frame"' has no exported member 'stack'.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts
ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(12,15):
TS2749: 'UserViewModel' refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts
ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(13,18):
TS2749: 'myDialogs' refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts
ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts(6,15):
TS2749: 'UserViewModel' refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts
ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts(8,18):
TS2749: 'myDialogs' refers to a value, but is being used as a type here.
Webpack compilation complete. Watching for file changes.
Webpack build done!
nativescript-plugin-firebase: D:\GitHub\WSUTC_TRIOApp\platforms\android.pluginfirebaseinfo not found, forcing prepare!
nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare!
Built aar for nativescript-plugin-firebase
Chokidar raised event change for D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ripple\platforms\android\include.gradle.
Built aar for nativescript-nbmaterial-commons
Chokidar raised event change for D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-nbmaterial-commons\platforms\android\include.gradle.
nativescript-plugin-firebase: D:\GitHub\WSUTC_TRIOApp\platforms\android.pluginfirebaseinfo not found, forcing prepare!
nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare!
Project successfully prepared (android)
Configure firebase
Copy D:\GitHub\WSUTC_TRIOApp\app\App_Resources\Android\google-services.json to D:\GitHub\WSUTC_TRIOApp\platforms\android\app\google-services.json.
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:\GitHub\WSUTC_TRIOApp\app\App_Resources\Android\app.gradle
+ using andorid X library androidx.legacy:legacy-support-v4:1.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-calendar\platforms\android\nativescript_calendar.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-couchbase-plugin\platforms\android\fancycouchbase-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-plugin-firebase\platforms\android\firebase-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-plugin-firebase\platforms\android\nativescript_plugin_firebase.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-social-share\platforms\android\nativescript_social_share.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-dataform\platforms\android\TNSDataForm-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-listview\platforms\android\TNSListView-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-sidedrawer\platforms\android\TNSSideDrawer-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-nbmaterial-commons\platforms\android\nativescript_nbmaterial_commons.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-autocomplete\platforms\android\TNSAutoComplete-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-core\platforms\android\TNSCore-release.aar
+ adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

To Reproduce

Run "tns run android" in the terminal.

Expected behavior
The application to run correctly.

@tsonevn tsonevn transferred this issue from NativeScript/NativeScript Jul 31, 2019
@tsonevn
Copy link
Contributor

tsonevn commented Jul 31, 2019

Hi @ValentinMolina500,
From the provided log, it seems that you have some error inside the files in your application code. Can you solve them and try to rebuild the project. If the issue persists, please build the project with tns run android --log trace > out.txt command and send us the out.txt file with the full log.

@ValentinMolina500
Copy link
Author

out.txt

Here is the that out.txt file. Many thanks for the help.

@paragasu
Copy link

paragasu commented Aug 1, 2019

#4902

@paragasu
Copy link

paragasu commented Aug 1, 2019

This issue happen again. The issue come up once i uninstall manually from the android device.
The next time i run the tns run android the error socket timeout appear.

I suspect the cli expect there is an instance to communicate with on the mobile phone. So far the solution i found is to change the application Id as mention on the issue #2092

@AmithRamesh
Copy link

I am also facing the same error after updating to Nstivescript 6.
Tried many things, updated all plugins. Still, the issue persists. No idea of what is going on or why the error is.

My dependencies:
"dependencies": {
"@angular/animations": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"@nstudio/nativescript-cardview": "^1.0.0",
"@nstudio/nativescript-snackbar": "^1.0.0",
"base-64": "^0.1.0",
"nativescript-advanced-webview": "^3.0.2",
"nativescript-angular": "^8.0.3",
"nativescript-permissions": "^1.3.6",
"nativescript-plugin-firebase": "^9.0.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-calendar": "5.0.0",
"nativescript-ui-listview": "7.0.0",
"nativescript-ui-sidedrawer": "7.0.0",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.3.3",
"tns-core-modules": "^6.0.4",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-webpack": "^1.0.2",
"tns-platform-declarations": "6.0.1",
"typescript": "3.4.5"
}

@DimitarTachev DimitarTachev self-assigned this Aug 1, 2019
@DimitarTachev
Copy link
Contributor

Hi guys,

Thanks for reporting it!

Reviewing the provided logs and additional details, I suppose that you've faced an issue with LiveSyncing when the application is closed/uninstalled.

I've just merged a pull request with a fix which is available as a Release Candidate (npm i nativescript@rc -g). Could you give it a try and update us back?

P.S. The fix should be officially released with the next patch release in a few days.

@Willhay108-imprint
Copy link

@DimitarTachev This issue is still persisting for me after installing the release candidate. I updated NS 6.0 and migrated yesterday, and encountered the same issue in this ticket. I then rolled back to my previous versions which fixed the issue, I tracked this issue and re-updated and migrated with the release candidate but it is still happening.

I have attached the log from my build:

out.txt

@DimitarTachev
Copy link
Contributor

Hi @Willhay108-imprint,

Thanks for providing the logs!

Unfortunately, they look fine and we are not able to reproduce such behavior. I even tried with Vue app with the same Webpack compilation warning (v-for without explicit keys).

This error could be thrown if your app is crashing on startup (for example, if it has a wrong custom Android activity). In this case, a timeout error is thrown after 60 seconds because your app is not running and we are not able to connect to it.

I suggest you check the adb logs when the app is starting (from your logs, we see that the CLI is successfully starting the app). You could achieve this by executing adb logcat.

If you are not able to resolve the issue based on the adb logs, we will need a sample application reproducing the exception. If you are not OK with sharing your app, you could start with a blank Vue app (tns create newVueApp --vue) and apply some steps to reproduce the issue. Also, could you confirm that the error is thrown after 60 seconds and the app is not running when you see the error?

@Willhay108-imprint
Copy link

@DimitarTachev

Thanks for your advice, through looking at the adb logcat I was able to pinpoint an exception occurring inside the inbuilt Android FileProvider (to note, the app was indeed timing out after 60 seconds):

E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider"

Removing the related lines in our AndroidManifest:

<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/> </provider>

fixed the issue. I'm assuming this isn't a known bug, but if it is do you have any idea how to workaround it for the time being?

Thanks again.

@DimitarTachev
Copy link
Contributor

@Willhay108-imprint,

It's part of the AndroidX migration. You have to replace it with:

<provider android:name="androidx.core.content.FileProvider" ...

Take a look at this thread for more details.

@Willhay108-imprint
Copy link

Fixed. Brilliant. Thank you.

@ValentinMolina500
Copy link
Author

Unfortunately, none of those suggestions seemed to have helped.

Here is some interesting log info of adb logcat:

08-01 18:22:24.161 23963 23963 I FIAM.Headless: Starting InAppMessaging runtime with Instance ID fLYy8gqC79c
08-01 18:22:24.200 23963 23963 D AndroidRuntime: Shutting down VM
08-01 18:22:24.203 23963 23963 E AndroidRuntime: FATAL EXCEPTION: main
08-01 18:22:24.203 23963 23963 E AndroidRuntime: Process: org.nativescript.TRIOApp, PID: 23963
08-01 18:22:24.203 23963 23963 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/OkHttpDownloader;
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.injection.modules.PicassoModule.providesFiamController(com.google.firebase:firebase-inappmessaging-display@@17.2.0:52)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.injection.modules.PicassoModule_ProvidesFiamControllerFactory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:34)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.injection.modules.PicassoModule_ProvidesFiamControllerFactory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:11)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.FiamImageLoader_Factory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:21)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.FiamImageLoader_Factory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:8)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay_Factory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:62)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay_Factory.get(com.google.firebase:firebase-inappmessaging-display@@17.2.0:16)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.injection.components.DaggerAppComponent.providesFirebaseInAppMessagingUI(com.google.firebase:firebase-inappmessaging-display@@17.2.0:102)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar.buildFirebaseInAppMessagingUI(com.google.firebase:firebase-inappmessaging-display@@17.2.0:74)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar.access$lambda$0(Unknown Source:0)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar$$Lambda$1.create(Unknown Source:2)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.lambda$new$0(com.google.firebase:firebase-common@@17.1.0:66)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.components.Lazy.get(com.google.firebase:firebase-common@@17.1.0:55)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(com.google.firebase:firebase-common@@17.1.0:155)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@17.1.0:565)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.1.0:310)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.1.0:273)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.1.0:257)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.1.0:53)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2082)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2056)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.1.0:47)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6946)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6491)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6408)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:220)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1852)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7319)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.OkHttpDownloader" on path: DexPathList[[zip file "/data/app/org.nativescript.TRIOApp-8Vhzh47G9q4SIG3rz-nt1A==/base.apk"],nativeLibraryDirectories=[/data/app/org.nativescript.TRIOApp-8Vhzh47G9q4SIG3rz-nt1A==/lib/x86, /data/app/org.nativescript.TRIOApp-8Vhzh47G9q4SIG3rz-nt1A==/base.apk!/lib/x86, /system/lib, /system/product/lib]]
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-01 18:22:24.203 23963 23963 E AndroidRuntime: ... 37 more
08-01 18:22:24.207 1941 2311 W ActivityTaskManager: Force finishing activity org.nativescript.TRIOApp/com.tns.NativeScriptActivity
08-01 18:22:24.209 1941 24750 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
08-01 18:22:24.213 23963 23963 I Process : Sending signal. PID: 23963 SIG: 9
08-01 18:22:24.222 1941 1974 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
08-01 18:22:24.222 1941 1974 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver

I hope this helps.

@DimitarTachev
Copy link
Contributor

Hi @ValentinMolina500,

It seems that your app is crashing because of a Firebase related exception:

08-01 18:22:24.203 23963 23963 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/OkHttpDownloader;
08-01 18:22:24.203 23963 23963 E AndroidRuntime: at com.google.firebase.inappmessaging.display.internal.injection.modules.PicassoModule.providesFiamController(com.google.firebase:firebase-inappmessaging-display@@17.2.0:52)

I suggest you try updating the nativescript-firebase plugin and open an issue in its GitHub repo if it's still crashing with the latest version. Also, there are a lot of threads discussing such error.

@AmithRamesh
Copy link

Migrating to androidx worked for me. Thank you.
@ValentinMolina500, try removing your node_modules, platforms and package-lock.json after updating NS to 6.0. This fixed the firebase plugin issue for me.

@ValentinMolina500
Copy link
Author

ValentinMolina500 commented Aug 5, 2019

Thanks for the suggestion but unfortunately that did not work for me.

I notice my AndroidManifest looks different, here is mine:

<supports-screens
	android:smallScreens="true"
	android:normalScreens="true"
	android:largeScreens="true"
	android:xlargeScreens="true"/>

<uses-sdk
	android:minSdkVersion="17"
	android:targetSdkVersion="__APILEVEL__"/>

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
	android:name="com.tns.NativeScriptApplication"
	android:allowBackup="true"
	android:icon="@drawable/icon"
	android:label="@string/app_name"
	android:theme="@style/AppTheme">

	<activity
		android:name="com.tns.NativeScriptActivity"
		android:label="@string/title_activity_kimera"
		android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
		android:theme="@style/LaunchScreenTheme">

		<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

		<intent-filter>
			<action android:name="android.intent.action.MAIN" />
			<category android:name="android.intent.category.LAUNCHER" />
		</intent-filter>
	</activity>
	<activity android:name="com.tns.ErrorReportActivity"/>
</application>

@DimitarTachev
Copy link
Contributor

@ValentinMolina500

I'm closing this issue as the error is very common and we've isolated and moved the discussion for your case in the Firebase plugin. Feel free to open a new issue if you have further details for something related to the NativeScript CLI.

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

No branches or pull requests

6 participants