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

Incompatible with macFUSE 4.x #390

Open
bFanek opened this issue Nov 30, 2020 · 10 comments
Open

Incompatible with macFUSE 4.x #390

bFanek opened this issue Nov 30, 2020 · 10 comments

Comments

@bFanek
Copy link

bFanek commented Nov 30, 2020

I upgraded OSXFUSE to version 4.0.4, noticed it was renamed to macFUSE.

now the mount command for plexdrive fails with error "cannot locate OSXFUSE"

I can see macFUSE installed in the preferences panel, also encfs and unionfs is working normally.

Any clue? thanks!

@bFanek bFanek changed the title cannot locate OSXFUSE “cannot locate OSXFUSE” after upgrading macFUSE to 4.0.4 Nov 30, 2020
@felixbuenemann
Copy link
Collaborator

I looked into this yesterday and it is not so easy to fix, since macFUSE made some changes that make it incompatible with how plexdrive or rather the fuse package we use talks to it.

There is now an additional communication channel between macFUSE and the server (eg. plexdrive), that I would have to reverse engineer to find out what is going on, since the macFUSE source code is closed.

Switching to a different fuse package might be an option, but is not a trivial change either.

So for the moment your best bet is do downgrade to MacFUSE 3.x.

I'm interested in getting this working though, since I switched to an M1-based Mac and macFUSE 4.x is the only compatible version.

@felixbuenemann felixbuenemann changed the title “cannot locate OSXFUSE” after upgrading macFUSE to 4.0.4 Incompatible with macFUSE to 4.x Dec 1, 2020
@felixbuenemann
Copy link
Collaborator

felixbuenemann commented Dec 2, 2020

Other Go FUSE packages are in the same boat, but I've made some progress to implement the required changes in a fork of the bazil.org/fuse package.

@bFanek bFanek changed the title Incompatible with macFUSE to 4.x Incompatible with macFUSE 4.x Dec 3, 2020
@bFanek
Copy link
Author

bFanek commented Dec 3, 2020

Thank you Felix. Appreciate the update.

I reinstalled latest version 3.x of osxfuse. it's interesting that both osxfuse 3.x and macFuse 4.x are installed on my Mac now, and everything working normally.

Will wait for update before I retire osxfuse 3.x and keep macFuse 4.x

cheers

@bFanek
Copy link
Author

bFanek commented Oct 31, 2021

Hello, any update on the FUSE compatibility?

I just upgraded my Intel Mac to macOS Monetary (Mac OS 12), I can no longer get the older FUSE 3.x to load or install, errors out with “The FUSE for macOS installation is not compatabile with this version of macOS”

FUSE 4.x is installed and running properly, but 4.x does not work with Plexdrive (error osxfuse not found). Note that FUSE 4.x is working normally for other tools that requires it like encfs and unionfs.

At this point I cannot get plexdrive to work unless i revert back to macOS 11 (Big Sur), which I’m trying to avoid.

Can we make Plexdrive work with FUSE 4.x like the other tools?
Or is there a workaround to get FUSE 3.x installed on Monetary?

Cheers!

@bfleischer
Copy link

@felixbuenemann

There is now an additional communication channel between macFUSE and the server (eg. plexdrive), that I would have to reverse engineer to find out what is going on, since the macFUSE source code is closed.

(I'm the maintainer of macFUSE)

That's not entirely correct. The changes you are talking about were introduced in version 3.3.0 in 2016, more than 5 years ago. Up until version 4, both, the old mount style and the new mount style, have been supported. The relevant source code (libfuse and mount_osxfuse) is open source. The "new style mount process" (the "additional communication channel", as you call it) works exactly as it does on Linux. Older versions of FUSE on macOS used a non-standard mechanism. This means that updating your Go library for macFUSE 4 should be very easy.

From the release notes of version 3.3.0:

When mounting a FUSE volume on Linux, fusermount opens the FUSE device and passes the file descriptor back to libfuse.

However, on OS X libosxfuse used to be responsible for locating a free FUSE device, opening it, and then passing the file descriptor to mount_osxfuse. For this to work libosxfuse needs to be aware of low level implementation details like the number of registered FUSE devices.

In order to decouple libosxfuse from the FUSE kernel extension the mount process has been revised to match FUSE on Linux. mount_osxfuse will locate a free FUSE device, open it, and then pass the file descriptor back to libosxfuse.

Quite frankly, macFUSE is not to blame here. In my opinion five years has been plenty of time to update third-party libraries and add support for the much cleaner Linux-style mount process. The new Linux-style mount process is required for supporting future versions of macOS.

I'm happy to give pointers and will try my best to answer your questions, if you want to update plexdrive to work with macFUSE 4.

@bFanek
Copy link
Author

bFanek commented Nov 6, 2021

Plexdrive is no longer functional on macOS Monetary (12), or on any M1 Mac.

I decided to retire plexdrive until it’s updated. I’m using rclone mount now instead and it’s working smoothly. Only downside is it takes longer to load the stream. Will revert back to Plexdrive if/when it’s updated to work under Monetary and M1 Macs.

@jtolio
Copy link

jtolio commented Nov 12, 2021

@bfleischer - you might want to check out bazil/fuse#224

@bfleischer
Copy link

@jtolio

Thanks. Of course it is up to the author of bazil-fuse to decide if he wants to drop support for macOS from his library or not.

macOS is not Linux. At the kernel level there are significant differences between macOS and Linux. The macFUSE kernel extension contains a lot of code to bridge this gap and support most of the Linux FUSE API on macOS. The "additional communication channel" mentioned here brings macFUSE closer to Linux FUSE and removes the need for some of the platform specific-code in bazil-fuse. (The maintainer of bazil-fuse acknowledges this in bazil/fuse#141)

TL;DR Supporting macOS requires additional work. Blaming this on the open source status of macFUSE is a straw man argument. The relevant macFUSE source code was and will continue to be open source.

@GwynethLlewelyn
Copy link

Hi! As both a Plex & Mac user, it worries me to see that this issue affects everything else these days...

Anyway, it should be possible to use @anacrolix's own fork of bazil/fuse, which is a drop-in replacement (no code changes necessary) which provides the exact same functionality — plus working macFUSE 4+ support.

You can get it from here: https://github.com/anacrolix/fuse

No need to change any of the existing code :) — just the import line.

@anacrolix
Copy link

anacrolix/fuse now supports FUSE-T in addition to the above.

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

No branches or pull requests

6 participants