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

3

8

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...?

Jenjena answered 12/1, 2016 at 14:59 Comment(5)
it cant find the file because it can find it , to get a better answer please provide some code snippetOutlast
@SarahMaher I'm not really sure what of the code to copy and paste, but I am simply messing with shared preferences, do I need to add a permission for it or something? The file exists...I am staring at it in the /shared_prefs, and I am reading and writing to it...Jenjena
Dustin, you are saying you are learning the android fraemwork.. but you mention an app. Problem is they're NOT the same and in certain cases are not even comparable, framework has many other need-to-know information to do things than just apps. Which is it? Also how do you know you have permission to reach the file you're looking at? Your app isn't root...Mure
@JoxTraex That's actually not what I said, maybe I need to reword it? If you re-read the statement it says I am learning DBFlow. I'll reword it if you want...Jenjena
did you manage to solve this problem, i am facing the same error nowCenturion
L
3

Maybe you need permision read/write Files

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Lidda answered 13/12, 2016 at 20:33 Comment(0)
M
0

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

Mure answered 12/1, 2016 at 15:19 Comment(0)
P
0

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.

Phonetist answered 24/8, 2018 at 16:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.