limpkin / mooltipass

Github repository dedicated to the mooltipass project
https://www.themooltipass.com
521 stars 113 forks source link

Mooltipass device switch not recognized by app #235

Open NicoHood opened 8 years ago

NicoHood commented 8 years ago

Expected behavior

When disconnecting a MP Mini and connecting a normal MP it should be recognized by the app.

Actual behavior

The app shows the settings for the MP Mini still even if a normal one is connected.

Step by step guide to reproduce the problem

v61 beta and v1.0

limpkin commented 8 years ago

are you sure about that? I just tried it and the change correctly happens (even though it takes a few seconds).

NicoHood commented 8 years ago

You have to not focus the app. Just click somewhere else when you unplug the MP Mini and then replug the MP.

This possibly also caused my other problems, like the screen brightness. I could now reproduce it again.

limpkin commented 8 years ago

yup, still can't reproduce the "issue"

NicoHood commented 8 years ago

You are right. It just sometimes happens. The actual bug is possibly that if you disconnect the mini the app will still show its device settings. So for some reason the disconnecting was missed. And so the new MP won't be recognized properly.

I am trying to search what exactly triggers the bug, but it might be just timing.

NicoHood commented 8 years ago

The bug also triggers that an unlocked MP is not recognized as unlocked. You only need 1 MP Mini to reproduce this. If the device settings tab stays open it got triggered. I had this 3 times now.

To reproduce the bug try to switch the tabs "device settings" and "credntials" while connecting the MP Mini. That made it quite easy to reproduce.

limpkin commented 8 years ago

ok I really can't reproduce this "issue"... could you make a video or look inside our source code?

NicoHood commented 8 years ago

I've made a video which I cannot send here. For documentation purposes I want to decribe what I did in the video:

It was just a random test. I can reproduce this extremely good. You might want to try a linux host system.

It possibly happens if you connect the device too fast, so the disconnect is not recognized. That the MP Mini settings are not displayed when unlocked might be a feature, however if so it should say "locked" and not some cz layout.

Please contact me in tox to send you the video. Its 7,7mb.

limpkin commented 8 years ago

If you're saying that the settings aren't changing until the mooltipass (standard or mini) is unlocked... then it is normal as the firmware isn't responding to usb packets during the unlocking process.

NicoHood commented 8 years ago

No, watch the video. You cannot see that I unplug the device, but that is actually the bug. Its not recognized anymore. contact me tomorrow and I will send you the video.

If the device is locked however the menu should be disabled and not display wrong values. That is possibly another bug.

NicoHood commented 8 years ago

Do you still want the video? I had this issue so many times now. Its 100% reproduceable for me. Or should I rather try with moolticute when its ready?

limpkin commented 8 years ago

it's in our todo list to disable the settings tab until the selected settings is correctly applied

limpkin commented 8 years ago

alternatively, you can make a PR which implements the previously described functionality.