sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

[ST4] Opening via dock icon spawns second, bouncing dock icon on macOS #4062

Open jameshochadel opened 3 years ago

jameshochadel commented 3 years ago

Description

Clicking the Sublime Text icon pinned to the Dock in macOS Big Sur causes a second icon to appear and bounce for a full minute or two.

https://user-images.githubusercontent.com/4789261/113933652-dc46a900-97c2-11eb-97f6-43fd822a9ef3.mov

Steps to reproduce

  1. Pin Sublime Text to the Dock.
  2. Click the icon to open the app.

Expected behavior

Sublime Text opens. The 'open' indicator under the icon appears.

Actual behavior

The expected behavior, plus a second icon appears that bounces for several minutes before stopping. Closing and re-opening Sublime Text will produce additional icons, up to a ceiling of 3 (the limit for recently closed applications in that section of the dock).

Environment

The issue did not occur on 4099, which was the previously installed build on this machine.

wbond commented 3 years ago

Can you provide the console log from the instances? I'm curious if there is something like app translocation going on.

jameshochadel commented 3 years ago

Sure thing. A second instance never actually opens as far as I can tell, but I've put the logs from the first below. Despite no second instance appearing to open, I do see a second Sublime Text process in Activity Monitor that's marked Not Responding — but I'm pretty sure that's always been there?

Logs (from 4102, which still has the issue):

startup, version: 4102 osx arm64 channel: dev
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/james/Library/Application Support/Sublime Text/Packages
state path: /Users/james/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/james/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Vintage"]
generating syntax summary
pre session restore time: 0.997143
OpenGL Context Information:
  GL API Version: 4.1 Metal - 71.0.7
  GLSL Version: 4.10
  Vendor: Apple
  Renderer: Apple M1
startup time: 1.05636
first paint time: 1.06189
git: located Sublime Merge installed at /Applications/Sublime Merge.app
git: using configuration from system git install
git: tracking working dir /Users/james/repos/chess-bot
environment variables loaded using: /bin/zsh -l
reloading python 3.3 plugin 0_package_control_loader.00-package_control
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading python 3.3 plugin 0_package_control_loader.01-pygments
reloading plugin Default.colors
reloading python 3.3 plugin 0_package_control_loader.01-sublime_lib
reloading python 3.3 plugin 0_package_control_loader.10-golangconfig
reloading python 3.3 plugin 0_package_control_loader.10-lsp_utils
reloading python 3.3 plugin 0_package_control_loader.10-shellenv
reloading python 3.3 plugin 0_package_control_loader.20-newterm
reloading python 3.3 plugin 0_package_control_loader.20-package_events
reloading python 3.3 plugin 0_package_control_loader.50-backrefs
reloading python 3.3 plugin 0_package_control_loader.50-bracex
reloading python 3.3 plugin 0_package_control_loader.50-markupsafe
reloading python 3.3 plugin 0_package_control_loader.50-pymdownx
reloading python 3.3 plugin 0_package_control_loader.50-python-markdown
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.51-python-jinja2
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin Golang Build.golang_build
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 python 3.3 plugin LSP-bash.plugin
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
reloading python 3.3 plugin Package Control.Package Control
reloading python 3.3 plugin Select Quoted.select_quotes
reloading python 3.3 plugin SelectExact.select_exact
reloading python 3.3 plugin SideBarEnhancements.SideBar
reloading python 3.3 plugin SideBarEnhancements.SideBarAPI
reloading python 3.3 plugin SideBarEnhancements.SideBarDefaultDisable
plugins loaded
Package Control: Detected Sublime Text update, looking for package updates
Package Control: Fetching list of available packages and dependencies
  Platform: osx-arm64
  Sublime Text Version: 4102
  Package Control Version: 3.4.1
Package Control: Download Debug
  URL: https://packagecontrol.io/channel_v3.json
  Timeout: 30
  Resolved IP: 50.116.34.243
  Resolved IPv6: ::ffff:50.116.34.243
Package Control: Urllib Debug Proxy
  http_proxy: 
  https_proxy: 
  proxy_username: 
  proxy_password: 
Package Control: Found previously exported CA bundle at /Users/james/Library/Application Support/Sublime Text/Cache/Package Control/oscrypto-ca-bundle.crt (262155 bytes)
Package Control: Urllib HTTPS Debug General
  Connecting to packagecontrol.io on port 443
Package Control: Urllib HTTPS Debug General
  Upgrading connection to SSL using CA certs file at /Users/james/Library/Application Support/Sublime Text/Cache/Package Control/merged-ca-bundle.crt
  Using hostname "packagecontrol.io" for TLS SNI extension
  Successfully upgraded connection to packagecontrol.io:443 with SSL Using TLSv1/SSLv3 with cipher ECDHE-RSA-AES128-GCM-SHA256
  Server SSL certificate:
    subject: CN=packagecontrol.io
    subject alt name: packagecontrol.io, www.packagecontrol.io
    expire date: Dec 21 12:00:00 2021 GMT
  Certificate validated for packagecontrol.io
Package Control: Urllib HTTPS Debug Write
  GET /channel_v3.json HTTP/1.1
  Accept-Encoding: bzip2,gzip,deflate
  Connection: Keep-Alive
  If-Modified-Since: Fri, 09 Apr 2021 16:40:04 GMT
  Host: packagecontrol.io
  User-Agent: Package Control v3.4.1
  If-None-Match: "60708364-5987b"
Package Control: Urllib HTTPS Debug Read
  HTTP/1.1 304 Not Modified
  Server: nginx
  Date: Fri, 09 Apr 2021 16:43:15 GMT
  Content-Type: application/json
  Last-Modified: Fri, 09 Apr 2021 16:40:04 GMT
  Connection: keep-alive
  ETag: "60708364-5987b"
  Content-Encoding: bzip2
  Vary: Accept-Encoding
  Strict-Transport-Security: max-age=15552000
Package Control: Using cached content for https://packagecontrol.io/channel_v3.json from /Users/james/Library/Application Support/Sublime Text/Cache/Package Control/http_cache/01524fae79697630d0454ba3fabd9414
Package Control: Fetching list of available packages and dependencies
  Platform: osx-arm64
  Sublime Text Version: 4102
  Package Control Version: 3.4.1
Package Control: No updated packages
Package Control: Urllib HTTPS Debug General
  Closing connection to packagecontrol.io on port 443 after 1 request
wbond commented 3 years ago

Does it happen in safe mode?

jameshochadel commented 3 years ago

Nope, opening with safe mode works normally. Does that make a plugin the most likely culprit?

Logs from safe mode start, just in case:

SAFE MODE - overriding packages, state and cache paths
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/james/Library/Application Support/Sublime Text (Safe Mode)/Packages
state path: /Users/james/Library/Application Support/Sublime Text (Safe Mode)/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/james/Library/Application Support/Sublime Text (Safe Mode)/Installed Packages
ignored_packages: ["Vintage"]
generating syntax summary
generating meta info summary
pre session restore time: 0.563389
OpenGL Context Information:
  GL API Version: 4.1 Metal - 71.0.7
  GLSL Version: 4.10
  Vendor: Apple
  Renderer: Apple M1
startup time: 0.621112
first paint time: 0.626646
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
xab3r commented 3 years ago

I have the same issue. Figured out that it might be caused by "Golang Build" plugin. What I did was I switched it to python 3.8 (extracted the plugin and added .python-version with "3.8" inside). The second app icon doesn't appear anymore.

@jameshochadel ^

jameshochadel commented 3 years ago

Thanks for pinning that down, @xab3r. @wbond should I re-file this on the golang/sublime-build repo? I see it's in a different org but that you're the top contributor. (Also, thank you for your help!)

bcomnes commented 2 years ago

I have the same issue. Figured out that it might be caused by "Golang Build" plugin. What I did was I switched it to python 3.8 (extracted the plugin and added .python-version with "3.8" inside). The second app icon doesn't appear anymore.

@jameshochadel ^

Can confirm that I had the second icon problem and that I had golang build installed. Disabling golang build plugin removes the second dock icon for me.

blalor commented 2 years ago

Same just happened to me!