LocalFingerprints: cannot compute fingerprint - android

I am getting one strange error it occurs randomly to any time and crashes the app. i am testing on nexus 6 in Android 7.0
here is log cat
E/LocalFingerprints: cannot compute fingerprint for: content://media/external/images/media/306155
java.io.IOException: read failed: EISDIR (Is a directory)
at libcore.io.IoBridge.read(IoBridge.java:481)
at java.io.FileInputStream.read(FileInputStream.java:252)
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.security.DigestInputStream.read(DigestInputStream.java:161)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at kei.b(PG:81)
at imp.a(PG:1324)
at ilf.a(PG:131)
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.system.ErrnoException: read failed: EISDIR (Is a directory)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:169)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:231)
at libcore.io.IoBridge.read(IoBridge.java:471)
at java.io.FileInputStream.read(FileInputStream.java:252) 
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889) 
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273) 
at java.io.BufferedInputStream.read(BufferedInputStream.java:334) 
at java.security.DigestInputStream.read(DigestInputStream.java:161) 
at java.io.FilterInputStream.read(FilterInputStream.java:107) 
at kei.b(PG:81) 
at imp.a(PG:1324) 
at ilf.a(PG:131) 
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81) 
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.os.HandlerThread.run(HandlerThread.java:61) 

Related

FileNotFoundException when app is updated to Android 11+ MediaRecord.prepare(). "FileNotFoundException open failed: EPERM (Operation not permitted)"

When you install the app for the first time, it works normally without any problems.
However, if you update the app while the app is already installed, a problem occurs in api 30+ version.(current .apk, update .aab)
java.io.FileNotFoundException:/storage/emulated/0/Documents/xxxx/100536_20220503_092934_96001.mp4: open failed: EPERM (Operation not permitted)
at libcore.io.IoBridge.open(IoBridge.java:492)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:152)
at android.media.MediaRecorder.prepare(MediaRecorder.java:1417)
at xxxx.xxxx.com.xxxx.service.RecordService.onStart(RecordService.java:207)
at android.app.Service.onStartCommand(Service.java:505)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4795)
at android.app.ActivityThread.access$2000(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2215)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: android.system.ErrnoException: open failed: EPERM (Operation not permitted)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8514)
at libcore.io.IoBridge.open(IoBridge.java:478)
'''

How to make the Android plugin read a json file from Internal storage from Unity?

Im successful adding a desired json file to the internal storage of my app data/<packagename>/files/ .
What I want to achieve is, to make a function in my android plugin (inside Unity app) which can read the same json from internal storage. Im doubtful, if this is even possible at runtime. I tried this in my plugin contentprovider class String file_name=context.getFilesDir() + "/"+"stickers.json"; but my app crashes on device.
Second alternative which I thought is to pass the whole json object to Android plugin by using UnitySendMessage (I have never used it before).
I want the plugin to read the internally stored json because I can dynamically modify the json at runtime from unity and perform my desired functions from the android plugin code.
UPDATE
--------- beginning of crash
2020-05-30 14:09:32.275 22270-22270/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.Addy.Trace, PID: 22270
java.lang.RuntimeException: Unable to get provider com.plugin.unityapp.StickerContentProvider: java.lang.RuntimeException: contents.json file has some issues: /data/user/0/com.Addy.Trace/files/stickers.json: open failed: ENOENT (No such file or directory)
at android.app.ActivityThread.installProvider(ActivityThread.java:7416)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6956)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6844)
at android.app.ActivityThread.access$1300(ActivityThread.java:268)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1982)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7814)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
Caused by: java.lang.RuntimeException: contents.json file has some issues: /data/user/0/com.Addy.Trace/files/stickers.json: open failed: ENOENT (No such file or directory)
at com.plugin.unityapp.StickerContentProvider.readContentFile(StickerContentProvider.java:164)
at com.plugin.unityapp.StickerContentProvider.getStickerPackList(StickerContentProvider.java:182)
at com.plugin.unityapp.StickerContentProvider.onCreate(StickerContentProvider.java:98)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2113)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2087)
at android.app.ActivityThread.installProvider(ActivityThread.java:7411)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6956) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6844) 
at android.app.ActivityThread.access$1300(ActivityThread.java:268) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1982) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:237) 
at android.app.ActivityThread.main(ActivityThread.java:7814) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068) 
Caused by: java.io.FileNotFoundException: /data/user/0/com.Addy.Trace/files/stickers.json: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.FileInputStream.<init>(FileInputStream.java:159)
at com.plugin.unityapp.StickerContentProvider.readContentFile(StickerContentProvider.java:156)
at com.plugin.unityapp.StickerContentProvider.getStickerPackList(StickerContentProvider.java:182) 
at com.plugin.unityapp.StickerContentProvider.onCreate(StickerContentProvider.java:98) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:2113) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:2087) 
at android.app.ActivityThread.installProvider(ActivityThread.java:7411) 
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6956) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6844) 
at android.app.ActivityThread.access$1300(ActivityThread.java:268) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1982) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:237) 
at android.app.ActivityThread.main(ActivityThread.java:7814) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068) 
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7691)
at libcore.io.IoBridge.open(IoBridge.java:482)
at java.io.FileInputStream.<init>(FileInputStream.java:159) 
at com.plugin.unityapp.StickerContentProvider.readContentFile(StickerContentProvider.java:156) 
at com.plugin.unityapp.StickerContentProvider.getStickerPackList(StickerContentProvider.java:182) 
at com.plugin.unityapp.StickerContentProvider.onCreate(StickerContentProvider.java:98) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:2113) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:2087) 
at android.app.ActivityThread.installProvider(ActivityThread.java:7411) 
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6956) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6844) 
at android.app.ActivityThread.access$1300(ActivityThread.java:268) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1982) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:237) 
at android.app.ActivityThread.main(ActivityThread.java:7814) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068) 
This is the crash log in LOGCAT of android studio. From unity in a script , im using the awake function and writing the json file to internal storage, but maybe during the startup of the app the plugin isnt detecting the json in internal storage using String file_name=context.getFilesDir() + "/"+"stickers.json";
JSON File content
{
"android_play_store_link": "",
"ios_app_store_link": "",
"sticker_packs": [
{
"identifier": "1",
"name": "Adi",
"publisher": "Jane Doe",
"tray_image_file": "Trayicon_Cat1.png",
"image_data_version":"1",
"avoid_cache":false,
"publisher_email":"",
"publisher_website": "",
"privacy_policy_website": "",
"license_agreement_website": "",
"stickers": [
{
"image_file": "Formidable.webp",
"emojis": ["☕","🙂"]
},
{
"image_file": "Awful.webp",
"emojis": ["😩","😰"]
},
{
"image_file": "Athletic.webp",
"emojis": ["☕","🙂"]
}
]
}
]
}

Android Studio 3.0.0-beta1 -- NoClassDefFoundError

Since upgrading Android Studio to v3.0.0-beta1 and amending classpath to 'com.android.tools.build:gradle:3.0.0-beta1' I am being hit with the following error each time my rxjava/retrofit code throws an error (a 401 HttpException in this example).
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:114)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: rx.exceptions.OnErrorFailedException: Error occurred when trying to propagate error to Observer.onError
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.checkTerminated(OperatorObserveOn.java:273)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:216)
at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107)
at android.os.Handler.handleCallback(Handler.java:746) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Caused by: rx.exceptions.CompositeException: 2 exceptions occurred.
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187) 
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) 
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.checkTerminated(OperatorObserveOn.java:273) 
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:216) 
at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107) 
at android.os.Handler.handleCallback(Handler.java:746) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Caused by: rx.exceptions.CompositeException$CompositeExceptionCausalChain: Chain of Causes for CompositeException In Order Received =>
at android.util.Log.getStackTraceString(Log.java:522)
at com.android.internal.os.RuntimeInit.Clog_e(RuntimeInit.java:61)
at com.android.internal.os.RuntimeInit.-wrap0(RuntimeInit.java)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:86)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:118)
at android.os.Handler.handleCallback(Handler.java:746) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Caused by: retrofit2.adapter.rxjava.HttpException: HTTP 401 Unauthorized
at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:43)
at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber$1.request(OperatorSubscribeOn.java:109)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.setProducer(OperatorSubscribeOn.java:105)
at rx.Subscriber.setProducer(Subscriber.java:205)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10346)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100)
at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
All error handlers have been set appropriately for RxJava calls.
Android sdk build tools v26.0.1
Tried clean, rebuild etc
Tried disabling Instant-Run
This issue was addressed by Google and fixed in Beta 2 update.
Friday, August 11, 2017
Android Studio 3.0 Beta 2 is now available in
the Canary and Dev channels. This release fixes an issue which
resulted in the compiler throwing a ClassNotFoundException when you
enable Java 8 language features and specify minSdkVersion 19 or
higher—this also caused some code analysis tools, such as ProGuard, to
fail. For more information, see issue #64527520.

Not able to receive crash reports in Acralyzer from ACRA

Below I have given all the crash logs printed in Logcat. I am crashing the app with the below code on a button's onclicklistener. The server is running and the device and server are in same wifi network.
throw new RuntimeException("This is a crash");
I went throught the installation twice for Acralyzer and couldn't find my mistake. And I am hosting the server my own laptop.
If anyone need any more details I am willing to post it. All the server related details I used as a guide is here
There is no reports displayed in server as well.
Logcat Logs
E/ACRA: ACRA caught a RuntimeException for com.example.sys.myapplication
java.lang.RuntimeException: This is a crash
at com.example.sys.myapplication.MainActivity$3.onClick(MainActivity.java:111)
at android.view.View.performClick(View.java:5207)
at android.view.View$PerformClick.run(View.java:21168)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.sys.myapplication, PID: 16543
java.lang.RuntimeException: This is a crash
at com.example.sys.myapplication.MainActivity$3.onClick(MainActivity.java:111)
at android.view.View.performClick(View.java:5207)
at android.view.View$PerformClick.run(View.java:21168)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
W/System: ClassLoader referenced unknown path: /data/app/com.example.sys.myapplication-2/lib/arm
W/System: ClassLoader referenced unknown path: /data/app/com.example.sys.myapplication-2/lib/arm
E/InstantRun: IO Error creating local socket at com.example.sys.myapplication
java.io.IOException: Address already in use
at android.net.LocalSocketImpl.bindLocal(Native Method)
at android.net.LocalSocketImpl.bind(LocalSocketImpl.java:309)
at android.net.LocalServerSocket.<init>(LocalServerSocket.java:48)
at com.android.tools.fd.runtime.Server.<init>(Server.java:94)
at com.android.tools.fd.runtime.Server.create(Server.java:88)
at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:315)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4728)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T18:44:37.046+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T18:44:37.046+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102) 
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70) 
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69) 
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:02:07.897+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:02:07.897+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102) 
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70) 
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69) 
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:03:58.007+05:30.stacktrace
E/ACRA: Failed to send crash report for /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:03:58.007+05:30.stacktrace
org.acra.sender.ReportSenderException: Error while sending JSON report via Http POST
at org.acra.sender.HttpSender.send(HttpSender.java:236)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102)
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70)
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984) after 5000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at org.acra.util.HttpRequest.send(HttpRequest.java:142)
at org.acra.sender.HttpSender.send(HttpSender.java:233)
at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:102) 
at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:70) 
at org.acra.sender.SenderService.onHandleIntent(SenderService.java:69) 
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
I/ACRA: Sending report /data/user/0/com.example.sys.myapplication/app_ACRA-approved/2016-05-05T19:20:27.024+05:30.stacktrace
The log is pretty clear:
java.net.SocketTimeoutException: failed to connect to /192.168.1.15 (port 5984)
ACRA can't reach the server.
You can check if you can reach the server from a normal mobile browser to identify the problems location.
For those who might struggle with the same issue, here's what I did. Couchdb by default listens only to the localhost. You can enable listening for remote device or other systems by setting from bind_address = 127.0.0.1 to bind_address = 0.0.0.0. The files can be found under C:\Program Files (x86)\Apache Software Foundation\CouchDB\etc\couchdb, default.ini and local.ini. Check in both as for me it was default.ini and local.ini file had it commented out. local.ini file settings will override default.ini file as stated in documentation of local.ini file.
btw this didn't solve my entire problem yet. Now I am able to send the request to the server. But the Acralyzer Dashboard shows no details of the inserted data. And I am not sure yet whether the data is inserted correctly or not.

Confused why these errors are happening, and what they mean?

I'm messing around with DBFlow in a android app trying to learn the framework a bit, and I've started getting errors, though I'm not sure they are related to DBFlow.
Here is the error messages:
01-12 06:49:43.817 1294-1310/? E/BluetoothAdapter: Bluetooth binder is null
01-12 06:49:43.818 1294-1310/? E/KernelCpuSpeedReader: Failed to read cpu-freq
java.io.FileNotFoundException: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelCpuSpeedReader.readDelta(KernelCpuSpeedReader.java:49)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8002)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at java.io.FileInputStream.<init>(FileInputStream.java:76) 
at java.io.FileInputStream.<init>(FileInputStream.java:103) 
at java.io.FileReader.<init>(FileReader.java:66) 
at com.android.internal.os.KernelCpuSpeedReader.readDelta(KernelCpuSpeedReader.java:49) 
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8002) 
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366) 
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
at com.android.server.ServiceThread.run(ServiceThread.java:46) 
01-12 06:49:43.818 1294-1310/? E/KernelUidCpuTimeReader: Failed to read uid_cputime
java.io.FileNotFoundException: /proc/uid_cputime/show_uid_stat: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelUidCpuTimeReader.readDelta(KernelUidCpuTimeReader.java:71)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8031)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at java.io.FileInputStream.<init>(FileInputStream.java:76) 
at java.io.FileInputStream.<init>(FileInputStream.java:103) 
at java.io.FileReader.<init>(FileReader.java:66) 
at com.android.internal.os.KernelUidCpuTimeReader.readDelta(KernelUidCpuTimeReader.java:71) 
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8031) 
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366) 
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
at com.android.server.ServiceThread.run(ServiceThread.java:46)
I'm pretty new to Android development and confused why they are occurring. It is not crashing my application, and doesn't appear to happen every single time.
By the way, I'm using the Nexus 5 Emulator to run this, so maybe it's related to that? Usually errors are bad, so I'm assuming this is something to be concerned with, regardless of it not appearing to effect the app...?
Maybe you need permision read/write Files
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
You are refering to the DBFlow framework. Well DBFlow is probably just a library to interact with a DB. Now the real question is do you know if your app has permission to read each of those files? What you see in command line vs app are not the same. I believe in the emulator you run as root. As for your app you are not root. Try checking what permissions your app has with respect to that File via the File APIs
If you use lib LeakCanary that happens because the lib writes of the leaks on your external storage, if you use the android API 23 and higher you will be asked for permission runtime, but dont have that permission in Manifest file.

Categories

Resources