wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.77k stars 816 forks source link

plugin_host-3.3 has exited unexpectedly, some plugin functionality won't be available until Sublime Text has been restarted #1609

Closed s958024860 closed 7 months ago

s958024860 commented 2 years ago

plugin_host-3.3 has exited unexpectedly, some plugin functionality won't be available until Sublime Text has been restarted

deathaxe commented 2 years ago

A crash of plugin host may be caused by any plugin and is not necessarrily related to Package Control.

jfrankl commented 2 years ago

I'm running into this same issue, and it does appear to be connected to Package Control. If I install a fresh version of Sublime Text 4 (Build 4126) and then "Install Package Control", I immediately get this error.

https://user-images.githubusercontent.com/1809908/148663005-e385f8d4-5e95-45a2-8aad-3491673cf13c.mov

I am on an M1 Mac, OS version 12.0.1

Here is the contents of my console:

reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
error: plugin_host-3.3 has exited unexpectedly, some plugin functionality won't be available until Sublime Text has been restarted
danieltwagner commented 2 years ago

I have the same issue, also on a fresh download of ST 4126. I rm -rf ~/Library/Application\ Support/Sublime\ Text, and everything works fine, then I Cmd+Shift+P -> Install Package Control, which gives me two popups: first, "Package Control was successfully installed", then "plugin_host-3.3 has exited unexpectedly".

Running MacOS Monterey (12.1) on a M1 Mac. Entire console contents from start to installation and plugin_host trouble:

 startup, version: 4126 osx arm64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/dtw/Library/Application Support/Sublime Text/Packages
state path: /Users/dtw/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/dtw/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.220314
OpenGL Context Information:
  GL API Version: 4.1 Metal - 76.3
  GLSL Version: 4.10
  Vendor: Apple
  Renderer: Apple M1
startup time: 0.266823
first paint time: 0.309922
environment variables loaded using: /bin/zsh -l
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
plugins loaded
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
error: plugin_host-3.3 has exited unexpectedly, some plugin functionality won't be available until Sublime Text has been restarted
nsgoetz commented 2 years ago

I also had the same issue as above running on an M1 computer with both OSX 12.0 and 12.1.

I think I was able to resolve it by running Sublime Text via rosetta just like I had to do with my iTerm for brew and python 2 to work properly. The steps to do that are:

I will update here if I find any issues with this approach down the line.

I think the root cause is probably python 3.3 (some library dependency) being incompatible with OSX 12 on Apple Silicon. Since ST4 does ship with its own fork of python 3.3, that fork might need updating for OSX 12.

deathaxe commented 7 months ago

My hunch is it being caused by oscrypto library, which utilizes openssl library for HTTPs connections on MacOS. If openssl API is different on M1 it may cause plugin host to crash.

You could try to disable oscrypto downloader via Package Control.sublime-settings

    "downloader_precedence": {
        "windows": ["wininet", "urllib"],
        "osx": ["urllib"],
        "linux": ["urllib"],
    },

or try out latest Package Control 4.0.0 beta releases https://github.com/wbond/package_control/releases, which optionally uses a more up-to-date oscrypto library and falls back to urllib automatically.