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

Fix plugin initialization when browser is refreshed #4008

Closed
wants to merge 1 commit into from

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Jan 10, 2019

Signed-off-by: Anatoliy Bazko abazko@redhat.com

What does PR do:

Stops remote plugins before initialization

Reference issue

#3970

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
@tolusha tolusha requested review from benoitf and evidolob January 10, 2019 13:37
@benoitf
Copy link
Contributor

benoitf commented Jan 10, 2019

hello, it doesn't try to stop plug-in before it's started as well ?

@tolusha
Copy link
Contributor Author

tolusha commented Jan 11, 2019

I am not sure If I understand what you mean.

@tolusha tolusha self-assigned this Jan 11, 2019
@tolusha
Copy link
Contributor Author

tolusha commented Jan 14, 2019

It does stop plugin before start in case of backend
https://github.com/theia-ide/theia/blob/f20cd2e0afc08d6560faf416f6fae2c08f61fdcd/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts#L133

stopPlugin causes plugin deactivation:


PLUGIN_HOST(1): PluginManagerExtImpl/init()
--
  | PLUGIN_HOST(1): initializing(/home/theia/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
  | Debugger contribution has been registered: cppdbg
  | Debugger contribution has been registered: cppvsdbg
  | PLUGIN_HOST(1): PluginManagerExtImpl/loadPlugin(/plugins/ms-vscode.cpptools.0.20.1/extension/out/src/main)
  | Debug configuration provider has been registered: cppdbg
  | activating extension

Page is refreshed:

  | deactivating extension
  | TypeError: Cannot read property 'dispose' of undefined
  | at Object.deactivate (/plugins/ms-vscode.cpptools.0.20.1/extension/out/src/LanguageServer/extension.js:557:8)
  | at ActivatedPlugin.deactivate [as stopFn] (/plugins/ms-vscode.cpptools.0.20.1/extension/out/src/main.js:50:27)
  | at /home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-manager.js:72:28
  | at Map.forEach (<anonymous>)
  | at PluginManagerExtImpl.$stopPlugin (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-manager.js:69:31)
  | at RPCProtocolImpl.doInvokeHandler (/home/theia/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:173:23)
  | at RPCProtocolImpl.invokeHandler (/home/theia/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:158:41)
  | at RPCProtocolImpl.receiveRequest (/home/theia/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:122:45)
  | at RPCProtocolImpl.receiveOneMessage (/home/theia/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:108:22)
  | at /home/theia/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:51:89
  | PLUGIN_HOST(1): PluginManagerExtImpl/init()
  | PLUGIN_HOST(1): initializing(/home/theia/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
  | Debugger contribution has been registered: cppdbg
  | Debugger contribution has been registered: cppvsdbg
  | PLUGIN_HOST(1): PluginManagerExtImpl/loadPlugin(/plugins/ms-vscode.cpptools.0.20.1/extension/out/src/main)
  | Debug configuration provider has been registered: cppdbg
  | activating extension

@tolusha tolusha added bug bugs found in the application plug-in system issues related to the plug-in system labels Jan 14, 2019
@benoitf
Copy link
Contributor

benoitf commented Jan 14, 2019

@tolusha what I mean is that stop should not be called when we load plug-ins. Lifecycle is : init, start, stop, not init, stop, start

@tolusha
Copy link
Contributor Author

tolusha commented Mar 18, 2019

Closed in favor of #4583

@tolusha tolusha closed this Mar 18, 2019
@tolusha tolusha deleted the ab/fixPluginInit branch June 13, 2019 18:26
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 plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants