csicar / Ning

Network-Scanner for Android
217 stars 35 forks source link

App stops working when scanning #1

Closed knby0 closed 4 years ago

knby0 commented 4 years ago

Hey,

I just installed the app from the f-droid repository. When I swipe down to begin the scan, it takes some seconds scanning before closing itself.

I'm running LineageOS 17.1 (official build). If any more info is required please tell me.

csicar commented 4 years ago

If you know how to Access the logs, it would be very useful if you could post them here.

~~ The easiest way would be to install termux and run the command logcat, then open Ning and then go back to termux to copy the new log entries.~~

Edit: that method only seems to log termux's own log messages.

If your device is rooted, you could use "LogCat Reader" from fdroid otherwise running adb logcat on your computer is probably the best way

More info can be found here https://android.stackexchange.com/questions/14430/how-can-i-view-and-examine-the-android-log

knby0 commented 4 years ago

I used Logcat Reader, here's the error message for Ning, of course my phone is rooted:

FATAL EXCEPTION: main Process: de.csicar.ning, PID: 8267 java.io.FileNotFoundException: /proc/net/arp: open failed: EACCES (Permission denied) at libcore.io.IoBridge.open(IoBridge.java:496) at java.io.FileInputStream.<init>(FileInputStream.java:159) at de.csicar.ning.scanner.ArpScanner$getArpTableFromFile$2.invokeSuspend(ArpScanner.kt:50) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:561) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:727) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:667) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:655) Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied) 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:7255) at libcore.io.IoBridge.open(IoBridge.java:482) ... 8 more

csicar commented 4 years ago

The log was really helpful. I think I fixed the issue now. If you want to try if it works for you, you can get the apk for the current master branch here: https://github.com/csicar/Ning/releases/download/v1.2.1-alpha/app-debug.apk

You might need to uninstall Ning before you can install the apk file from the GitHub releases

maurerle commented 4 years ago

I tested it and it works far better! Thank you for this app!

It does not crash anymore. Just the DeviceName is left blank. Would be cool if this works too

It can already replace Fing for most of my needs but I hope there will be a few more functionalities in the future 👍