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

Does not work on macOS 11 #1475

Closed
dangh opened this issue Jun 24, 2020 · 44 comments
Closed

Does not work on macOS 11 #1475

dangh opened this issue Jun 24, 2020 · 44 comments
Labels

Comments

@dangh
Copy link

dangh commented Jun 24, 2020

Related sources:

ST console logs:

Traceback (most recent call last):
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_osx/_core_foundation.py", line 7, in <module>
ImportError: No module named 'Package Control.package_control.deps.oscrypto._osx._core_foundation_cffi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 274, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/2_bootstrap.py", line 26, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/bootstrap.py", line 20, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/download_manager.py", line 24, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/__init__.py", line 3, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/downloaders/urllib_downloader.py", line 46, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/ca_certs.py", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/trust_list.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_osx/trust_list.py", line 8, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_osx/_core_foundation.py", line 9, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/dang/Library/Application Support/Sublime Text/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_osx/_core_foundation_ctypes.py", line 21, in <module>
Package Control.package_control.deps.oscrypto.errors.LibraryNotFoundError: The library CoreFoundation could not be found
  • Sublime Text version: build 4074
  • OS version: 11.0 Beta (20A4299v)
  • PackageControl version: 3.3.0
@AndrewHoos
Copy link

Looks like this might be related to the dynamic linker changes noted here:
https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes

@wbond
Copy link
Owner

wbond commented Jun 25, 2020

Yeah - there will likely need to be some changes. Hopefully someone who has the macOS 11 beta installed can help find what changes will be necessary. It may just end up being that for the Mac shared libs we just try to open them rather than call find_library().

@AndrewHoos
Copy link

Why are you not just doing import Cocoa etc. Using pyobjc?

@wbond
Copy link
Owner

wbond commented Jun 25, 2020

@AndrewHoos

  • it looks like pyobjc is not pure python, and thus it would be illogical for oscrypto to use it
  • I support Python 2.6 and 3.3 primarily (ST2 and ST3), it doesn't seem pyobjc supports either version currently
  • pyobjc is a huge dependency
  • maintaining a "distribution" of pyobjc to include with Package Control would be a ton of work

We just need to figure out what the alternative to find_library() in ctypes will be with Big Sur.

I don't have a macOS 11 VM and won't have time to set one up for a while, so I'm hoping an early adopter can help out.

@TerminalFi
Copy link
Contributor

All system libraries now live in /System/Library/dyld/dyld_shared_cache_x86_64. Looking into what changes would be required to support this.

@TerminalFi
Copy link
Contributor

@wbond as of right now, I think the only options are at the moment

  1. Knowing the paths to the libraries you want.
  2. Opening /System/Library/dyld/dyld_shared_cache_x86_64 and going through it to identify the paths of the files you want.

Once we get the path, everything is the same.

from ctypes import CDLL
core_foundation_path = "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
CoreFoundation = CDLL(core_foundation_path, use_errno=True)

@TerminalFi
Copy link
Contributor

@dangh @wbond the supporting library oscrypto has been updated to support MacOS Big Sur.

@dangh Once the PR on oscrypto is merged, Package Control can be updated to fix this issue with the latest version of oscrypto

@max-mykhailenko
Copy link

@wbond may I know when you plan to release it?

@wbond
Copy link
Owner

wbond commented Jun 29, 2020

No, I don’t have a date. This is a hobby for me that sits behind my day job and taking care of my family. As of right now most of my nights are spoken for this week.

@findyy99
Copy link

So, anyone know how to solve this bug on macOS big Sur?
Are there something specific I can do?

@TerminalFi
Copy link
Contributor

@findyy99 see the referenced PR above.

@findyy99
Copy link

@TheSecEng Sorry, did you mean I need to complie the Package Control by myself?

@TerminalFi
Copy link
Contributor

I just mean that there is a PR to fix this. Will Bond just needs to test and validate it first. You can do 1 of three things.

  1. Wait for a new release
  2. Uninstall Package Control; Clone my fork and switch to a working branch
  3. Generate a new package from my branch.

If you do either 2 or 3, you won't receive updates though. I would recommend you wait for Will to push a new release. Shouldn't be too long.

@findyy99
Copy link

@TheSecEng Thank you for your help! I know how to deal with it.

@GuruM
Copy link

GuruM commented Jul 18, 2020

Sorry if this is bad form or the wrong place to mention it, but I tried your branch and it worked for me @TheSecEng! Thanks so much.

@pak-gh
Copy link

pak-gh commented Jul 24, 2020

Sorry, I new to this forum and fairly new to git. How can I get the branch mentioned about so I can get package control working with Big Sur. I really appreciate the help...

@dofy
Copy link

dofy commented Jul 28, 2020

@pak-gh

  1. open the Sublime app

  2. press cmd + shift + p

  3. input Browse Packages and press Enter

  4. this command will open the Finder app

  5. goto the Installed Packages folder and delete the Package Control plugin file if you have

  6. select the Packages folder which in the same level of the Installed Packages folder

  7. cmd + c to copy the folder (path)

  8. open Terminal app

  9. input cd and press cmd + v

  10. you will see the command like this

    cd /Users/USER/Library/Application Support/Sublime Text 3/Packages
    
  11. press Enter to go into the folder

  12. clone the @TheSecEng 's fork and checkout the update/oscrypto branch

    git clone git@github.com:TheSecEng/package_control.git "Package Control"
    cd Package\ Control
    git checkout origin/update/oscrypto
    
  13. restart Sublime

@ShawnLiii
Copy link

ShawnLiii commented Jul 28, 2020

git clone git@github.com:TheSecEng/package_control.git "Package Control"

Hi, thanks for mentioning. However, I met an issue when I executed this command:
git checkout origin/update/oscrypto

I got the error:
fatal: not a git repository (or any of the parent directories): .git

@dofy
Copy link

dofy commented Jul 28, 2020

@ShawnLiii

Oh, sorry...

Before checkout branch, you must go to the Package Control folder first.

@ShawnLiii
Copy link

@ShawnLiii

Oh, sorry...

Before checkout branch, you must go to the Package Control folder first.

It works, thanks

@pak-gh
Copy link

pak-gh commented Jul 31, 2020

I was away, just back back and saw this answer. Thanks SO MUCH. However when I try to clone I receive the following error
Any thoughts?

pk@Pauls-mbpro-16 Packages % git clone git@github.com:TheSecEng/package_control.git "Package Control"
Cloning into 'Package Control'...
Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@h-jia
Copy link

h-jia commented Jul 31, 2020

To avoid confusion, please see

This should fixed in master as of 32e44f7.

However, please be aware I've still got some testing and merging to do before cutting a new build.

@findyy99
Copy link

findyy99 commented Aug 2, 2020

  • Sorry, I am confusing when I open Package Install, It always says
Error executing: /usr/bin/git symbolic-ref -q HEAD

Working directory: /Users/findyy/Library/Application Support/Sublime Text/Packages/Package Control

VCS-based packages can be ignored by changing the "ignore_vcs_packages" setting to true.

Sublime Text will need to be restarted once the setting is changed.

  • What is the problem? Did I do something wrong?

@h-jia
Copy link

h-jia commented Aug 2, 2020

  • Sorry, I am confusing when I open Package Install, It always says
Error executing: /usr/bin/git symbolic-ref -q HEAD

Working directory: /Users/findyy/Library/Application Support/Sublime Text/Packages/Package Control

VCS-based packages can be ignored by changing the "ignore_vcs_packages" setting to true.

Sublime Text will need to be restarted once the setting is changed.
  • What is the problem? Did I do something wrong?

You can still use it without problem. Just ignore it and install whatever package you need. Hopefully the official updates will fix all these issues very soon.

@findyy99
Copy link

findyy99 commented Aug 2, 2020

@h-jia You are right! Thank you!

@pak-gh
Copy link

pak-gh commented Aug 3, 2020

Thanks everyone for the awesome help!!! It's much appreciated. I receive the same error as findyy99 but as h-jia says I'm now able to successfully install packages. Once the official build comes out I'll delete package control and reinstall it.
This early release has enabled me to carry on though :-) Awesome!

@wbond
Copy link
Owner

wbond commented Aug 8, 2020

This should fixed in master as of 32e44f7.

However, please be aware I've still got some testing and merging to do before cutting a new build.

@wbond wbond closed this as completed Aug 8, 2020
@emman-bautista
Copy link

I am having problem at the last command. It seems that branch is missing. Please help.

You can do things below:

git clone https://github.com/TheSecEng/package_control

mv package_control Package\ Control

git checkout origin/update/oscrypto

@dofy
Copy link

dofy commented Aug 21, 2020

I am having problem at the last command. It seems that branch is missing. Please help.

You can do things below:

git clone https://github.com/TheSecEng/package_control

mv package_control Package\ Control

git checkout origin/update/oscrypto

You need change the directory to Package Control before checkout

cd Package\ Control

@TerminalFi
Copy link
Contributor

This has been merged into master on this repo. My branch has been deleted

@Tekl
Copy link

Tekl commented Sep 1, 2020

It still does not work. I don't get "Package Control:" commands after installing it. I've a fresh Sublime installation.

@wbond
Copy link
Owner

wbond commented Sep 1, 2020

@Tekl If you open a new issue with the requested info, then someone can likely point you in the right direction. https://packagecontrol.io/docs/issues

@Tekl
Copy link

Tekl commented Sep 1, 2020

Thanks for the fast reply. It's the same error, so I don't think I need to open a new issue. I already tried to install Package Control manually like explained here: #1483 (comment)

But then Sublime just thinks it is not installed.

@wbond
Copy link
Owner

wbond commented Sep 1, 2020

This issue has been fixed on master. If you are having trouble on master, please open a new issue with the details I requested. There is a reason I asked for those details.

If you are, in fact, getting the same error as this bug report, then you are not currently running master, or did not actually follow the instructions you linked, since the original issue is from a .sublime-package, whereas installing master using the instructions you linked will result in a directory-based install.

Honestly, none of this back and forth would be necessary if you just followed the instructions I linked to and posted your entire console contents in a new issue.

@Tekl
Copy link

Tekl commented Sep 1, 2020

Sorry, I misunderstood (my English is not the best) the instructions and I did the clone inside the "Installed Packages" folder. Everything is fine now. I first thought the closed issue does mean that Sublime should install the bugfixed version.

@glgray
Copy link

glgray commented Sep 17, 2020

For those of us running the release version (3.2.2, Build 3211), do you know when this fix will be pushed out as an update to that version?

@wbond
Copy link
Owner

wbond commented Sep 17, 2020

After enough people test it on the beta operating system release. My hope is to have an RC in the PC prerelease channel in the next day or so.

No matter what I plan on having this in production release by the time Big Sur is ready for general consumption. For now, if someone can install a beta OS, I don't consider it onerous to clone a git repo and help test software for that beta OS.

@glgray
Copy link

glgray commented Sep 17, 2020

After enough people test it on the beta operating system release. My hope is to have an RC in the PC prerelease channel in the next day or so.

No matter what I plan on having this in production release by the time Big Sur is ready for general consumption. For now, if someone can install a beta OS, I don't consider it onerous to clone a git repo and help test software for that beta OS.

Thank you for the quick reply. I am not running the beta of Big Sur, but I expect it will be released any day now and I was simply checking the status of my essential software with it.

@wbond
Copy link
Owner

wbond commented Sep 17, 2020

I believe they just released beta 7, and that it is expected to be released in October, if previous years are anything to go by.

@dave4jr
Copy link

dave4jr commented Nov 17, 2020

@wbond Hey Will, first off, really appreciate the extra time you spend maintaining this package, I know it's a ton of extra work. So thank you. Just wanted to shoot you a friendly reminder, Big Sur has just been released in production yesterday. Just wanted to check the status here. Thanks man.

@wbond
Copy link
Owner

wbond commented Nov 17, 2020

Package Control 3.4.0 with Big Sur support was released at least a month ago, if I recall correctly. You’ll need to manually remove your old install, then the built in ST installer will work.

@brandonmcconnell
Copy link

For anyone who experiences this issue and needs a full up-to-date solution, here is a blend of @dofy's solution mixed with the update from @wbond about Package Control being updated to resolve this issue.

Here are the full steps to resolve this issue, essentially be deleting and reinstalling Package Control:

  1. Open the Sublime Text app.
  2. Press Cmd+Shift+P
  3. Type "Browse Packages" and press Enter. This command will open the Finder app to the appropriate folder.
  4. Go to the "Installed Packages" folder which is a sibling to the "Packages" folder that was opened in the previous step.
  5. Delete the Package Control plugin file if you have it. It may be named something like this: Package Control.sublime-package
  6. Restart Sublime Text (must restart via quitting Cmd+Q not just closing and reopening).
  7. Once Sublime Text has restarted and is back up, press Cmd+Shift+P again.
  8. Type "Install Package Control"
  9. Restart Sublime Text again for good measure.
  10. Press Cmd+Shift+P
  11. Type "Package Control" — and voila, all your Package Control commands should be back 🎉

@temuraru
Copy link

The solution that worked for me was: #1577 (comment) "The solution is just to remove the /usr/local/lib/libcrypto.dylib which is broken for some reason. After removing it package control works without issues."
That file was a symlink: /usr/local/lib/libcrypto.dylib -> ../Cellar/openssl@3/3.1.1_1/lib/libcrypto.dylib. - I'm not sure about any side-effects, though...

@deathaxe
Copy link
Collaborator

Not broken, but MacOS ships OpenSSL 3, but Package Control 3.x requires OpenSSL 1.1

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

Successfully merging a pull request may close this issue.