Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigned locations get cleared when closing/reopening the app #58

Closed
DigiH opened this issue Dec 23, 2022 · 11 comments
Closed

Assigned locations get cleared when closing/reopening the app #58

DigiH opened this issue Dec 23, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@DigiH
Copy link
Member

DigiH commented Dec 23, 2022

Assigned locations get cleared when closing/reopening the app, or when the app is being updated with a new version.

Verified on macOS and iOS

@1technophile
Copy link
Member

Same on Android

@1technophile 1technophile added the bug Something isn't working label Feb 7, 2023
@emericg
Copy link
Collaborator

emericg commented Feb 7, 2023

I tested on 4 different devices, and I can't say that I understand that problem.
Are we talking about the editable location fields with the little pen icon?

Same than the issue with the MAC addresses, it seems to be working fine (but I can imagine how that feature can produce issues). The editable location feature is years old, and I've never heard about any issue with it.

@DigiH
Copy link
Member Author

DigiH commented Feb 7, 2023

Are we talking about the editable location fields with the little pen icon?

Yes, for me whenever I set a location there, then completely close the App - not just hide it - and open the App again all the locations are cleared. As the same closing will happen when an update is installed the location will get cleared as well - happened for me with installing a new TestFlight build.

Not sure why you are not seeing this.

How best to verify? Shall I make a video of it?

@1technophile
Copy link
Member

Are we talking about the editable location fields with the little pen icon?

Yes, if I add a location, close the app and reopen it later I lose the location

@DigiH
Copy link
Member Author

DigiH commented Feb 7, 2023

Very latest macOS build, the same happening for me on iOS

Screen.Recording.2023-02-07.at.20.13.37.mov

@emericg
Copy link
Collaborator

emericg commented Feb 7, 2023

You could try opening the actual database (with that kind of software https://sqlitebrowser.org/) and see if the texts have been registered.
It should be located in /Users/name/Library/Application Support/Theengs/Theengs/data.db

The names (and incidentally, manual MACs) are saved in the devices table and should look like this:
Capture d’écran du 2023-02-07 20-23-28

(Obviously don't open or edit the db file while the app is in use, or it will lock until the one app has set a lock free's it)

You can also try to move that file somewhere else in order to fake a new app install, and see if the problem still occurs.

@emericg
Copy link
Collaborator

emericg commented Feb 7, 2023

Also just to be sure, you should really validate inputs with enter key (or associated action on the mobile keyboards) and not with the back action button.

@DigiH
Copy link
Member Author

DigiH commented Feb 7, 2023

Also just to be sure, you should really validate inputs with enter key (or associated action on the mobile keyboards) and not with the back action button.

Of course I tried all that before logging the issue, unfortunately not for the video ;) Any app should save active text field entries on leaving a view though, unless there is a specific Save button implemented in the view.

The names (and incidentally, manual MACs) are saved in the database's devices tables.

I also thought it could be related to the MAC issue, as they are also not being saved across restarts

#52

but then this is not verifiable until the unsaved/repopulated MACs are being addressed.

Not sure if this should affect the Android version though as Florian experienced.

Strangely enough the locations AND the MAC addresses are saved in the database, but neither of them do get populated when opening the App again - read permissions or re-population issue?

Screenshot 2023-02-07 at 21 36 30

Even more perplexing now.

@DigiH
Copy link
Member Author

DigiH commented Feb 8, 2023

So both the MACs and Locations are in the database, they also do get updated when making changes in the open App, so writing to the database is, and likely always has been, fine.

Just when opening the App again they do not get read and populated into the devices.

@emericg
Copy link
Collaborator

emericg commented Feb 8, 2023

Alright thanks a lot for researching this issue. Turns out the problem was that the loading of these data is made per device type, and wasn't triggered for most "theengs" specific devices.
Now it also turns out that I have none of these devices, so I didn't see that problem, and you only have these devices, so you only saw this problem ^^

@DigiH
Copy link
Member Author

DigiH commented Feb 8, 2023

Closing as verified with the latest build as fixed.

Opening the app immediately populates the locations, and also the previously saved MAC addresses are there for all devices. 👍

@DigiH DigiH closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants