Campus-iOS icon indicating copy to clipboard operation
Campus-iOS copied to clipboard

User Feedback: Inconsistent Profile(pictures)

Open CommanderStorm opened this issue 3 years ago • 6 comments

The profile you get is mostly dependent on which part of the button you click. However this behaviour is not consistently deterministic.

The black and white picture is the one I would expect as this is the picture in TUMOnline. The color picture is an old one from my ID-Card.

I tried reinstalling the app and resetting the token Hope this information is helpful.

image image image

CommanderStorm avatar Aug 02 '21 13:08 CommanderStorm

Hey @CommanderStorm,

I tried to reproduce the issue and found out it gets the picture from the business card section of TUM, not the one coming from the TUM ID card. If this fails and no picture is returned, then it tries to fetch it from a personal details API that returns it as part of an XML (I guess this API might use the UNI card pic).

Can you tell me if your pictures of the uni card and business card on TUM are the same? And if they are not the same, can you confirm that they match the two pictures you listed in the above screenshots? You mention that the color picture is an old picture from a card, so the current uni card picture is different, or still the same?

Thanks!

mvitanov avatar Oct 27 '21 04:10 mvitanov

Yes, that could be the root cause.

The two images are both from tumonline. The colorful one is printed on my card, but I have updated it since. (The card cannot be updated, so the image stays in the system)

I don't know how if the transaction fails can be so dependent on witch part of the button I press.. That behaviour was weirdly consistent, yet not deterministic. Maybe it has to do with different image sizes being requesed if you click another part of the button? (Spitballing here, I have no idea about iOS)

CommanderStorm avatar Oct 27 '21 08:10 CommanderStorm

No, it is not different image sizes, I checked that. All the views are using the same method, which has two APIs inside. One downloading from the TUM business card and in case there is no picture there or it fails, it falls back to the profile details API (which uses the uni card pic).

The problem is this method is called repeatedly, when you press the different tabs/buttons, although I saw that it also stores the picture in cache (probably not used in a very efficient way). This is the reason, why a different (random) result might occur on the different views. I will try to optimize the behavior such that it is called only once at the start of the application for the tab views and maybe again only when the user specifically presses on profile details.

mvitanov avatar Oct 27 '21 08:10 mvitanov

The core data cache right now has no real purpose. We are also having similar issues with grades for exams that the user has taken multiple times.

tgymnich avatar Oct 29 '21 19:10 tgymnich

@tgymnich Do you think it will be a good idea to store some of the API responses in cache (Profile Pic, cafeterias) and others (calendar events, lectures, grades) in some form of persistent memory (SQLite, Keychain) to avoid so many requests to TUMApi? We would introduce refreshing to allow the user to trigger the requests and update the local storage. And of course APIs like free study rooms should be triggered every time.

mvitanov avatar Nov 11 '21 11:11 mvitanov

Some kind of cache would be nice. I don't know if using CoreData is a good idea going forward.

tgymnich avatar Dec 02 '21 15:12 tgymnich

fixed since version 4.0

AW-tum avatar Sep 15 '22 20:09 AW-tum