lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 291 forks source link

lastpass-cli sync does not complete on Mac OS 14 #664

Open ThomasRasmussen opened 11 months ago

ThomasRasmussen commented 11 months ago

After having my Mac upgraded to Mac OS Sonoma (14.0), the lpass sync (upload) does not complete as expected. If I add a new entry it keeps having id=0. I have tried to set LPASS_LOG_LEVEL=8, this only shows some POST to /login_check.php

I have installed lastpass from brew and have also tried to compile it directly from source (latest checkout from github). This does not change anything in behavior. I have also tried to logout of lastpass, and then remove ~/.lpass folder entirely. Then log in again, let my vault sync and then add the entry, this is also never uploaded.

I have tried to build the source-code in a docker container on my mac (base image Ubuntu), and from this I can upload changes without issues, and they are infact sync'ed to the mac instance.

Mac OS version: 14.0 (23A344) lastpass cli: LastPass CLI v1.3.6.GIT

mdillmann commented 8 months ago

I can confirm that upload-queue is not working on MacOS Sonoma 14.2.1. lpass-cli 1.3.7 via brew.

There seem to be some restrictions added on MacOS 14 because if I run "sudo lpass sync" it works. But of course one needs to re-authenticate as the sync is run under a different user.

But this shows that something is wrong. Probably in the uploader-queue when it tries to fork(). It writes the PID into the file but I never got to see the actual child process. So my suspicion is, something the child does early after fork makes MacOS 14 unhappy. Looking at the code it should put some "UQ:" messages in the log if debug is enabled but I never got to see any of these "UQ:" tags.

Coredump info: `System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000010181ca8c Exception Codes: 0x0000000000000001, 0x000000010181ca8c

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [16450]

VM Region Info: 0x10181ca8c is not in any region. Bytes after previous region: 2701 Bytes before following region: 767348 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL LINKEDIT 101800000-10181c000 [ 112K] r--/rwx SM=COW ...bldap.2.dylib ---> GAP OF 0xbc000 BYTES TEXT 1018d8000-10197c000 [ 656K] r-x/rwx SM=COW ...d.1.5.5.dylib

Application Specific Information: multi-threaded process forked crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_trace.dylib 0x18db3c23c _os_log_preferences_refresh + 68 1 libsystem_trace.dylib 0x18db3cc9c os_log_type_enabled + 712 2 CoreFoundation 0x18de6e3f8 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 204 3 CoreFoundation 0x18de6e30c -[CFPrefsSource copyValueForKey:] + 52 4 CoreFoundation 0x18de6e2c0 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32 5 CoreFoundation 0x18de6790c __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 376 6 CoreFoundation 0x18dfea460 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384 7 CoreFoundation 0x18de671e8 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156 8 CoreFoundation 0x18de67110 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112 9 SystemConfiguration 0x18ebf9478 SCDynamicStoreCopyProxiesWithOptions + 180 10 libcurl.4.dylib 0x101613870 Curl_macos_init + 16 11 libcurl.4.dylib 0x1015f6cf4 global_init + 172 12 libcurl.4.dylib 0x1015f6c38 curl_global_init + 68 13 lpass 0x100ff11e4 upload_queue_ensure_running + 324 14 lpass 0x100fe8b44 cmd_sync + 184 15 lpass 0x100fef42c main + 744 16 dyld 0x18da5d0e0 start + 2360

`

pythianasharma commented 5 months ago

Hi Guys,

Are you aware of any fix for this issue?

Thanks