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

RLMProgressNotificationToken released without unregistering a notification. You must hold on to the RLMProgressNotificationToken and call -[RLMProgressNotificationToken invalidate] when you no longer wish to receive progress update notifications. #7831

Closed
anton-plebanovich opened this issue Jun 8, 2022 · 5 comments
Assignees

Comments

@anton-plebanovich
Copy link

anton-plebanovich commented Jun 8, 2022

Description

The error is falsely produced when a session is released before invalidate for a token is called causing an inability to reset the _token value and so producing a misleading error message. On the screenshot is the proposed solution but I don't know the Realm source base good enough so it's up to you.

Version

10.27.0

@ejm01
Copy link
Contributor

ejm01 commented Jun 13, 2022

Do you know what's causing the session to be released that makes you think the error falsely produced?
That may be the issue. I think never having a progress_notifier exist whose token was released is intentional.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Jun 13, 2022
@anton-plebanovich
Copy link
Author

Do you know what's causing the session to be released that makes you think the error falsely produced? That may be the issue. I think never having a progress_notifier exist whose token was released is intentional.

Well, I did what the warning says, I hold the token and then called invalidate when I no longer need it but still received the warning on the dealloc so I assumed it is missleading because I spent some time to investigate my logic while it was working fine.

This is happening on the App switch during ongoing load and overall is minor since there are no other issues.

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jun 13, 2022
@ejm01
Copy link
Contributor

ejm01 commented Jun 16, 2022

What is the "App switch"? How are you storing the token?
It sounds like you're able to reproduce reliably -- could you share a .zip so the team can check it out?

That'd be super helpful.

@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Jun 16, 2022
@anton-plebanovich
Copy link
Author

It'll take some time to isolate the issue and create working example but I will try

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jun 16, 2022
@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Jun 16, 2022
@anton-plebanovich
Copy link
Author

Please check the reproduction example here https://github.com/anton-plebanovich/SingleView/tree/realm/notification-token-bug

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jun 16, 2022
@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Jun 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants