macfusion-ng / macfusion2

Macfusion2
225 stars 28 forks source link

new static libs that do not require the MacFuse compat layer #28

Closed tessus closed 6 years ago

tessus commented 8 years ago

I've created new static libs with the latest upstream code and third party libs:

SSHFS version 2.8 OSXFUSE 3.5.2 FUSE library version: 2.9.7 curlftpfs 0.9.2 libcurl/7.50.3 fuse/2.9

I even added a fallback mode as a safeguard.

ElDeveloper commented 8 years ago

After pulling down this branch and testing, I'm seeing the following message in the log viewer:

(SSHServerFS, [redacted], 10/23/16, 1:44 PM) 2016-10-23 13:44:47.750955 new_sshfs_askpass[10072:1768229] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[NOTE: this exception originated in the server.]
No tokens available, internal inconsistency, please restart your machine and try again'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fffb3ba67bb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffc8313a2a objc_exception_throw + 48
    2   Foundation                          0x00007fffb55af28f -[NSConnection sendInvocation:internal:] + 4004
    3   CoreFoundation                      0x00007fffb3b19db8 ___forwarding___ + 536
    4   CoreFoundation                      0x00007fffb3b19b18 _CF_forwarding_prep_0 + 120
    5   MFCore                              0x0000000103a8ab97 mfsecGetFilesystemForToken + 94
    6   new_sshfs_askpass                   0x0000000103a7421f main + 303
    7   libdyld.dylib                       0x00007fffc8bef255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I thought this was a problem in my machine, but after restarting, I can't seem to be able to fix this problem.

Everything seems to be working just fine with the current pre-release though. Not sure what's going on.


To test this branch, I uninstalled fuse, then re-installed fuse and made sure that I didn't add the compatibility layer. After noticing this error, I uninstalled fuse, reinstalled with the compatibility layer, ran the old version (i.e. the pre-release) and everything works fine.

tessus commented 8 years ago

I've just tested it on my machine again and it works perfectly.

screen_shot_2016-10-24_at_12_05_54

screen shot 2016-10-24 at 12 06 04 screen shot 2016-10-24 at 12 06 12
(SSHServerFS, test, 2016-10-24, 12:11) Mounting
(MFClient, test, 2016-10-24, 12:11) Note status changed for fs <MFClientFS: 0x6000000e3280> (test) to Waiting to Mount
(SSHServerFS, test, 2016-10-24, 12:11) Task launched OK
(MFClient, test, 2016-10-24, 12:11) Note status changed for fs <MFClientFS: 0x6000000e3280> (test) to Mounted
tessus commented 8 years ago

@ElDeveloper can you please try my binary?

https://evermeet.cx/pub/macosx/macfusion/Macfusion.app.tar.gz

ElDeveloper commented 8 years ago

@tessus, just for the record I tried the binary and I still saw the same error. It's rather odd, the interface will appear as if it had "mounted" i.e. the icon goes green, and then it immediately goes gray. The error shows up in the log viewer. Note that this time I didn't remove the compatibility layer, so I suspect it has to do something with some of the other changes going on here (not sure what would that be though).

Maybe someone else reading this can try this out in their system?

tessus commented 8 years ago

My icon goes green and stays green. Maybe there's a problem with the server. The error message you are receiving is still strange: [NOTE: this exception originated in the server.]. Why would you get this message with one binary, but not with the other.

Is there any chance you can use the sshfs-static binary from the command line (without Macfusion at all) and log all issues? Maybe we can narrow it down this way.

If anybody else would like to try it, please go ahead. I have a compiled Macfusion binary as well.

tessus commented 8 years ago

I've noticed bizarre dependencies in the project and got rid of them. Here are 2 new binaries to test: https://evermeet.cx/pub/macosx/macfusion/Macfusion.app.b2-dyn.tar.gz https://evermeet.cx/pub/macosx/macfusion/Macfusion.app.b3-sta.tar.gz

I'm wondering, if either one fixes your crash.

ElDeveloper commented 8 years ago

@tessus, thanks for posting these. Both of them are still failing for me with the same error.

tessus commented 8 years ago

This is interesting. They actually worked for @fsigworth in #27

But I have noticed some other troubling issues that have to do with sshfs. Its behavior has changed (since the one that is bundled is several years old) and I have found a bug in fuse_unmount. Unless we fix these issues first it makes no sense to continue with this project at all. We can't rely on a bundled binary that is years old and has a dependency on something that will soon be obsolete. Let's discuss this offline.

ElDeveloper commented 8 years ago

Sounds good! I am wondering if it's something to do with my computer, haven't really had a chance to test in someone else's machine.

166MMX commented 7 years ago

Please bare with me if I am telling you guys nothing new. But just want to make sure you are not being confused by the IPC.

@ElDeveloper did you make sure that you were not mixing MacFusion versions? I mean that you are trying to use a new_sshfs_askpass of @tessus in combination of an already running MacFusion agent build by your software? the message [NOTE: this exception originated in the server.] is generated by the IPC NSconnection Framework. It tells you to look at the Agent process and investigate the logs on the agent side.

This is my current guess. Please bare with me if you already thought of that. just wanted to make sure you guys have it on your radar.

ElDeveloper commented 7 years ago

Good idea, @166MMX I did check that a while ago, and just tried again. Doesn't seem to be working eitherway. I would be happy to merge this if someone else can confirm this is working for them. I know my computer is a bit flaky these days, so it could very well be something about my machine.


Just in case someone can spot something immediately wrong with what I'm doing, these are the steps I just tried:

Pull down the latest branch:

Go to System Preferences and uninstall Fuse for macOS:

# installed version 3.5.2
# update available 3.5.4

Go to the Fuse for macOS website, download and install version 3.5.4, do not check macfuse compatibility layer.

Go to Xcode, clean and build the target.

87 warnings

macfusion agent process not started ...

Create and mount filesystem:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[NOTE: this exception originated in the server.]
No tokens available, internal inconsistency, please restart your machine and try again'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fffbe6120db __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffd32a4a2a objc_exception_throw + 48
    2   Foundation                          0x00007fffc0030c2f -[NSConnection sendInvocation:internal:] + 4004
    3   CoreFoundation                      0x00007fffbe585098 ___forwarding___ + 536
    4   CoreFoundation                      0x00007fffbe584df8 _CF_forwarding_prep_0 + 120
    5   MFCore                              0x00000001041f2b97 mfsecGetFilesystemForToken + 94
    6   new_sshfs_askpass                   0x00000001041d721f main + 303
    7   libdyld.dylib                       0x00007fffd3b86255 start + 1
    8   ???                                 0x0000000000000002 0x0 + 2
)

I checked with sshfs that I could mount the filesystem and with the current version of MacFusion that I could still mount the filesystem.

ElDeveloper commented 6 years ago

Thanks @tessus for putting this together and @wcgall for confirming things are working!