slowscript / warpinator-android

An unofficial implementation of Warpinator for Android
GNU General Public License v3.0
481 stars 29 forks source link

Huawei Android Time API crashes the phone server #137

Closed abdoei closed 7 months ago

abdoei commented 7 months ago

On a Huawei phone Y9 Prime (2019) the server crashes when starting. And here is the log file

--------- beginning of main
03-18 21:11:12.467  5029  5029 E RtgSchedManager: endActivityTransaction: margin state not match
03-18 21:13:14.530  5029  5029 E RtgSchedManager: endActivityTransaction: margin state not match
03-18 21:13:14.539  5029  5029 E RtgSchedManager: endActivityTransaction: margin state not match
03-18 21:13:14.578  5029  5029 E RtgSchedManager: endActivityTransaction: margin state not match
03-18 21:15:06.918  5029  5029 E AwareLog: DynBufManager: endFling hash null
03-18 21:15:39.346  5029  5029 E AUTH    : Failed to create certificate
03-18 21:15:39.346  5029  5029 E AUTH    : java.lang.IllegalArgumentException: invalid date string: Unparseable date: "bd`cagaiaeciGMT+00:00"
03-18 21:15:39.346  5029  5029 E AUTH    :  at org.bouncycastle.asn1.ASN1UTCTime.<init>(Unknown Source:2)
03-18 21:15:39.346  5029  5029 E AUTH    :  at org.bouncycastle.asn1.DERUTCTime.<init>(Unknown Source:1)
03-18 21:15:39.346  5029  5029 E AUTH    :  at org.bouncycastle.asn1.x509.Time.<init>(Unknown Source:1)
03-18 21:15:39.346  5029  5029 E AUTH    :  at org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder.<init>(Unknown Source:11)
03-18 21:15:39.346  5029  5029 E AUTH    :  at slowscript.warpinator.Authenticator.getServerCertificate(Authenticator.java:213)
03-18 21:15:39.346  5029  5029 E AUTH    :  at slowscript.warpinator.MainService.onStartCommand(MainService.java:138)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4951)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.app.ActivityThread.access$3300(ActivityThread.java:260)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2486)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.os.Handler.dispatchMessage(Handler.java:110)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.os.Looper.loop(Looper.java:219)
03-18 21:15:39.346  5029  5029 E AUTH    :  at android.app.ActivityThread.main(ActivityThread.java:8668)
03-18 21:15:39.346  5029  5029 E AUTH    :  at java.lang.reflect.Method.invoke(Native Method)
03-18 21:15:39.346  5029  5029 E AUTH    :  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
03-18 21:15:39.346  5029  5029 E AUTH    :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
03-18 21:17:08.729 12651 12651 E ript.warpinato: LoadAppImageStartupCache enabled : 1
03-18 21:17:08.733 12651 12651 E ript.warpinato: Not starting debugger since process cannot load the jdwp agent.
03-18 21:17:08.785 12651 12672 E BehaviorCollectManager: Fail to acquire dataAnalyzerService...
03-18 21:17:08.902 12651 12678 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@d9d48e7
03-18 21:17:08.903 12651 12678 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@1d89c94
03-18 21:20:45.236 16162 16162 E ript.warpinato: LoadAppImageStartupCache enabled : 1
03-18 21:20:45.240 16162 16162 E ript.warpinato: Not starting debugger since process cannot load the jdwp agent.
03-18 21:20:45.305 16162 16181 E BehaviorCollectManager: Fail to acquire dataAnalyzerService...
03-18 21:20:45.386 16162 16185 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@766d801
03-18 21:20:45.387 16162 16185 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@d9d48e7
03-18 21:20:45.753 16162 16162 E HwViewGroupImpl: parse speed value length error
03-18 21:20:46.093 16162 16162 E AUTH    : Failed to create certificate
03-18 21:20:46.093 16162 16162 E AUTH    : java.lang.IllegalArgumentException: invalid date string: Unparseable date: "bd`cagaib`dfGMT+00:00"
03-18 21:20:46.093 16162 16162 E AUTH    :  at org.bouncycastle.asn1.ASN1UTCTime.<init>(Unknown Source:2)
03-18 21:20:46.093 16162 16162 E AUTH    :  at org.bouncycastle.asn1.DERUTCTime.<init>(Unknown Source:1)
03-18 21:20:46.093 16162 16162 E AUTH    :  at org.bouncycastle.asn1.x509.Time.<init>(Unknown Source:1)
03-18 21:20:46.093 16162 16162 E AUTH    :  at org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder.<init>(Unknown Source:11)
03-18 21:20:46.093 16162 16162 E AUTH    :  at slowscript.warpinator.Authenticator.getServerCertificate(Authenticator.java:213)
03-18 21:20:46.093 16162 16162 E AUTH    :  at slowscript.warpinator.MainService.onStartCommand(MainService.java:138)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4951)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.app.ActivityThread.access$3300(ActivityThread.java:260)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2486)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.os.Handler.dispatchMessage(Handler.java:110)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.os.Looper.loop(Looper.java:219)
03-18 21:20:46.093 16162 16162 E AUTH    :  at android.app.ActivityThread.main(ActivityThread.java:8668)
03-18 21:20:46.093 16162 16162 E AUTH    :  at java.lang.reflect.Method.invoke(Native Method)
03-18 21:20:46.093 16162 16162 E AUTH    :  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
03-18 21:20:46.093 16162 16162 E AUTH    :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)

I think the starting falling stone is the time that is unparseable is the one to blame: 03-18 21:15:39.346 5029 5029 E AUTH : java.lang.IllegalArgumentException: invalid date string: Unparseable date: "bd`cagaiaeciGMT+00:00"

I think due to this the other functionalities in the app is not working

abdoei commented 7 months ago

Tried to build the project on Manjaro with the latest Java and Android SDK using the building bash command you provided in the readme

export ANDROID_SDK_ROOT=$HOME/Android/Sdk
./gradlew :app:assembleDebug

and got this error

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/home/abdoe/dev/android_sdk/warpinator-android/settings.gradle' (/root/.gradle/caches/7.5/scripts/x53n7hv2ijbrzal3sxnqwips).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 490ms

I am not into Android or Java at all and want to build the project for personal use, so feel free to neglect this debugging until you are utterly free.

slowscript commented 7 months ago

Seems like you have Java 21 but the Gradle version currently used by the project only supports Java 18. I will hopefully make a public release with the fix soon (maybe next week).