Repository: gitbutlerapp/gitbutler

Issue #4895: "Error: Function not implemented" on BTRFS
Created: 2024-09-12T13:46:33Z
It doesn't seem to be always possible to use the flock crate successfully, and right now this makes the application fail entirely as an exclusive lock can't be acquired.
Since the error code is known, and the locking is just there to prevent multi-window operation which isn't advisable, but also not immediately a problem, one could make the lock optional in this specific case.
Alternatively, we could use the cargo crate and rely on a possibly unstable version of a locking function that probably is more portable. After all, Cargo probably works there.
Discussed in #4851

Originally posted by azzamsa September  9, 2024
Hi, 👋🏽
I get this error when importing a local repo.
I can't import any local repo, I get all similar errors.
OS: Fedora Linux 40 (Workstation Edition) x86_64
DE: GNOME 46.4
WM: Mutter (Wayland)

🦄 flatpak list | grep butler
GitButler       com.gitbutler.gitbutler 0.12.24 stable  user

🦄 flatpak run com.gitbutler.gitbutler

** (git-butler:2): WARNING **: 12:23:58.044: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
2024-09-09T05:23:58.099414Z  INFO crates/gitbutler-tauri/src/main.rs:65: system git executable for fetch/push: "git"
2024-09-09T05:23:58.099500Z  INFO crates/gitbutler-tauri/src/main.rs:102: starting app version=0.12.24 name=GitButler
2024-09-09T05:23:58.297572Z  INFO list_projects: crates/gitbutler-tauri/src/projects.rs:46: close time.busy=26.5µs time.idle=18.6µs
2024-09-09T05:23:58.306438Z  INFO get_user: crates/gitbutler-tauri/src/users.rs:10: close time.busy=17.8µs time.idle=13.5µs
2024-09-09T05:23:58.417188Z  INFO get_project: crates/gitbutler-tauri/src/projects.rs:32: close time.busy=3.90ms time.idle=38.7µs id=bd979185-628e-47be-a317-4690096c30a0 no_validation=None
2024-09-09T05:23:58.421456Z ERROR set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: error=Failed to check if lock is taken

Caused by:
    Function not implemented (os error 38) id=bd979185-628e-47be-a317-4690096c30a0 window="main"
2024-09-09T05:23:58.421476Z  INFO set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: close time.busy=220µs time.idle=12.9µs id=bd979185-628e-47be-a317-4690096c30a0 window="main"
2024-09-09T05:23:58.421490Z ERROR set_project_active: crates/gitbutler-tauri/src/projects.rs:67: error=Error(Failed to check if lock is taken

Caused by:
    Function not implemented (os error 38)) id=bd979185-628e-47be-a317-4690096c30a0
2024-09-09T05:23:58.421501Z  INFO set_project_active: crates/gitbutler-tauri/src/projects.rs:67: close time.busy=3.39ms time.idle=8.36µs id=bd979185-628e-47be-a317-4690096c30a0
2024-09-09T05:23:58.428809Z  INFO list_projects: crates/gitbutler-tauri/src/projects.rs:46: close time.busy=45.9µs time.idle=16.9µs
2024-09-09T05:24:01.447957Z  INFO get_project: crates/gitbutler-tauri/src/projects.rs:32: close time.busy=3.32ms time.idle=21.8µs id=e6171fce-0396-469c-8371-38809c04b665 no_validation=None
2024-09-09T05:24:01.450663Z ERROR set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: error=Failed to check if lock is taken

Caused by:
    Function not implemented (os error 38) id=e6171fce-0396-469c-8371-38809c04b665 window="main"
2024-09-09T05:24:01.450675Z  INFO set_project_active:set_project_to_window: crates/gitbutler-tauri/src/window.rs:129: close time.busy=186µs time.idle=7.23µs id=e6171fce-0396-469c-8371-38809c04b665 window="main"
2024-09-09T05:24:01.450683Z ERROR set_project_active: crates/gitbutler-tauri/src/projects.rs:67: error=Error(Failed to check if lock is taken

Caused by:
    Function not implemented (os error 38)) id=e6171fce-0396-469c-8371-38809c04b665
2024-09-09T05:24:01.450690Z  INFO set_project_active: crates/gitbutler-tauri/src/projects.rs:67: close time.busy=2.14ms time.idle=4.82µs id=e6171fce-0396-469c-8371-38809c04b665

Duplicate issue #4902: error in the path /run/user/1000/doc/5029259c/Dev
Created: 2024-09-13T08:09:00Z
hello, i have an issue setting the path to clone from github,
Error
Error: Refusing to initialize the non-empty directory as '/run/user/1000/doc/5029259c/Dev/x
my os is fedora and i cant, i dont know if it is a issue or just me
/run/user/1000/doc/5029259c/Dev is the default dir and can't change it
Function not implemented (os error 38)

Closing comment (2024-09-13T10:36:49Z): Thanks for reporting!

Function not implemented (os error 38)

This portion of the issue should be resolved with #4900, and will report here once a nightly is available. This also means this is a duplicate of #4895.

Error: Refusing to initialize the non-empty directory as '/run/user/1000/doc/5029259c/Dev/x

This is gitoxide refusing to clone into a none-empty directory, which is similar to what Git would do. Can you specify one (or non-existing) that is empty?
I'd like to leave this issue open, despite being a duplicate, to resolve the issue around cloning, or maybe learn how both portions of this issue are related. Maybe a failed first clone leaves files that prevent a second clone?