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

Cannot read properties of null (reading 'annotations') #7363

Closed
2 tasks done
bsekachev opened this issue Jan 17, 2024 · 6 comments · Fixed by #7857
Closed
2 tasks done

Cannot read properties of null (reading 'annotations') #7363

bsekachev opened this issue Jan 17, 2024 · 6 comments · Fixed by #7857
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bsekachev
Copy link
Member

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

  1. Open a job
  2. Upload annotations to the job
  3. Go to task page before upload is done
    image

Expected Behavior

No response

Possible Solution

No response

Context

No response

Environment

v2.10.0
@bsekachev bsekachev added the bug Something isn't working label Jan 17, 2024
@bsekachev bsekachev self-assigned this Jan 31, 2024
@bsekachev bsekachev added the good first issue Good for newcomers label Mar 11, 2024
@MKBenjie
Copy link

I'm interested in this issue and am ready to tackle it. Could you please assign it to me?

@nmanovic nmanovic assigned MKBenjie and unassigned bsekachev Mar 21, 2024
@MKBenjie
Copy link

I was able to reproduce this bug.

Issue

When 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 Cause

The 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 Solution

To 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.

@nmanovic
Copy link
Contributor

@MKBenjie , please send us a PR which solves the issue. Could you please add a test as well?

@MKBenjie
Copy link

Created the PR and added a test as well

@nmanovic
Copy link
Contributor

nmanovic commented Apr 1, 2024

@MKBenjie , could you please share a link on the PR? I cannot find it.

@bsekachev
Copy link
Member Author

@nmanovic

#7704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants