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

ConsolePanel should not render if there is no session #1684

Closed
bmingles opened this issue Dec 11, 2023 · 1 comment · Fixed by #1726
Closed

ConsolePanel should not render if there is no session #1684

bmingles opened this issue Dec 11, 2023 · 1 comment · Fixed by #1726
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bmingles
Copy link
Contributor

bmingles commented Dec 11, 2023

Description

The ConsolePanel component has a connect prop to sessionWrapper. If this prop is undefined / null, the component crashes when attempting to destructure the prop with an error "Cannot destructure property 'config' of 'sessionWrapper'". This component should not be rendered at all if sessionWrapper is undefined.

Steps to reproduce

  • Run DHC such that it requires PSK for login
  • Login
  • Open a file (this seems to be necessary to fail the logout. See Open file blocks logout #1685 for related issue)
  • Logout

Expected results

There should be no console errors. Console should not be rendered if no session is available

Actual results

On login there is a console error "Cannot destructure property 'config' of 'sessionWrapper'". On logout, the same error occurs.

Additional details and attachments

image

Versions

Engine Version: 0.31.0-SNAPSHOT
Web UI Version: 0.56.0
Java Version: 21.0.1
Barrage Version: 0.6.0

@bmingles bmingles added bug Something isn't working triage Issue requires triage labels Dec 11, 2023
@bmingles
Copy link
Contributor Author

bmingles commented Dec 11, 2023

This may actually be 2 separate bugs. I tried returning null from the component when the sessionWrapper is undefined. This got rid of the console error, but the session still persisted when logging out if a file is open. Closing the file and logging out works as expected. Created #1685 to address the failed logout.

@vbabich vbabich added this to the December 2023 milestone Dec 12, 2023
@vbabich vbabich removed the triage Issue requires triage label Dec 12, 2023
@mofojed mofojed modified the milestones: December 2023, January 2024 Jan 9, 2024
@bmingles bmingles self-assigned this Jan 11, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 11, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 11, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Jan 22, 2024
bmingles added a commit that referenced this issue Jan 22, 2024
- Handle undefined props on DashboardData. Don't render console panel if
no session
- Fixed a set state on unmounted HeapUsage bug
- Removed chatty async interval debug logging

fixes #1684

**Testing**
- Run server with PSK enabled
- Login and open any file
- Logout should no longer show "ConsolePanel.tsx:372 Uncaught TypeError:
Cannot destructure property 'config' of 'sessionWrapper' as it is
undefined." error in debug console (Note that login will still fail
until #1685 is done)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants