screenpipe
screenpipe copied to clipboard
Screenpipe Process Doesn't Terminate When Closing the App
Description:
When closing the Screenpipe app (e.g., via right-clicking on the tray icon and selecting "Exit"), the app interface closes, but the screenpipe.exe process continues to run in the background, as seen in Task Manager.
Steps to Reproduce:
- Open the Screenpipe app.
- Right-click on the app icon in the Windows tray.
- Select "Quit Screenpipe" to close the app.
- Open Task Manager.
- Observe that the
screenpipe.exeprocess is still running.
Expected Behavior:
The screenpipe.exe process should terminate completely when the app is closed.
Actual Behavior:
The screenpipe.exe process remains active in the background, even after closing the app interface.
Environment:
- App Version: 0.2.72
- OS: Windows 11
Additional Notes:
This issue is linked to an update failure I got, as the background process interferes with the installation of the new version.
@meltiso hmm thanks a lot for all the feedback!
this is strange, we have a feature in the background process to "auto destruct" when the app is stopped
https://github.com/mediar-ai/screenpipe/blob/660cf63e732c77fafe64a90bdc5ef4fb8587dbcd/screenpipe-app-tauri/src-tauri/src/sidecar.rs#L272
but did not test on windows (work on mac) maybe the PID system is different
Hey @louis030195 👋 I think this commit didn't solve the issue. Still have the screenpipe.exe process not closing when exiting the app (but screenpipe-app.exe exits succesfully)
https://github.com/user-attachments/assets/c5d6f137-1834-4b75-912f-3340fcb6399f
@meltiso thank you, will investigate why
@louis030195 I updated to v0.2.82 and I'm still getting the error. The process screepipe.exe does not exit when closing the app via system tray. Seems to be an annoying bug to solve :( I haven't checked yet if both processes close during update, but will do
Hey @louis030195 Updating the app works (screepipe.exe process is killed), but when closing the app from the tray, the issue remains (screenpipe.exe not killed but screenpipe-app.exe exits)
Unsure what the proper way is to shut it down, but hitting control-c on a mac gives me this error, hopefully it may help finding the issue on windows
` thread 'tokio-runtime-worker' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/blocking/shutdown.rs:51:21: Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: tokio::runtime::blocking::shutdown::Receiver::wait
3: tokio::runtime::blocking::pool::BlockingPool::shutdown
4: core::ptr::drop_in_placetokio::runtime::blocking::pool::BlockingPool
5: screenpipe::main::{{closure}}::{{closure}}
6: tokio::runtime::task::core::Core<T,S>::poll
7: tokio::runtime::task::harness::Harness<T,S>::poll
8: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
9: tokio::runtime::scheduler::multi_thread::worker::Context::run
10: tokio::runtime::context::runtime::enter_runtime
11: tokio::runtime::scheduler::multi_thread::worker::run
12: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
13: tokio::runtime::task::core::Core<T,S>::poll
14: tokio::runtime::task::harness::Harness<T,S>::poll
15: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.`