-
-
Notifications
You must be signed in to change notification settings - Fork 197
Error when running on real android device #2140
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hard to tell without looking the code. Somewhere in your code or plugin trying to convert not json formatted string into json. something similar : NativeScript/android#404 |
Thanks for your answer, the problem is present on the very start of application developpement, even if i do :
If i look more in detail on the error i mentioned before, it looks like it crash on parsing something like html code. |
If its parsing html it is possible your backend sending html not json. Can you create simple github project to reproduce the problem?. |
Can you please test on emulator or other device in order to isolate the issue. |
Yes 100% sure for reproductibility with blank template. I don't think a github project will help, since it seems to be very device related. Just for info, here are the device specs http://i.imgur.com/WajgLsy.png. I have no idea for a backend service but the spammy logs are present in "run" & "livesync", and continue even if i close the app with long press on home. |
An easy workaround is launching the app with :
But in this case, it's possible to miss some real errors. |
@DavidBabel does the problem occur for you if you do just |
Yes it does |
same error with my redmi 2:
|
Since you are using CyanogenMode 13 I guess you can enable root permisstions in adb shell
then upload the mylog.log to pastebin or github gist or somewhere else (the file will be big) these steps will enable logging of every method {N} is making to and from java so we can identify what is being called. cheers |
Also you can try doing it from within your app code by calling this method as the very first Javascript statement enableVerboseLogging(); then you can check logcat to see that indeed {N} is outputing very verbose messages for the app invocations. The above steps are still relevant so try both ways maybe cheers |
Thank you for the feedback, I'll try again and post the log here. |
The log: Thanks for your help! :) |
The actual error which is causing the crash ->
It's an error that has been reported before by other Xiaomi REDMI 2 (4.4.4) users. Check out the following conversation to see if anything there can help solve your issue -> NativeScript/android#445 (comment) |
But I've tried to run 'tns run android --compileSdk 19' but exit with an errror: https://gist.github.com/danieloprado/bde536c52c3c8c2c9da43bd0aad1c481 Same as: NativeScript/NativeScript#2914 |
Hi @danieloprado, |
Hi @Plamen5kov, Thanks for your answer. So native doesn't support 4.4.4 kikat or lower, because I´m trying to run the statup app. |
Hey @danieloprado For example you can deploy an app on a phone API 19 even when you build the package with Build-tools 25 (compileSdk 25). Now, it is the developer's responsibility to handle differences in API levels accordingly, but that should not be necessary in 99% of the cases when writing NativeScript. The core-modules that are available with every NativeScript application and they should be more than enough for your next cool app's needs. |
But I'm trying to run the angular2 template with no modifications. and the first error "callJSMethodNative" ocurred in the core of application and I no be able to run the app in a phone with android 4.4.4 or lower |
Hi @DavidBabel @danieloprado @matart15 I am closing this issue because it is android-runtime related so I moved it to NativeScript/android#628. |
Hey,
I don't know if i'm doing something wrong, but when i try to run a very basic app on a device with :
Then app install and run well, but the console spam (a lot) this error, making debug very difficult :
https://gist.github.com/DavidBabel/b595ef8d3b9f5e064ae804dbf9aff5eb
My device is a serrano LTE (samsung galaxy S4 mini) running a 6.0 CyanogenMod, and here are my Nativescript components versions :
https://gist.github.com/DavidBabel/fb9283040ca891f1873f503cb6d7cd3a
Am i doing something wrong ?
Thanks.
The text was updated successfully, but these errors were encountered: