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

permalinkCreator is marked as required in ReplyThread but it is undefined #8995

Closed
turt2live opened this issue Feb 28, 2019 · 11 comments · Fixed by matrix-org/matrix-react-sdk#2729
Labels
P3 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@turt2live
Copy link
Member

Found in a rageshake:

2019-02-28T15:40:48.508Z E Warning: Failed prop type: The prop `permalinkCreator` is marked as required in `ReplyThread`, but its value is `undefined`.
    in ReplyThread (created by EventTile)
    in EventTile (created by withMatrixClient<EventTile>)
    in withMatrixClient<EventTile> (created by ReplyPreview)
    in div (created by ReplyPreview)
    in div (created by ReplyPreview)
    in ReplyPreview (created by MessageComposerInput)
    in div (created by MessageComposerInput)
    in div (created by MessageComposerInput)
    in MessageComposerInput (created by MessageComposer)
    in div (created by MessageComposer)
    in div (created by MessageComposer)
    in div (created by MessageComposer)
    in MessageComposer (created by RoomView)
    in div (created by RoomView)
    in MainSplit (created by RoomView)
    in main (created by RoomView)
    in RoomView (created by LoggedInView)
    in div (created by LoggedInView)
    in DragDropContext (created by LoggedInView)
    in div (created by LoggedInView)
    in LoggedInView (created by MatrixChat)
    in MatrixChat
@t3chguy
Copy link
Member

t3chguy commented Mar 1, 2019

permalinkCreator is not even a defined PropType on EventTile :(

@lampholder lampholder added T-Defect P3 S-Minor Impairs non-critical functionality or suitable workarounds exist labels Mar 4, 2019
@lampholder
Copy link
Member

Is this causing any problems to the user?

@lampholder lampholder added the X-Needs-Info This issue is blocked awaiting information from the reporter label Mar 4, 2019
@t3chguy
Copy link
Member

t3chguy commented Mar 4, 2019

It'd mean the permalink in the ReplyThread (on the timestamp or maybe on the context menu) would not be possible to generate

@jryans
Copy link
Collaborator

jryans commented Mar 4, 2019

Fixed by matrix-org/matrix-react-sdk#2729

@jryans jryans closed this as completed Mar 4, 2019
@jryans jryans removed the X-Needs-Info This issue is blocked awaiting information from the reporter label Mar 4, 2019
@jryans
Copy link
Collaborator

jryans commented Mar 14, 2019

I am still seeing this original stack after making a new test account.

@jryans jryans reopened this Mar 14, 2019
@jryans jryans self-assigned this Mar 14, 2019
@turt2live
Copy link
Member Author

Are you sure it's not on ReplyPreview? (#9042)

@jryans
Copy link
Collaborator

jryans commented Mar 14, 2019

Are you sure it's not on ReplyPreview? (#9042)

Yes, here's the one I have now:

Warning: Failed prop type: The prop `permalinkCreator` is marked as required in `ReplyThread`, but its value is `undefined`.
    in ReplyThread (created by EventTile)
    in EventTile (created by withMatrixClient<EventTile>)
    in withMatrixClient<EventTile> (created by MessagePanel)
    in li (created by MessagePanel)
    in ol (created by ScrollPanel)
    in div (created by ScrollPanel)
    in div (created by GeminiScrollbar)
    in div (created by GeminiScrollbar)
    in GeminiScrollbar (created by GeminiScrollbarWrapper)
    in GeminiScrollbarWrapper (created by ScrollPanel)
    in ScrollPanel (created by MessagePanel)
    in MessagePanel (created by TimelinePanel)
    in TimelinePanel (created by RoomView)
    in div (created by RoomView)
    in div (created by RoomView)
    in div (created by MainSplit)
    in MainSplit (created by RoomView)
    in main (created by RoomView)
    in RoomView (created by LoggedInView)
    in div (created by LoggedInView)
    in DragDropContext (created by LoggedInView)
    in div (created by LoggedInView)
    in LoggedInView (created by MatrixChat)
    in MatrixChat

which seems the same as the original comment here.

@turt2live
Copy link
Member Author

Well, that's fun 🙃

@jryans
Copy link
Collaborator

jryans commented Mar 14, 2019

I think the root cause is that RoomView's onRoom stores the new room in state (triggering a render of sub-components), and then in a later step, _onRoomLoaded creates the permalinkCreator, which also stored in state.

The one render in the middle that has a room but no permalinkCreator can cause this error.

@jryans
Copy link
Collaborator

jryans commented Mar 14, 2019

Well, I can't decide what to do here... Either we should ensure there's always a permalinkCreator by change when it's set, or relax the props to make it optional to allow for the brief moment when it may not be there.

@jryans jryans removed their assignment Mar 14, 2019
@turt2live
Copy link
Member Author

I believe this is fixed. If not, a new issue with more details is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants