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

HTMLSerializeHandler does not work: Cannot read properties of undefined (reading 'colors') #4557

Closed
connor4312 opened this issue Jun 12, 2023 · 4 comments

Comments

@connor4312
Copy link

connor4312 commented Jun 12, 2023

  1. Call serializeAddon.serializeAsHTML()
  2. Observe the error Cannot read properties of undefined (reading 'colors'): TypeError: Cannot read properties of undefined (reading 'colors')

This seems to come from here, where _core appears to be a CoreTerminal which doesn't have a theme service.

// https://github.com/xtermjs/xterm.js/issues/3601
this._colors = (_terminal as any)._core._themeService.colors;

@connor4312
Copy link
Author

I had to open xterm in an element first for the themeService to be created.

@Tyriar
Copy link
Member

Tyriar commented Jun 14, 2023

At the very least we should add an exception with a good error when you call before open

@Tyriar Tyriar reopened this Jun 14, 2023
@silamon
Copy link
Contributor

silamon commented Jun 14, 2023

I think this is more or less the same as #4148, which can be solved by reviewing #4348.

@Tyriar
Copy link
Member

Tyriar commented Jun 14, 2023

@silamon yes it is indeed, thanks

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

No branches or pull requests

3 participants