ruuvi / com.ruuvi.station.ios

iOS Ruuvi Station
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Possible migration issues when updating #2005

Open markoaamunkajo opened 5 months ago

markoaamunkajo commented 5 months ago

Description:

Couple of users have reported that values are showing historical values when browsing through sensor cards in app. We had this issue before and it was related to user having old firmware sensor in his app.

This was fixed in a hotfix release but looks like now issue has reappeared when user will make an upgrade to his build not clean install of 2.7.

I have reproduced the bug, waiting for results for clean install.

https://github.com/ruuvi/com.ruuvi.station.ios/assets/50437378/ea1846b2-ea14-4c86-8043-bf154cf38bf9

markoaamunkajo commented 4 months ago

I have been actively testing this, will continue to try and figure out steps to reproduce.

markoaamunkajo commented 3 months ago

@priyonto I've finally managed to reproduce this. Good news is it's reproduced, bad news is that I am still unsure what action is the one that causes it.

Prerequisites for the tests:

I logged out from my Ruuvi account, then added 4 sensor cards My sensor cards 1 and 3 are not reporting their Firmware versions Sensor card 2 and 4 are reporting normal 1.31.1+default

Notable is that sensor 1 is far away at the edge of RSSI, it's seen updating rarely in app

  1. Set sensor 2 to connected mode, sensor 1, 3 and 4 will not be connected
  2. Lock phone screen and wait for few minutes (roughly 10 minutes in my test), then unlock screen and start browsing sensor cards
  3. Now sensor card 2 will flash old measurement, while also changing between heartbeat and advertisement

The issue appears to go away every now and then, but when it appears it seems to show old measurement from since when the issue first appeared.

https://github.com/ruuvi/com.ruuvi.station.ios/assets/50437378/f1fcf419-ebbb-42a0-8e49-964a3d646626

markoaamunkajo commented 1 month ago

Will reinvestigate this issue.

markoaamunkajo commented 1 month ago

Hi @priyonto , I replicated the test and had same result. Here is a recording of the video. I have various styles of RuuviTags via Bluetooth and user is not signed in. Turns out that this is not migration issue at all, I made clean install. I was signed in to the app and then signed out and added local bluetooth sensors.

https://github.com/user-attachments/assets/e385833f-6924-4f13-8730-47a4ca70d4da

priyonto commented 1 month ago

@markoaamunkajo Do I understand correctly that the issue here is: some old data is visible momentarily before showing latest data?

markoaamunkajo commented 1 month ago

@markoaamunkajo Do I understand correctly that the issue here is: some old data is visible momentarily before showing latest data?

Yes, exactly, this is the issue.