Skip to content
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

Strange logs after project built #4300

Closed
NickIliev opened this issue Nov 13, 2018 · 6 comments
Closed

Strange logs after project built #4300

NickIliev opened this issue Nov 13, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@NickIliev
Copy link
Contributor

@webleaf commented on Mon Nov 12 2018

Environment

  • CLI: 5.0.0
  • Cross-platform modules: 5.0.2
  • Android Runtime: 5.0.0
  • iOS Runtime: not tested
  • Plugin(s):

Describe the bug
After upgrading to NS5, I've began to receive such logs at the start of the application.
Testing with tns-template-blank-ts gives same result.

Project successfully built.
Installing on device 5200e1f54ddb421...
Successfully installed on device with identifier '5200e1f54ddb421'.
Refreshing application on device 5200e1f54ddb421...
Successfully synced application org.nativescript.test on device 5200e1f54ddb421.
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-12 15:56:35.974 30859 30859 I art     :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)

To Reproduce

tns create my-blank-ts --template tns-template-blank-ts

Additional context

macOS High Sierra 10.13.3


@nuvoPoint commented on Mon Nov 12 2018

Same issue here, but on Windows.

@vtrifonov
Copy link
Contributor

This happens because of a warning when using support library 28 or later. You can check for more details here - https://stackoverflow.com/a/52954286/613113. Unfortunately I'm not sure what we can do to avoid this warning, the good thing is that this shouldn't be really a problem.

@webleaf
Copy link

webleaf commented Nov 14, 2018

Subject logs are from Samsung Galaxy A3 (2017) (Android 7.0).
Same device, but with Android 8.0, produces similar logs, but repeated several times:

Installing on device 5200dd56ecf0b47...
Successfully installed on device with identifier '5200dd56ecf0b47'.
Successfully transferred app.css on device 5200dd56ecf0b47.
Successfully transferred home-page.xml on device 5200dd56ecf0b47.
Successfully transferred home-view-model.js on device 5200dd56ecf0b47.
Refreshing application on device 5200dd56ecf0b47...
Successfully synced application org.nativescript.test on device 5200dd56ecf0b47.
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.476 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.477 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.477 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.477 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.478 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-14 12:43:32.479 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.479 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.479 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) (Runtime.java:-2)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.dispatchCallJSMethodNative(int, java.lang.String, boolean, long, java.lang.Class, java.lang.Object[]) (Runtime.java:1116)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethodImpl(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:996)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, long, java.lang.Object[]) (Runtime.java:983)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, boolean, java.lang.Object[]) (Runtime.java:967)
11-14 12:43:32.480 30495 30495 I zygote  :   at java.lang.Object com.tns.Runtime.callJSMethod(java.lang.Object, java.lang.String, java.lang.Class, java.lang.Object[]) (Runtime.java:959)

Also I test it on Lenovo TAB 2 A8-50LC (Android 5.1). It produces such logs:

Refreshing application on device LenovoTAB2A8...
Successfully synced application org.nativescript.test on device LenovoTAB2A8.
ActivityManager: Start proc 18404:org.nativescript.test/u0a111 for activity org.nativescript.test/com.tns.NativeScriptActivity
ActivityManager: getContentProviderImpl: from caller=android.app.ApplicationThreadProxy@2e86e1ae (pid=18404, userId=0) to get content provider settings cpr=ContentProviderRecord{288386ff u0 com.android.providers.settings/.SettingsProvider}
D/ActivityThread(18404): hoder:android.app.IActivityManager$ContentProviderHolder@29e88b48,provider,holder.Provider:android.content.ContentProviderProxy@34236de1
D/AccessibilityManager(18404): 	at com.tns.Runtime.callJSMethodNative(Native Method)
D/AccessibilityManager(18404): 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
D/AccessibilityManager(18404): 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
D/AccessibilityManager(18404): 	at com.tns.Runtime.callJSMethod(Runtime.java:983)
D/AccessibilityManager(18404): 	at com.tns.Runtime.callJSMethod(Runtime.java:967)
D/AccessibilityManager(18404): 	at com.tns.Runtime.callJSMethod(Runtime.java:959)

Also tested on Meizu M2 (Android 5.1) without such logs.

@lini
Copy link
Contributor

lini commented Nov 15, 2018

Try adding the following code in your app/App_Resources/Android/app.gradle file under the android section and see if it stops the stack trace logs on startup:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == "com.android.support") {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion "26.+"
            }
        }
    }
}

@webleaf
Copy link

webleaf commented Nov 15, 2018

@lini it helps with Samsung. But still appears on Lenovo TAB 2 A8-50LC (Android 5.1) and now with delay (after my logs).

Installing on device LenovoTAB2A8...
Successfully installed on device with identifier 'LenovoTAB2A8'.
Refreshing application on device LenovoTAB2A8...
ActivityManager: Start proc 3649:com.test/u0a112 for activity com.test/com.tns.NativeScriptActivity
ActivityManager: getContentProviderImpl: from caller=android.app.ApplicationThreadProxy@1bc405fe (pid=3649, userId=0) to get content provider settings cpr=ContentProviderRecord{288386ff u0 com.android.providers.settings/.SettingsProvider}
D/ActivityThread( 3649): hoder:android.app.IActivityManager$ContentProviderHolder@29e88b48,provider,holder.Provider:android.content.ContentProviderProxy@34236de1
Successfully synced application com.test on device LenovoTAB2A8.
JS: Some my logs...
JS: Some my logs...
JS: Some my logs...
JS: Some my logs...
D/AccessibilityManager( 3649): 	at com.tns.Runtime.callJSMethodNative(Native Method)
D/AccessibilityManager( 3649): 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
D/AccessibilityManager( 3649): 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
D/AccessibilityManager( 3649): 	at com.tns.Runtime.callJSMethod(Runtime.java:983)
D/AccessibilityManager( 3649): 	at com.tns.Runtime.callJSMethod(Runtime.java:967)
D/AccessibilityManager( 3649): 	at com.tns.Runtime.callJSMethod(Runtime.java:959)

@relez
Copy link

relez commented Nov 16, 2018

Hey guys, I made the changes provided above, and no warnings are shown 👍, but still if I enable Snapshot in Sidekick for production the app crashes.

I am using a Samsung Galaxy A tablet also deploying in a Pixel 2 API 28 emulator, in both of them the app crashes.

Is this a common issue or am I missing something?

Thanks!

@vtrifonov vtrifonov transferred this issue from NativeScript/android Jan 18, 2019
@vtrifonov
Copy link
Contributor

vtrifonov commented Jan 18, 2019

The log that comes in that case looks like an exception but is logged as Info:
11-14 12:43:32.480 30495 30495 I zygote
That's how it can be filtered in the CLI.

Here's the log from an exception in Android Runtime and here's the log received when application starts.

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

9 participants