happybeing / safenetwork-fuse

SAFE Drive: access SAFE storage using the file system of Windows, Mac OS and Linux
GNU General Public License v3.0
12 stars 5 forks source link

hangs when using the GUI “Files" to try to browse the mounted SAFE drive #4

Closed happybeing closed 5 years ago

happybeing commented 6 years ago

Reported by tmark on dev forum here.

OS: Ubuntu 18.4.1

happybeing commented 6 years ago

This might be due to the Ubuntu file manager causing FUSE to call operations which are not yet supported (e.g. statfs).

Needs replicating and the above cause confirming.

JPL1 commented 6 years ago

I'm also getting this in Debian 9.

On trying to open ~/SAFE from with a file manager (eg Thunar), or trying to open a file in the mounted FS with another application from the command line application (eg firefox index.html) the terminal used to launch mount-safe shows the following message and all terminals become unresponsive to the ls command. I think this must be some sort of service crash because it affects various other applications too, necessitating a PC reboot.

node:1642) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'gt' of undefined
    at module.exports.statfs.safeVfs.getHandler.statfs.then (/snapshot/safenetwork-fuse-v0.1.0/src/fuse-operations/statfs.js:0:0)
    at <anonymous>
(node:1642) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 19)
(node:1642) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
JPL1 commented 6 years ago

Also on closing everything down and running ls -l ~ the SAFE directory properties are d??? ??? ??? and trying to access it throws an error about no transport being available

JPL1 commented 6 years ago

Also on closing everything down and running ls -l ~ the SAFE directory properties are d??? ??? ??? and trying to access it throws an error 'transport endpoint not connected'

JPL1 commented 6 years ago

Also on closing everything down and running ls -l ~ the SAFE directory properties are d??? ??? ??? and trying to access it throws an error 'transport endpoint not connected'

JPL1 commented 6 years ago

Hmm. I just tried this again from the terminal and I'm able to open a SAFE location using Thunar and files using firefox and mousepad, but closing Thunar (file manager) caused it to crash with the error above. Not sure what I did differently this time.

happybeing commented 6 years ago

Thanks for the reports John. I have an idea what causes this but haven't looked into it yet.

I think this must be some sort of service crash because it affects various other applications too, necessitating a PC reboot.

I have found the following very reliable in recovering after a hang avoiding the need to reboot:

pkill mount-safe ; sudo unmount ~/SAFE

happybeing commented 6 years ago

I'm making this a good first issue on the assumption it is due to the GUI invoking FUSE operations that are not yet supported by safenetwork-fuse. In that case, a first fix will be to review ./src/safe-vfs and make sure that any unimplemented fuse operations fail without causing the operation to 'hang'.

I think that would best be done by having a dummy implementation in ./src/safe-vfs for everything, which fails politely, and which will be replaced when the FUSE op is implemented.

happybeing commented 5 years ago

Believed fixed.