cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
343 stars 104 forks source link

Debug log using qdomyos on a proform Tour de France 10.0 bike #877

Closed henryvandevorst closed 1 year ago

henryvandevorst commented 1 year ago

Hi,

As requested on facebook, I post the debug log of connecting qdomyos (running on Apple iPhone 12pro with iOs 15.1) to my Proform Tour de France 10.0 bike.

Best regards, Henry debug-zo_jul__31_14_54_46_2022.log

henryvandevorst commented 1 year ago

@cagnulein yes, just tried. Unfortunately no connection. What connection name should I be looking for? And the settings are still the same as mentioned in the read.me?

cagnulein commented 1 year ago

@henryvandevorst 1) doesn't now the QZ companion crash anymore? 2) if so, send me a debug log from QZ

thanks As I told you this companion is for treadmill so it's normal that anything will come to QZ right now :)

henryvandevorst commented 1 year ago

@cagnulein still crashing when I try to give it storage permissions. Same as previous version.

victorypoint commented 1 year ago

@henryvandevorst , can you please connect by ADB and provide a dumpsys package log of the companion app? Alternatively, download the latest qz-companion.bat and run it - which saves the qz-companion-log (including dumpsys log) and ADB logcat as well.

adb shell dumpsys package org.cagnulein.qzcompanionnordictracktreadmill > dumpsys.txt

cagnulein commented 1 year ago

@henryvandevorst as @victorypoint suggest we need a adb log to understand it. i'm quite sure it's a different issue from the yesterday's one thanks

henryvandevorst commented 1 year ago

@victorypoint I attached dumpsys.txt, dumpsys.txt

And logcat.txt. During the logging I tried to give the companion app permissions for storage and it crashed. Then I revoked the permission and it stopped crashing.

logcat.txt

cagnulein commented 1 year ago

@henryvandevorst thanks!

as i guessed the issue is new now, it's something about the android version of your tablet

i will check it later today

FATAL EXCEPTION: main 08-08 12:10:29.102 1428 1428 E AndroidRuntime: Process: org.cagnulein.qzcompanionnordictracktreadmill, PID: 1428 08-08 12:10:29.102 1428 1428 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/nio/file/Paths; 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at org.cagnulein.qzcompanionnordictracktreadmill.QZService.pickLatestFileFromDownloads(QZService.java:220) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at org.cagnulein.qzcompanionnordictracktreadmill.QZService.parse(QZService.java:104) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at org.cagnulein.qzcompanionnordictracktreadmill.QZService.access$000(QZService.java:35) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at org.cagnulein.qzcompanionnordictracktreadmill.QZService$1.run(QZService.java:65) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:836) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:103) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at android.os.Looper.loop(Looper.java:203) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6251) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) 08-08 12:10:29.102 1428 1428 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "java.nio.file.Paths" on path: DexPathList[[zip file "/data/app/

cagnulein commented 1 year ago

confirmed https://stackoverflow.com/questions/57401195/failed-resolution-of-java-nio-file-paths

the solution will be very easy

now i'm going to do my outdoor ride, i will check then

cagnulein commented 1 year ago

@henryvandevorst done! https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.10/QZCompanionNordictrackTreadmill.apk let me know if it's better!

henryvandevorst commented 1 year ago

No crash with latest version. Logcat: logcat.txt

Dumpsys: dumpsys.txt

cagnulein commented 1 year ago

@henryvandevorst thanks. now we have to face another error.

image

from adb can you run

ls /bin/ and post the result? probably your android doesn't have sh

otherwise i can use the classic java code as a fallback, what do you think @victorypoint ?

thanks

henryvandevorst commented 1 year ago

Hi, there is no /bin folder. There is however a /system/bin folder that contains a sh file: system_bin.txt

cagnulein commented 1 year ago

@henryvandevorst perfect so it's easier! i will do after my afternoon ride!

cagnulein commented 1 year ago

@henryvandevorst done https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.11/QZCompanionNordictrackTreadmill.apk @victorypoint try this because maybe it could impact also you (it shouldn't of course)

victorypoint commented 1 year ago

Unfortunately v2.0.11 breaks compatibility with NT2950 treadmill.

QZ-Companion-log.txt dumpsys.log logcat.txt

cagnulein commented 1 year ago

@victorypoint did it start from this version? because I don't see a real issue there. Maybe I can add some more debug print to understand it better

victorypoint commented 1 year ago

Last version I tested was 2.08 which worked fine. Let me test 2.09 and 2.10.. standby

victorypoint commented 1 year ago

Ok, confirmed that v2.09 works but v2.10 does not for NT2950. Logs for 2.10 attached

QZ-Companion-log.txt dumpsys.log logcat.txt

cagnulein commented 1 year ago

@victorypoint i changed a detail https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.12/QZCompanionNordictrackTreadmill.apk and I added a debug line, but i still don't understand why it's not working.

I'm gonna have my afternoon run now, so I will answer you back in 2 hours Let me know and thanks for the support

victorypoint commented 1 year ago

Thanks @cagnulein. I just tested v2.12. Attached are all logs:

QZ-Companion-log.txt dumpsys.log logcat.txt debug-Thu_Aug_11_11_52_14_2022.log

cagnulein commented 1 year ago

ok got the point now. this android version doesn't allow listing a bin folder, i have to use the try and catch method. i will build another one later today thanks

Il giorno gio 11 ago 2022 alle 17:34 Al Udell @.***> ha scritto:

Thanks @cagnulein https://github.com/cagnulein. I just tested v2.12. Attached are all logs:

QZ-Companion-log.txt https://github.com/cagnulein/qdomyos-zwift/files/9309898/QZ-Companion-log.txt dumpsys.log https://github.com/cagnulein/qdomyos-zwift/files/9309899/dumpsys.log logcat.txt https://github.com/cagnulein/qdomyos-zwift/files/9309901/logcat.txt debug-Thu_Aug_11_11_52_14_2022.log https://github.com/cagnulein/qdomyos-zwift/files/9309904/debug-Thu_Aug_11_11_52_14_2022.log

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/877#issuecomment-1212153077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHKYNNYJA4TFBU7SOLVYUMO3ANCNFSM55E4UQYA . You are receiving this because you were mentioned.Message ID: @.***>

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

cagnulein commented 1 year ago

@henryvandevorst so wait my next release

cagnulein commented 1 year ago

@victorypoint @henryvandevorst could you try https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.13/QZCompanionNordictrackTreadmill.apk ?

victorypoint commented 1 year ago

@cagnulein , unfortunately v2.0.13 doesn't work for me. Logs attached.

dumpsys.log logcat.txt QZ-Companion-log.txt

cagnulein commented 1 year ago

argh that's unbeliavable....these android tablet have a completely different behaviour from the android emulator with the same android version. let's try this https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.14/QZCompanionNordictrackTreadmill.apk @victorypoint thanks again for your support!

victorypoint commented 1 year ago

@cagnulein , ok still no luck with v2.0.14. Attached are logs. What's so unbelievable is you having time to work on this so soon after having your baby ;-)

QZ-Companion-log.txt dumpsys.log logcat.txt

cagnulein commented 1 year ago

@victorypoint I added some other debug prints because the problem is really strange https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.15/QZCompanionNordictrackTreadmill.apk so it will not work neither but the logcat should answer to my question "WHY?"

victorypoint commented 1 year ago

Ok, here you go:

dumpsys.log logcat.txt QZ-Companion-log.txt

cagnulein commented 1 year ago

@victorypoint here another one https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.16/QZCompanionNordictrackTreadmill.apk it's really really strange. It seems that it crash without a backtrace. So i added some more debug to understand where it crashes

victorypoint commented 1 year ago

I'm confident you'll figure it out. Just to make sure things are working on my end, I always install v1.32 after testing your new builds to make sure QZ & Companion are connecting and working properly. Works every time. Here's logs for v2.0.16:

QZ-Companion-log.txt dumpsys.log logcat.txt

cagnulein commented 1 year ago

@victorypoint i guess i finally fixed it! https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.0.17/QZCompanionNordictrackTreadmill.apk

victorypoint commented 1 year ago

You certainly did! I knew you would do it! Speed, incline, auto-start - everything works.

QZ-Companion-log.txt dumpsys.log logcat.txt

cagnulein commented 1 year ago

great @victorypoint ! thanks for all the time that you dedicated to this! @henryvandevorst let me know if it works also to you

henryvandevorst commented 1 year ago

@cagnulein No crashes when giving storage permissions. Logfiles: logcat.txt dumpsys.txt

cagnulein commented 1 year ago

@henryvandevorst did you start a workout? I don't see any traces of workout files there. Let me know

cagnulein commented 1 year ago

@henryvandevorst hi, any news?

henryvandevorst commented 1 year ago

@cagnulein Hi, see attached logcat with a short workout. I changed gear up and down and also the inclination. logcat.txt

cagnulein commented 1 year ago

@henryvandevorst hi, thanks. I checked the log but it seems that QZ companion wasn't running in the background. Did you run it? The flow should be 1) start your treadmill 2) start the ifit app 3) run, just to be sure the QZ companion 4) switch (WITHOUT CLOSING THE QZ COMPANION) to the ifit app

Let me know

@victorypoint any help?

victorypoint commented 1 year ago

I'm not familiar with this model but both iFit and QZ Companion should autostart once the bike is powered up. @henryvandevorst, do you start a manual workout within iFit? You will likely need to enter priveledged mode to confirm if QZ Companion is running in the background.

victorypoint commented 1 year ago

@cagnulein, I compared dumpsys.txt posted by @henryvandevorst above (posted Aug 17) with my own. I see the required BroadcastReceiver entry in Henry's log to indicate autostart enabled, however his log shows slightly different app install and runtime permissions and User0 parameters - which are listed below. I suspect his QZ Companion did not autostart for this reason. Is there any indication of QZ Companion crashing on autostart in his ADB logcat?

BroadcastReceiver entry looks good:

  android.intent.action.BOOT_COMPLETED:
    63b867 org.cagnulein.qzcompanionnordictracktreadmill/.BootUpReceiver filter f372e2f
      Action: "android.intent.action.BOOT_COMPLETED"
      Category: "android.intent.category.DEFAULT"
      AutoVerify=false

Missing app install permission:

These 2 permissions are "app install" for me, but "app runtime" for Henry:

Finally, our User0 entries compared:

Mine:

Henrys:

henryvandevorst commented 1 year ago

@cagnulein @victorypoint Just started the bike. QZ Companion is autostarting afaik, I didn't start it manually. This is the dumpsys.txt: dumpsys.txt

victorypoint commented 1 year ago

@cagnulein @victorypoint Just started the bike. QZ Companion is autostarting afaik, I didn't start it manually. This is the dumpsys.txt: dumpsys.txt

Thanks @henryvandevorst. Other than the hex IDs being different in your dumpsys, the User0 line is now different than before which seems to indicate successful QZ companion autostart:

Did you try a workout after startup to see if there's communication between QZ Companion and QZ? Also please post your logcat.txt.

henryvandevorst commented 1 year ago

@victorypoint yes I did a workout directly after startup. I only had to set up usb debugging to be able to create the logcat I sent earlier. I made a new logcat just now (without restarting the bike). I did a short workout including a complete cycle of resistances and inclinations (grades). QZCompanion was running when I started en was still running after finishing the workout.

logcat.txt

victorypoint commented 1 year ago

@henryvandevorst, thank-you. QZ Companion is certainly running this time. Did you see any live tile activity in QZ? Let's standby until @cagnulein can take a look at your log.

cagnulein commented 1 year ago

@henryvandevorst @victorypoint this time QZ companion worked perfectly! So we got a hit!

So now i have to add the missing fields for the bike and the same on the qz side.

I will notify you when I will be ready to test (hopefully tomorrow or the day after tomorrow)

cagnulein commented 1 year ago

@henryvandevorst @victorypoint i completed the APK for this bike https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/2.1.0/QZCompanionNordictrackTreadmill.apk

@victorypoint from your side everything should work as before @henryvandevorst i'm preparing an iOS version of QZ handling these new metrics, so please stand by ;)

cagnulein commented 1 year ago

@henryvandevorst QZ modifications done also. Are you able to do a quick test on QZ on Windows before building the iOS version? You just need a PC. Let me know in case, otherwise I will build the iOS version

henryvandevorst commented 1 year ago

@cagnulein Can you tell me what the tesat consists of? Do I need to install something?

cagnulein commented 1 year ago

@henryvandevorst just download this https://github.com/cagnulein/qdomyos-zwift/runs/8013304792?check_suite_focus=true and run it

configure the tdf companion ip in the proform bike settings with your bike up and press ok and restart qz

as soon the companion will start qz should receive the metrics if all it's good

let me know

victorypoint commented 1 year ago

@cagnulein, I tested v2.1.0 and all features work on my TM when connected to QZ Windows. Android QZ didn't work this time - I assume because it needs a new build?