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

TypeError: Converting circular structure to JSON when call Focus on Files Explorer from plugin #7853

Closed
vzhukovs opened this issue May 20, 2020 · 1 comment
Labels
bug bugs found in the application commands issues related to application commands help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@vzhukovs
Copy link
Contributor

Bug Description:

The following code sample:

import * as theia from '@theia/plugin';

export function start(context: theia.PluginContext): void {
    theia.commands.registerCommand({
        id: 'plugin.workbench.files.action.focusFilesExplorer',
        label: 'Plugin: Focus on Files Explorer'
    }, () => theia.commands.executeCommand('workbench.files.action.focusFilesExplorer'));
}

export function stop(): void {
}

produces the exception in console:

Uncaught (in promise) TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'SplitPanel'
    |     property '_layout' -> object with constructor 'ViewContainerLayout'
    --- property '_parent' closes the circle
    at JSON.stringify (<anonymous>)
    at Function.push.../../packages/plugin-ext/lib/common/rpc-protocol.js.MessageFactory.replyOK (rpc-protocol.ts:376)
    at rpc-protocol.ts:231

Steps to Reproduce:

  1. Clone sample plugin: workbench-files-action-focusFilesExplorer
  2. Build and copy eclipse_che_workbench_files_action_focusFilesExplorer.theia to plugin's directory
  3. Run Browser Example and call command Plugin: Focus on Files Explorer

Additional Information

  • Operating System: macOS 10.15.4
  • Theia Version: master
@vzhukovs vzhukovs added bug bugs found in the application commands issues related to application commands labels May 20, 2020
@akosyakov akosyakov added help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility labels May 26, 2020
@vzhukovs
Copy link
Contributor Author

vzhukovs commented Jun 4, 2020

Fixed by #7957

@vzhukovs vzhukovs closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application commands issues related to application commands help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

2 participants