-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cannot read properties of null (reading 'annotations') #7363
Comments
I'm interested in this issue and am ready to tackle it. Could you please assign it to me? |
I was able to reproduce this bug. IssueWhen I navigate away from the page while uploading annotations the message "Cannot read properties of null (reading 'annotations')" along with "Annotations have been loaded to the task" are displayed to the user. This error occurs because the FETCH_ANNOTATIONS_FAILED action is triggered since annotations have to be loaded and fetched yet I navigated away from the page, even though the annotations loading process is still a success. This leads to unnecessary error message being displayed. Root CauseThe root cause of the issue is that the FETCH_ANNOTATIONS_FAILED action is dispatched without considering the possibility of navigation interruption during the annotations fetching process. Proposed SolutionTo resolve this issue, I will implement a mechanism to detect navigation interruptions during the annotations fetching process. This involves modifying the fetchAnnotationsAsync function to handle navigation interruptions by checking if the interruption occurred before dispatching the FETCH_ANNOTATIONS_FAILED action. Additionally, I will update the error handling logic to consider navigation interruptions so that the warming isn't displayed if it was due to navigation interruptions. |
@MKBenjie , please send us a PR which solves the issue. Could you please add a test as well? |
Created the PR and added a test as well |
@MKBenjie , could you please share a link on the PR? I cannot find it. |
Actions before raising this issue
Steps to Reproduce
Expected Behavior
No response
Possible Solution
No response
Context
No response
Environment
The text was updated successfully, but these errors were encountered: