Sapling installed with homebrew on macOS sonoma fails with NSInvalidArgumentException
zayenz opened this issue · comments
System
- M1 Max
- macOS Sonoma 14.0
- Homebrew 4.1.13
- sapling version 0.2.20230523-092610-f12b7eee_2.arm64_ventura.bottle.tar.gz
After installation, the sl command fails directly with an NSInvalidArgumentException.
The full interaction of installing and running just the sl command is included below
~/
X brew install sapling
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################################################# 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sapling/manifests/0.2.20230523-092610-f12b7eee_2
Already downloaded: /Users/zayenz/Library/Caches/Homebrew/downloads/f2ab326e5c5dd54a6aa9bef7a174df2d42ddc384f82e8cc1353c4e7085e76195--sapling-0.2.20230523-092610-f12b7eee_2.bottle_manifest.json
==> Fetching sapling
==> Downloading https://ghcr.io/v2/homebrew/core/sapling/blobs/sha256:13d796b6ab41617dbfe6d0f0198220a9773738a1150842ea410fbcdaf4ed3036
Already downloaded: /Users/zayenz/Library/Caches/Homebrew/downloads/c56e798cf545a0d4f177d0576a4ebc161185cc92f4691328be5b9e05275d35dd--sapling--0.2.20230523-092610-f12b7eee_2.arm64_ventura.bottle.tar.gz
==> Pouring sapling--0.2.20230523-092610-f12b7eee_2.arm64_ventura.bottle.tar.gz
🍺 /opt/homebrew/Cellar/sapling/0.2.20230523-092610-f12b7eee_2: 533 files, 77.6MB
==> Running `brew cleanup sapling`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
~/ took 3s
➜ sl
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600002f9c540'
*** First throw call stack:
(
0 CoreFoundation 0x000000018341c8c0 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x0000000182f15eb4 objc_exception_throw + 60
2 CoreFoundation 0x00000001834ce3dc -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00000001833869e4 ___forwarding___ + 1572
4 CoreFoundation 0x0000000183386300 _CF_forwarding_prep_0 + 96
5 Foundation 0x000000018445b4f0 -[NSProcessInfo arguments] + 188
6 CoreFoundation 0x0000000183497ff8 __getDefaultArguments_block_invoke + 96
7 libdispatch.dylib 0x000000018311d910 _dispatch_client_callout + 20
8 libdispatch.dylib 0x000000018311f14c _dispatch_once_callout + 32
9 CoreFoundation 0x0000000183497994 _addBackstopValuesForIdentifierAndSource + 640
10 CoreFoundation 0x0000000183352254 __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
11 CoreFoundation 0x000000018349763c -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
12 CoreFoundation 0x00000001833585c4 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
13 CoreFoundation 0x00000001834d68bc __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296
14 CoreFoundation 0x00000001834d6564 -[_CFXPreferences withSearchLists:] + 84
15 CoreFoundation 0x0000000183353b18 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300
16 CoreFoundation 0x00000001834d6710 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
17 CoreFoundation 0x0000000183353440 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156
18 CoreFoundation 0x0000000183353368 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
19 SystemConfiguration 0x00000001840e3478 SCDynamicStoreCopyProxiesWithOptions + 180
20 sl 0x0000000104442144 Curl_macos_init + 16
21 sl 0x00000001044332ac global_init + 172
22 sl 0x0000000104423efc _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h5453382a87787705E + 36
23 sl 0x0000000104821384 _ZN3std10sys_common4once5queue4Once4call17hf8f1076e0eb7cb95E + 756
24 sl 0x0000000104424244 _ZN4curl9INIT_CTOR9init_ctor17h9820e8a291dc196fE + 96
25 dyld 0x0000000182f6d5c8 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 168
26 dyld 0x0000000182fb26ec ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.202 + 172
27 dyld 0x0000000182fa5c60 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496
28 dyld 0x0000000182f4d2fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300
29 dyld 0x0000000182fa4c98 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192
30 dyld 0x0000000182fa7780 _ZNK5dyld39MachOFile32forEachInitializerPointerSectionER11DiagnosticsU13block_pointerFvjjRbE + 160
31 dyld 0x0000000182fb23e0 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 432
32 dyld 0x0000000182f69798 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 448
33 dyld 0x0000000182f6fb14 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
34 dyld 0x0000000182f69b4c _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220
35 dyld 0x0000000182f6d654 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 112
36 dyld 0x0000000182f69ccc _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 304
37 dyld 0x0000000182f8ead4 _ZN5dyld44APIs25runAllInitializersForMainEv + 464
38 dyld 0x0000000182f51f34 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
39 dyld 0x0000000182f50f44 start + 1948
)
libc++abi: terminating due to uncaught exception of type NSException
[1] 48200 abort sl
I also encounter this error when using a 0.2.20230523-092610+f12b7eee
binary that I built from source
i kinda got similar issue and restarting the laptop resolved it for me, but YMMV
I had to fix a problem with the Makefile in order to build main, but once I did the problem didn't repro there.
Same issue here and restarting doesn't work.
I installed Sapling from homebrew: sapling--0.2.20230523-092610-f12b7eee_2.ventura.bottle.tar.gz
OS: Sonoma 14.0
The root cause of this seems to be alexcrichton/curl-rust#524 (comment). I have worked around this on Homebrew's side; brew reinstall sapling
should make it work.
If you are building Sapling yourself, try adding the force-system-lib-on-osx
feature to the curl
dependency found in the following files:
eden/scm/lib/http-client/Cargo.toml
eden/scm/lib/doctor/network/Cargo.toml
eden/scm/lib/revisionstore/Cargo.toml
This will likely be worked around in the next release of the curl
crate.
Works for me after reinstalling Sapling with brew
Works for me as well after a reinstall. Thanks for the fix.