Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Client crash when a ComponentTrack is added #72

@Jdyn

Description

@Jdyn

When adding a FileComponent server side to the room with something like

Room.add_component(client, room_id, %Jellyfish.Component.File{ file_path: path })

As soon as the Jellyfish.Notification.ComponentTrackAdded is emitted and the track is sent to the client, the react client crashes due to this access in onTrackEncodingChanged

export const onTrackEncodingChanged = (prevState, peerId, trackId, encoding) => {
    const peer = prevState.remote[peerId];
    const peerTrack = { ...peer.tracks[trackId], encoding };
    ...                         ^^^^^^
};

logs:

Uncaught TypeError: Cannot read properties of undefined (reading 'tracks')
    at onTrackEncodingChanged (stateMappers.js:147:33)
    at onEncodingChanged (stateMappers.js:322:12)

The above error occurred in the <JellyfishContextProvider>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions