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

Errors with nav control when spaces are disabled #46255

Closed
smith opened this issue Sep 20, 2019 · 2 comments · Fixed by #40856
Closed

Errors with nav control when spaces are disabled #46255

smith opened this issue Sep 20, 2019 · 2 comments · Fixed by #40856
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@smith
Copy link
Contributor

smith commented Sep 20, 2019

A console error appears when running kibana with spaces disabled.

Steps to reproduce:

  1. Set xpack.spaces.enabled: false in Kibana config
  2. Load a page
  3. Look in the console

Expected behavior:

No error. :)

Errors in browser console (if relevant):

Uncaught TypeError: Cannot read property 'space' of null
    at new NavControlPopover (nav_control_popover.tsx:109)
    at constructClassInstance (react-dom.development.js:11312)
    at updateClassComponent (react-dom.development.js:14481)
    at beginWork (react-dom.development.js:15438)
    at performUnitOfWork (react-dom.development.js:19106)
    at workLoop (react-dom.development.js:19146)
    at HTMLUnknownElement.callCallback (react-dom.development.js:149)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:199)
    at invokeGuardedCallback (react-dom.development.js:256)
    at replayUnitOfWork (react-dom.development.js:18372)

Any additional context:

Everything in the nav appears to continue working, but there is an error in the console.

In the NavControlPopover component Props['activeSpace'] is null when spaces are disabled.

When the control is registered the type of activeSpace is any, which should probably be narrowed to more clearly identify the type of this object.

@smith smith added bug Fixes for quality problems that affect the customer experience Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Sep 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@legrego legrego self-assigned this Sep 20, 2019
@legrego
Copy link
Member

legrego commented Sep 20, 2019

This will be resolved by #40856, as it removes the offending activeSpace prop altogether

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants