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

Segmentation Fault When Running Screenpipe on macOS #366

Closed
aybanda opened this issue Sep 27, 2024 · 9 comments
Closed

Segmentation Fault When Running Screenpipe on macOS #366

aybanda opened this issue Sep 27, 2024 · 9 comments

Comments

@aybanda
Copy link

aybanda commented Sep 27, 2024

Description:
I'm encountering a persistent segmentation fault when trying to run Screenpipe on my macOS system. I've tried multiple build configurations, but the issue persists.

System Information:

  • OS: macOS [14.6.1 ]
  • Processor: [Apple M1]
  • Rust version: [rustc 1.81.0]
  • Cargo version: [cargo 1.81.0

Steps to Reproduce:

  1. Cloned the Screenpipe repository
  2. Ran cargo build --release
  3. Attempted to run with cargo run --release --bin screenpipe

I've also tried the following variations, all resulting in a segmentation fault:

  • cargo run --bin screenpipe (debug build)
  • cargo run --release --features metal --bin screenpipe
  • RUST_BACKTRACE=1 cargo run --release --features metal --bin screenpipe

Error Output:
zsh: segmentation fault cargo run --release --features metal --bin screenpipe

Additional Information:

  • The project builds successfully in all configurations.
  • I've performed a clean build (cargo clean) before attempting each configuration.
  • I've ensured my system is up to date, including Xcode and command-line tools.
  • No additional error messages or logs are generated before the segmentation fault.

Questions:
2. Are there any additional debugging steps or information I can provide to help diagnose this issue?
3. Are there any specific system requirements or configurations needed for macOS that I might have missed?

I appreciate any help or guidance in resolving this issue. Thank you for your time and assistance.

Copy link

linear bot commented Sep 27, 2024

@louis030195
Copy link
Collaborator

Description: I'm encountering a persistent segmentation fault when trying to run Screenpipe on my macOS system. I've tried multiple build configurations, but the issue persists.

System Information:

  • OS: macOS [14.6.1 ]
  • Processor: [Apple M1]
  • Rust version: [rustc 1.81.0]
  • Cargo version: [cargo 1.81.0

Steps to Reproduce:

  1. Cloned the Screenpipe repository
  2. Ran cargo build --release
  3. Attempted to run with cargo run --release --bin screenpipe

I've also tried the following variations, all resulting in a segmentation fault:

  • cargo run --bin screenpipe (debug build)
  • cargo run --release --features metal --bin screenpipe
  • RUST_BACKTRACE=1 cargo run --release --features metal --bin screenpipe

Error Output: zsh: segmentation fault cargo run --release --features metal --bin screenpipe

Additional Information:

  • The project builds successfully in all configurations.
  • I've performed a clean build (cargo clean) before attempting each configuration.
  • I've ensured my system is up to date, including Xcode and command-line tools.
  • No additional error messages or logs are generated before the segmentation fault.

Questions: 2. Are there any additional debugging steps or information I can provide to help diagnose this issue? 3. Are there any specific system requirements or configurations needed for macOS that I might have missed?

I appreciate any help or guidance in resolving this issue. Thank you for your time and assistance.

hmm

can you try

screenpipe --list-audio-devices

then

screenpipe --audio-device <your device> don't pick Display audio, i suspect this is the reason #297

if this is the case i might prioritize issue 297 again

i know some people having seg fault but only on specific versions of macos weirdly

@doublej
Copy link

doublej commented Sep 27, 2024

Got past this issue by finding relevant errors in console.

Request message contains a target_token to accessing_process (TCCDProcess: identifier=screenpipe-555549441aea18d2f12e32a0812f8fab07d28dbe, pid=18185, auid=501, euid=501, binary_path=/opt/homebrew/Cellar/screenpipe/0.1.90/bin/screenpipe) but TCCDProcess: identifier=com.apple.audio.coreaudiod, pid=473, auid=202, euid=202, binary_path=/usr/sbin/coreaudiod is not a TCC manager for service: kTCCServiceScreenCapture.

Then following step 1 and 2 of the ChatGPT response below. Note that this reset all your screencapture permissions so you'll have some permission dialog filled days ahead of you.

This message looks like a macOS system log or error related to TCC (Transparency, Consent, and Control) services, which manage privacy permissions for apps. In this case, it seems like there’s a conflict where the process screenpipe (related to screen capture) is attempting to access screen recording or screen capture, but TCC permissions are not properly configured, or coreaudiod (which handles audio) is not the right process for managing screen capture permissions.

Here’s what might be happening:

  1. Screenpipe is trying to access screen recording functionality.
  2. The system is blocking this access because coreaudiod, an audio process, isn't responsible for screen capture permissions.
  3. Permissions for screenpipe may need to be manually configured or fixed.

Steps to resolve:

  1. Check privacy settings:

    • Go to System Preferences > Security & Privacy > Privacy > Screen Recording.
    • Make sure screenpipe (or any app using it) is allowed to capture your screen.
  2. Grant permissions using terminal (if required):

    • Sometimes macOS requires Terminal commands to manage TCC permissions. You can try granting screenpipe permission using a tool like tccutil:
      tccutil reset ScreenCapture
      Then, relaunch the app and allow the permission prompt.
  3. Reinstall/Update screenpipe:

    • Ensure you’re using the latest version of the software by running:
      brew update && brew upgrade screenpipe

If the issue persists, check whether other processes or configurations are preventing the correct allocation of permissions for screen recording.

@mgunnin
Copy link

mgunnin commented Oct 4, 2024

Having this exact issue on Mac 15.1.

@louis030195
Copy link
Collaborator

Having this exact issue on Mac 15.1.

is that macos beta?

usually macos beta means 20% of your apps will be broken

@mgunnin
Copy link

mgunnin commented Oct 5, 2024

It's the first app that is broken of all the ones I use.

@doublej
Copy link

doublej commented Oct 6, 2024

Have you tried step 2 in my reply?

@zacwasielewski
Copy link

zacwasielewski commented Oct 9, 2024

I had this exact issue on Mac OS 15.0. Resetting Screen Recording permissions via System Preferences > Security & Privacy had no effect, but running tccutil reset ScreenCapture (step 2 in @doublej's reply, above) fixed it for me.

(However, beware: as noted, that command resets Screen Recording permissions for all of your apps, not just ScreenPipe.)

@toorusr
Copy link

toorusr commented Nov 10, 2024

I had this exact issue on Mac OS 15.0. Resetting Screen Recording permissions via System Preferences > Security & Privacy had no effect, but running tccutil reset ScreenCapture (step 2 in @doublej's reply, above) fixed it for me.

Got a segmentation fault ./target/release/screenpipe too and this tccutil reset ScreenCapture resolved it. Thank you guys!

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

No branches or pull requests

6 participants