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

TypeError: Cannot read properties of undefined (reading 'original_source_node_id') #4332

Closed
sentry-io bot opened this issue Nov 6, 2023 · 9 comments · Fixed by #4377
Closed

TypeError: Cannot read properties of undefined (reading 'original_source_node_id') #4332

sentry-io bot opened this issue Nov 6, 2023 · 9 comments · Fixed by #4377
Assignees
Labels
DEV: frontend P1 - important Priority: High impact on UX

Comments

@sentry-io
Copy link

sentry-io bot commented Nov 6, 2023

Sentry Issue: STUDIO-GBG

TypeError: Cannot read properties of undefined (reading 'original_source_node_id')
  at getUserIdFromStore (./shared/data/resources.js:134:7)
...
(11 additional frame(s) were not displayed)
@bjester bjester added the P1 - important Priority: High impact on UX label Nov 7, 2023
@bjester bjester added this to the Studio: upcoming patches milestone Nov 7, 2023
@bjester
Copy link
Member

bjester commented Nov 7, 2023

I believe this occurring in one of the returned changes processing functions

@vkWeb vkWeb self-assigned this Dec 5, 2023
@nick2432
Copy link
Contributor

nick2432 commented Jan 2, 2024

can i work on this?

@bjester
Copy link
Member

bjester commented Jan 3, 2024

@nick2432 This is already assigned

@bjester
Copy link
Member

bjester commented Jan 3, 2024

@vkWeb I suspect is this happening when a copy change is relayed to a second editor after it's applied on the backend (this code here https://github.com/learningequality/studio/blob/unstable/contentcuration/contentcuration/frontend/shared/data/applyRemoteChanges.js#L152)

@vkWeb
Copy link
Member

vkWeb commented Jan 3, 2024

@bjester I tried that, but didn't observe any console errors. Let me re-try and will follow up on Slack.

@bjester
Copy link
Member

bjester commented Jan 3, 2024

@vkWeb The important aspect of the second editor is that they can't have already loaded the node that was copied. So it needs to be a node that both can access but the frontend needs to not have already loaded it into indexeddb

@vkWeb
Copy link
Member

vkWeb commented Jan 3, 2024

@bjester Got the error!

Sir what made you think like that? Like I want to know what signalled you that we need to make sure the second editor shouldn't have loaded the node to indexed DB?

@bjester
Copy link
Member

bjester commented Jan 3, 2024

@vkWeb Since the error was related to accessing original_source_node_id on undefined, which we do in order to copy a node, I presumed that node wasn't already loaded because in any other copying use case it must already be loaded

@vkWeb
Copy link
Member

vkWeb commented Jan 3, 2024

@bjester Okay, nice sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: frontend P1 - important Priority: High impact on UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants