question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App fails to install in debug mode on android

See original GitHub issue

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes.

Tell us about the problem

My app fails to install on my device on tns run android. iOS debugging works perfectly.

Which platform(s) does your issue occur on?

Android only.

Please provide the following version numbers that your issue occurs with:

  • CLI: v3.4.0
  • Cross-platform modules: v3.4.0
  • Runtime(s): tns-android v3.4.0

Please tell us how to recreate the issue in as much detail as possible.

tns run android

Output:

Running full build
The project successfully built.
Installing...
Unable to apply changes on device: e0c6dec1. Error is: The parser did not find any certificates in the .apk..
[NSDebugAdapter] The tns command finished its execution with code 0.

Additional details

This was working fine with v3.2 (or v3.3) of CLI and Android. The only changes since then was updating to the latest version of NS, as well as an Android OS update (now v7.0) on my testing device. When the <app_name>-debug.apk file is transferred to my device and installed manually, the installation is successful and it works normally.

The apk debug certificates are less than 365 days old.

Further (empirically), the installation is successful on the first attempt after a phone restart (after uninstallation), but live sync stops working (with above error) after about 10 iterations.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Fatmecommented, Apr 10, 2018

Hi @karthiksbhat,

I’m also suspecting it’s some local setup. But this kind of problems are very hard to investigate and to figure out.

My suggestion is to update to latest versions of nativescript and android which will be released this week and check if the error is still reproduced.

npm install -g nativescrip@rc
rm -rf platforms
tns platform add android@next
2reactions
devjosh-mudbathcommented, Apr 8, 2018

Hey @Fatme , I have managed to solve the issue for me. It looks like its because I had performed little clean up of the folders in the application in order to try and solve another issue I was having, and in the process had deleted the “hooks” folder. Deleting the hooks folder is something I do religiously when jumping between different version of my application, however this time for whatever reason the hooks folder had not generated.

I didn notice that the tns prepare android command was silently failing (some typescript errors) which could be why it was not not creating the “hooks” folder. After spotting the typescript error and running tns prepare again, the hooks folder came back and the error went away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install debug version of my android application
I wrote an android application in IDEA. When I used Debug-mode (connected to my device) - everything worked nice.
Read more >
Debug your app - Android Developers
Android Studio provides a debugger that allows you to do the following and more: Select a device to debug your app on. Set...
Read more >
app fails in debug mode | B4X Programming Forum
Hi, since today, all my apps did not run in "debug mode". In "release mode" everything works fine. I use B4A V11.00.
Read more >
Debug app installs and updates - Google Developers
The example log below shows a device that failed to sync with the latest managed Play policy because it wasn't connected to the...
Read more >
Android USB Debugging on Windows 10
Enable USB debugging on your Android phone · Install Java SE SDK 8 update 152 · Configure Android SDK · Configure Google Chrome...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found