IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

Bug: Cannot load any private message

Open jandamm opened this issue 2 years ago • 3 comments

I can't show any private messages, I always get a fullscreen error message. Tapping retry doesn't help.

image

I have some non linear private messages. So not every message was a reply to the oldest message. Some private mentions have multiple replies - like normal messages. Maybe this is the issue. Showing those messages in Mammoth results in incomplete threads (some are filtered out)

jandamm avatar Feb 07 '23 08:02 jandamm

Have almost the same problem, but the first time after opening the app, the messages are displayed (still empty for me). The error occurs after a refresh and never goes away until I restart the app again.

frepke avatar Feb 07 '23 13:02 frepke

Now I got the first private mention after using Ice Cubes. Now this conversation shows in the UI. But the others won't. In case it's not possible to find all conversations there should at least be a message instead of this error.

jandamm avatar Feb 07 '23 13:02 jandamm

I can only see the last message in this tab. When a new one comes in, I see this new one, but not the older ones Running version 1.4.2

sothawo avatar Feb 07 '23 14:02 sothawo

I found the reason, a nullability issue when loading the conversations.

sothawo avatar Feb 07 '23 18:02 sothawo

I just updated to 1.4.2 and it's broken again 😅

jandamm avatar Feb 07 '23 18:02 jandamm

I meant I am running version 1.4.2 and have this error, but I'm just on fixing it.

sothawo avatar Feb 07 '23 19:02 sothawo

Error still exists in version 1.4.4 :(

frepke avatar Feb 08 '23 21:02 frepke

Seems to be another reason. For me it was fixed with 1.4.3.

jandamm avatar Feb 10 '23 11:02 jandamm

It's only when de inbox is empty. One message is enough to solve this problem.

frepke avatar Feb 10 '23 11:02 frepke

This is what you're supposed to see if it's empty image

Dimillian avatar Feb 10 '23 12:02 Dimillian

Yes, I know. That's what I see when I restart the app. But when I refresh that page (drag down), the error comes back.

I closed and reopened the app and captured the screen: https://user-images.githubusercontent.com/6153559/218099463-ecd592d4-a5f1-4670-9b88-9b9e5bcd0cd4.MOV

frepke avatar Feb 10 '23 13:02 frepke

I cannot reproduce it in the simulator,there the refresh works. When debugging on the device, I see the following error on refresh:

Update NavigationAuthority bound path tried to update multiple times per frame.
Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://infosec.exchange/api/v1/conversations, NSErrorFailingURLKey=https://infosec.exchange/api/v1/conversations, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <0429CED2-5B2F-454E-8DA2-EC0E4602338E>.<27>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0429CED2-5B2F-454E-8DA2-EC0E4602338E>.<27>, NSLocalizedDescription=cancelled}

Information I found either show a problem with certificates - which I don't think is the problem here, we have calls before and after that that succeed - or something "executing the exact same request while the same object is already executing - which I could not validate

Currently out of ideas

sothawo avatar Feb 10 '23 20:02 sothawo

Feel like it's iOS .refreshable canceling the request. Are you on 16.3? If not can you update.

Dimillian avatar Feb 10 '23 20:02 Dimillian

yes, 16.3

sothawo avatar Feb 10 '23 20:02 sothawo

strange thing is, that refreshes on all other tabs are working, only the ConversationsListView has this behaviour

sothawo avatar Feb 10 '23 20:02 sothawo

yes, 16.3

I'm on 16.3 also.

frepke avatar Feb 10 '23 20:02 frepke

found it.

The call in the .refreshable need to be wrapped in a Task:

@Dimillian I'll add this to the NotificationsListView and TimeLineView as well, there the await methods for fetching data in the model are missing this as well, PR incoming

sothawo avatar Feb 10 '23 21:02 sothawo

That the thing, it should not requiere that. .refreshable is already a Task. And that how it sync the status of the refresh. It you wrap it then you loose the completion.

Dimillian avatar Feb 10 '23 21:02 Dimillian

https://www.swiftbysundell.com/articles/making-swiftui-views-refreshable/

Dimillian avatar Feb 10 '23 21:02 Dimillian

ok, I see in the docs of refreshable that there is no Task wrapping as well. But why does it fail then?

sothawo avatar Feb 10 '23 21:02 sothawo

I think it's just a SwiftUI bug unfortunately and this screen must trigger it. I'm ok to wrap it for this one tho if it fix it. Never had it on my phone.

Dimillian avatar Feb 10 '23 21:02 Dimillian

Problem is solved in 1.4.6 but still has a weird glitch: https://user-images.githubusercontent.com/6153559/218331677-aa898c4d-b01e-431d-8018-e575c319c892.MOV

frepke avatar Feb 12 '23 19:02 frepke