Skip to content

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

Closed

Description

@sentry

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)

Activity

  1. bjester commented on Nov 7, 2023

    @bjester
    Member

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

  2. self-assigned this
    on Dec 5, 2023
  3. nick2432 commented on Jan 2, 2024

    @nick2432
    Contributor

    can i work on this?

  4. bjester commented on Jan 3, 2024

    @bjester
    Member

    @nick2432 This is already assigned

  5. bjester commented on Jan 3, 2024

    @bjester
    Member

    @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)

  6. vkWeb commented on Jan 3, 2024

    @vkWeb
    Contributor

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

  7. bjester commented on Jan 3, 2024

    @bjester
    Member

    @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

  8. vkWeb commented on Jan 3, 2024

    @vkWeb
    Contributor

    @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?

  9. bjester commented on Jan 3, 2024

    @bjester
    Member

    @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

  10. vkWeb commented on Jan 3, 2024

    @vkWeb
    Contributor

    @bjester Okay, nice sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions