Cordova App breaks on Android lollipop, During app installation this is what i see in the logcat, though i am not sure if these are the actual cause of the error. (app installs/works fine on versions < 5.0)
using cordova v-5.1.1 & cordova-android#4.0.2
I/PersonaManagerService( 3485): PersonaId don't exist
I/ActivityManager( 3485): do not start freezing screen for locked container getKeyguardshowstate = false
E/Parcel ( 3485): Class not found when unmarshalling: com.android.packageinstaller.InstallFlowAnalytics
E/Parcel ( 3485): java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics
further downword in the logs i see this
D/ApplicationPolicy( 3485): isStatusBarNotificationAllowedAsUser: packageName = com.android.providers.downloads,userId = 0
V/ApplicationPolicy( 3485): isApplicationStateBlocked userId 0 pkgname com.android.providers.downloads
W/NotificationService( 3485): Pray mode not found android.content.pm.PackageManager$NameNotFoundException: Application package com.sec.android.settings.praymodewidget not found
I/PackageManager( 3485): do mInstaller.dexopt : 0
D/PackageManager( 3485): Time to dexopt: 1.389 seconds
W/System.err( 3485): java.io.FileNotFoundException: /data/app/com.TestApp.Test-1: open failed: EISDIR (Is a directory)
W/System.err( 3485): at libcore.io.IoBridge.open(IoBridge.java:456)
W/System.err( 3485): at java.io.FileInputStream.<init>(FileInputStream.java:76)
W/System.err( 3485): at android.content.pm.PackageParser.getHashValueOfPackage(PackageParser.java:5170)
W/System.err( 3485): at com.android.server.pm.PackageManagerService.saveHash(PackageManagerService.java:19974)
W/System.err( 3485): at com.android.server.pm.PackageManagerService.access$5800(PackageManagerService.java:352)
W/System.err( 3485): at com.android.server.pm.PackageManagerService$21.run(PackageManagerService.java:19959)
W/System.err( 3485): Caused by: android.system.ErrnoException: open failed: EISDIR (Is a directory)
W/System.err( 3485): at libcore.io.IoBridge.open(IoBridge.java:446)
W/System.err( 3485): ... 5 more
W/System.err( 3485): remove failed: ENOENT (No such file or directory) : /data/system/packages.xml.bak
W/System.err( 3485): remove failed: ENOENT (No such file or directory) : /data/system/users/0/package-restrictions.xml.bak
D/PackageManager( 3485): New package installed
Though the application then installs successfully but there are rendering issue's when i start the app.
In-case you need some other information on the error let me know.
Related
Facing this problem while trying to implement JaCoCo Offline Instrumentation.
W/System.err( 1733): java.io.FileNotFoundException: /jacoco.exec: open failed: EROFS (Read-only file system)
W/System.err( 1733): at libcore.io.IoBridge.open(IoBridge.java:456)
W/System.err( 1733): at java.io.FileOutputStream.<init>(FileOutputStream.java:89)
--
W/System.err( 1733): at libcore.io.IoBridge.open(IoBridge.java:456)
W/System.err( 1733): at java.io.FileOutputStream.<init>(FileOutputStream.java:89)
W/System.err( 1733): at org.jacoco.agent.rt.internal_14f7ee5.output.FileOutput.openFile(FileOutput.java:67)
W/System.err( 1733): at org.jacoco.agent.rt.internal_14f7ee5.output.FileOutput.startup(FileOutput.java:49)
W/System.err( 1733): at org.jacoco.agent.rt.internal_14f7ee5.Agent.startup(Agent.java:122)
W/System.err( 1733): at org.jacoco.agent.rt.internal_14f7ee5.Agent.getInstance(Agent.java:50)
W/System.err( 1733): at org.jacoco.agent.rt.internal_14f7ee5.Offline.<clinit>(Offline.java:31)
The solution is well-documented in jacoco but for Android people, what you need is to add the file in /src/androidTest/resources/jacoco-agent.properties with the contents output=none so jacoco can startup without failing, and coverage will be written as normal and transferred correctly later by the android gradle plugin coverage implementation.
I think it's safe to ignore that offline instrumentation warning, because the path should be something alike: executionData = files("${project.buildDir}/jacoco/${testTaskName}.exec") (on the PC - so there is no need to save it on the device and then pull the file).
On Android this will add the JaCoCo agent into the APK:
buildTypes {
debug {
testCoverageEnabled = true
}
}
I created a very basic Nativescript Android app that uses the nativescript-barcodescanner plugin. The app builds successfully but when it gets deployed on the emulator I get the following error. Any idea what I can do to resolve this or what could be causing this?
error:
java.lang.RuntimeException: Unable to resume activity {org.nativescript.barcodescanner/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreateView failed
Error: File /data/data/org.nativescript.barcodescanner/files/app/.components/information/information.component.html does not exist. Resolved from: .components/information/information.component.html.
File: "/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js, line: 22, column: 12
StackTrace:
Frame: function:'FileSystemResourceLoader.get', file:'/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js', line: 22, column: 19
Frame: function:'DirectiveNormalizer._fetch', file:'/data/data/org.nativescript.barcodescanner/files/app/tns_modules/#angular/compiler/bundles/compiler.umd.js', line: 13661, column: 45
Frame: function:'DirectiveNormalizer.normalizeTemplateAsync', file:'/data/data/org.nativescript.barcodescanner/files/
And the last few lines of my command prompt:
BUILD SUCCESSFUL
Total time: 1 mins 9.45 secs
Project successfully built
Successfully deployed on device with identifier '192.168.8.101:5555'.
W/System.err( 2258): at com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err( 2258): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
W/System.err( 2258): at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
W/System.err( 2258): at com.tns.Runtime.callJSMethod(Runtime.java:716)
W/System.err( 2258): at com.tns.Runtime.callJSMethod(Runtime.java:697)
W/System.err( 2258): at com.tns.Runtime.callJSMethod(Runtime.java:687)
It seems that it can not find .components/information/information.component.html and prevents from resuming
the activity , maybe there is a problem with you relative path or something(like components instead of .components)
Here is the stacktrace:
08-04 11:14:20.035 31839-31839/datinglove.co.in E/Zygote: Zygote: error closing descriptor
libcore.io.ErrnoException: close failed: EBADF (Bad file number)
at libcore.io.Posix.close(Native Method)
at libcore.io.BlockGuardOs.close(BlockGuardOs.java:75)
at com.android.internal.os.ZygoteInit.closeServerSocket(ZygoteInit.java:198
at com.android.internal.os.ZygoteConnection.handleChildProc(ZygoteConnection.java:879)
at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:242)
at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:662)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)
at dalvik.system.NativeStart.main(Native Method)
Once check internet Permission with app.
Have you used any third part library in app ?
I am debugging using an actual phone, and sometimes I am inspecting the contents of an Intent (which naturally arrives on the main thread) in the debugger. However, since I am blocking the main thread, the system throws an ANR. Afterwards, the app crashes and I see this in LogCat:
Here is the exception:
07-25 12:25:32.058 673-15203/system_process E/ActivityManager﹕ Error reading /data/anr/traces.txt
java.io.FileNotFoundException: /data/anr/traces.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at android.os.FileUtils.readTextFile(FileUtils.java:159)
at com.android.server.am.ActivityManagerService$15.run(ActivityManagerService.java:8926)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at android.os.FileUtils.readTextFile(FileUtils.java:159)
at com.android.server.am.ActivityManagerService$15.run(ActivityManagerService.java:8926)
Terminal shows that the file is actually not there. If I try and create it myself, it just gets deleted and the exception is still thrown. There is actually a different file: traces_com.foo.bar.txt. Maybe it is supposed to be looking for that, but isnt for some reason?
I was getting this failure on a ICS device with latest Google Play Services when trying to call GoogleAuthUtil.getToken(args). The issue was resolved by removing and adding Google account to the phone. I wasn't able to reproduce the error. Google searching stack trace provided no insights. Any ideas on how this issue could be prevented and what it means are appreciated!
W/System.err( 3145): java.lang.SecurityException: Permission Denial: reading com.google.android.gsf.gservices.GservicesProvider uri content://com.google.android.gsf.gservices/prefix from pid=3145, uid=10055 requires com.google.android.providers.gsf.permission.READ_GSERVICES
W/System.err( 3145): at android.os.Parcel.readException(Parcel.java:1327)
W/System.err( 3145): at android.os.Parcel.readException(Parcel.java:1281)
W/System.err( 3145): at com.google.android.gms.internal.a$a$a.a(Unknown Source)
W/System.err( 3145): at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
W/System.err( 3145): at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
W/System.err( 3145): at com.xxxxx.Backend.obtainSheetKeyAndInitService(Backend.java:112)
W/System.err( 3145): at com.xxxxx.Backend.fetchColumns(Backend.java:103)
W/System.err( 3145): at com.xxxxx.ProgressActivity$DummySectionFragment$3.doInBackground(ProgressActivity.java:288)
W/System.err( 3145): at com.xxxxx.ProgressActivity$DummySectionFragment$3.doInBackground(ProgressActivity.java:1)
W/System.err( 3145): at android.os.AsyncTask$2.call(AsyncTask.java:264)
W/System.err( 3145): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err( 3145): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err( 3145): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
W/System.err( 3145): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 3145): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err( 3145): at java.lang.Thread.run(Thread.java:856)
EDIT
As of time of reporting the bug:
google_play_services-lib android:versionName="3.2.65 (834000-30)"
Google Play Services version on device 4.0.31
Updated library to 4.0.30 and added requested permission to Manifest which seems to have worked. Waiting for Google to confirm that new library version fixes this issue because adding a new permission is a highly undesirable fix.
Bug report: http://code.google.com/p/android/issues/detail?id=61934
You should add
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
to the AndroidManifest.xml file. Thats all.
Today 2013-11-14 there has been a large drop in the number of error reports we have received due to this exception. Also I see Google Play Services version 4.0.33 is out, I didn't notice exactly when that released but it looks like yesterday.
Perhaps Google released a fix in 4.0.33? That would be great!
If anyone has been able to reproduce this bug, please let us know if 4.0.33 fixes it for you. (We have never been able to reproduce the bug on a dev device, although we have have zillions of traces from our installed base.)
[UPDATE] Google has definitely pushed a fix, we had only a handful of reports on 11/15 and zero on 11/16