plexdrive icon indicating copy to clipboard operation
plexdrive copied to clipboard

Incompatible with macFUSE 4.x

Open bFanek opened this issue 5 years ago • 10 comments

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 avatar Nov 30 '20 03:11 bFanek

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 avatar Dec 01 '20 12:12 felixbuenemann

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.

felixbuenemann avatar Dec 02 '20 15:12 felixbuenemann

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 avatar Dec 03 '20 01:12 bFanek

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!

bFanek avatar Oct 31 '21 13:10 bFanek

@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.

bfleischer avatar Nov 02 '21 20:11 bfleischer

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.

bFanek avatar Nov 06 '21 12:11 bFanek

@bfleischer - you might want to check out https://github.com/bazil/fuse/issues/224

jtolio avatar Nov 12 '21 19:11 jtolio

@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 https://github.com/bazil/fuse/issues/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.

bfleischer avatar Nov 12 '21 23:11 bfleischer

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.

GwynethLlewelyn avatar Jul 30 '23 00:07 GwynethLlewelyn

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

anacrolix avatar Aug 02 '23 12:08 anacrolix