DeviceFarmer / minicap

Stream real-time screen capture data out of Android devices.
Other
294 stars 76 forks source link

Error: "Failed to instantiate [ch.qos.logback.classic.LoggerContext]" #46

Open stoefln opened 1 year ago

stoefln commented 1 year ago

What is the issue or idea you have? I launch the kotlin version of minicap on an Android 29 AVD (rooted) via this command :

CLASSPATH=/data/local/tmp/minicap/minicap-kotlin2.apk /system/bin/app_process /system/bin io.devicefarmer.minicap.Main -Q 60 -P 800x1280@800x1280/0

...but I get following error:

Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
    at android.os.Environment.getExternalStorageState(Environment.java:1026)
    at ch.qos.logback.core.android.AndroidContextUtil.getMountedExternalStorageDirectoryPath(Unknown Source:0)
    at ch.qos.logback.core.android.AndroidContextUtil.setupProperties(Unknown Source:14)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source:12)
    at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source:7)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(Unknown Source:20)
    at org.slf4j.impl.StaticLoggerBinder.getSingleton(Unknown Source:0)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
    at io.devicefarmer.minicap.provider.BaseProvider.<clinit>(BaseProvider.kt:44)
    at io.devicefarmer.minicap.Main$Companion.main(Main.kt:62)
    at io.devicefarmer.minicap.Main.main(Unknown Source:2)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:338)
PID: 7862
INFO: 800x1280@800x1280/0

Have you tried STF? Have not tried it in STF.

It seems minicap is started anyway, but this error is breaking my toolchain... Any ideas of what's going on?

stoefln commented 1 year ago

Also filed a bug here: https://github.com/tony19/logback-android/issues/315