SAFE Drive - help with testing


#82

Thanks John. I think it is partly related to issues with the browser, which I don’t see because I always:

  • start the browser
  • login
  • then run DEBUG=safenetworkjs*,safe-fuse* node bin

Using DEBUG produces output to the terminal that will show what its doing, where it hangs etc. So maybe try this if you get a second wind and let me know what you see (also which version Peruse if you still have problems). See also the instructions on how to log the output to a file in case you need to do that.

Thanks again :slight_smile:


#83

The whole debug output file is rather long. I can post it somewhere if you like. This is the relevant section though I think. cd-ing into a SAFE folder _public/jpl/root-safe-blues and from there trying to copy a small text file hello2 into the same directory. Peruse 0.7.0.

Summary
unique: 342, success, outsize: 144
unique: 343, opcode: LOOKUP (1), nodeid: 10, insize: 56, pid: 6026
LOOKUP /_public/jpl/root-safe-blues
getattr /_public/jpl/root-safe-blues
  safe-fuse:ops getattr('/_public/jpl/root-safe-blues') +0ms
  safe-fuse:vfs-cache VfsCacheMap.getattr(/_public/jpl/root-safe-blues) +0ms
   NODEID: 11
   unique: 343, success, outsize: 144
unique: 344, opcode: LOOKUP (1), nodeid: 11, insize: 47, pid: 6026
LOOKUP /_public/jpl/root-safe-blues/hello2
getattr /_public/jpl/root-safe-blues/hello2

  safe-fuse:ops getattr('/_public/jpl/root-safe-blues/hello2') +0ms
  safe-fuse:vfs-cache VfsCacheMap.getattr(/_public/jpl/root-safe-blues/hello2) +0ms
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues/hello2) +6s
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues) +0ms
  safe-fuse:vfs:index getHandler(/_public/jpl) +0ms
  safe-fuse:vfs:index getHandler(/_public) +0ms
  safe-fuse:vfs:root getHandlerFor(/_public) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +6s
  safe-fuse:vfs:root getHandlerFor(/_public/jpl) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues/hello2) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safenetworkjs:container PublicContainer.itemAttributesResultRef('jpl/root-safe-blues/hello2') +6s
  safenetworkjs:container PublicContainer.itemType('jpl/root-safe-blues/hello2') +0ms
  safenetworkjs:web getMutableDataValueVersion([object Object],_public/jpl/root-safe-blues/hello2)... +6s
  safenetworkjs:web -106: Core error: Routing client error -> Requested entry not found
  safenetworkjs:web     at module.exports (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_error.js:19:10)
  safenetworkjs:web     at args.push.ffi.Callback.restArgs (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_base.js:92:27)
  safenetworkjs:web     at /home/user/safe-fuse-test/safenetworkjs/node_modules/ffi/lib/callback.js:66:25 +70ms
  safenetworkjs:web getMutableDataValueVersion() WARNING no entry found for key '_public/jpl/root-safe-blues/hello2' +0ms
  safenetworkjs:container PublicContainer._getShortestEnclosingKey('jpl/root-safe-blues/hello2/') +70ms
  safenetworkjs:container Matching path:  _public/jpl/root-safe-blues/hello2/ +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b4031f10 5f 70 75 62 6c 69 63 2f 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 2d 62 6c 75 65 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91688 0b 10 af 57 0d f9 77 6a 2b 98 4e 6a aa 9c e8 78 c6 ef 51 ee 2e ac 16 9b 00 1c 14 90 6a 84 f1 1a>,
  safenetworkjs:container        version: 0 } } ] +95ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +1ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container Matching against:  _public/jpl/root-safe-blues/hello2/ +0ms
  safenetworkjs:container MATCH RESULT:  <no match> +0ms
  safenetworkjs:container PublicContainer.callFunctionOnItem(jpl/root-safe-blues/hello2, itemType, p2, p3, p4, p5) +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b40321f0 5f 70 75 62 6c 69 63 2f 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 2d 62 6c 75 65 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d916e8 0b 10 af 57 0d f9 77 6a 2b 98 4e 6a aa 9c e8 78 c6 ef 51 ee 2e ac 16 9b 00 1c 14 90 6a 84 f1 1a>,
  safenetworkjs:container        version: 0 } } ] +95ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +1ms
  safenetworkjs:container Value (encrypted):  
�wj+�Nj���x��Q�.�#�##�j��# +1ms################�W
  safenetworkjs:container Value            : 
wj+Nj踆.# +0ms###############################W
  safenetworkjs:container Version:  0 +0ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container Match Key      :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container PublicContainer._getContainerForKey('_public/jpl/root-safe-blues') +0ms
  safenetworkjs:container NfsContainer.itemType('hello2') +0ms
  safenetworkjs:file NfsContainerFiles._fetchFileState('hello2', +6s)
  safenetworkjs:file no entry found for: hello2 +83ms
  safenetworkjs:web getMutableDataValueVersion([object Object],hello2)... +276ms
  safenetworkjs:web -106: Core error: Routing client error -> Requested entry not found
  safenetworkjs:web     at module.exports (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_error.js:19:10)
  safenetworkjs:web     at args.push.ffi.Callback.restArgs (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_base.js:92:27)
  safenetworkjs:web     at /home/user/safe-fuse-test/safenetworkjs/node_modules/ffi/lib/callback.js:66:25 +86ms
  safenetworkjs:web getMutableDataValueVersion() WARNING no entry found for key 'hello2' +0ms
  safenetworkjs:container NfsContainer._getShortestEnclosingKey('hello2/') +169ms
  safenetworkjs:container Matching path:  hello2/ +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b4031400 53 61 66 65 2d 61 75 74 68 2d 6c 6f 67 2d 30 31 30 39 31 37 2e 74 78 74>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91798 9f 21 01 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 30 2e 34 30 31 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b40314a0 53 61 66 65 2d 62 72 6f 73 77 65 72 2d 6c 6f 67 2d 30 31 30 39 31 37 2e 74 78 74>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91810 f4 15 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 31 2e 33 30 37 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4031550 5f 6d 65 74 61 64 61 74 61>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91888 01 2f 00 00 00 00 00 00 00 53 65 72 76 69 63 65 20 52 6f 6f 74 20 44 69 72 65 63 74 6f 72 79 20 66 6f 72 3a 20 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4031600 62 6c 75 65 73 2e 6d 70 33>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91908 80 3e 0b 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 32 2e 32 36 31 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b40316a0 62 6c 75 65 73 32 2e 6d 70 33>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91980 00 a7 0a 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 35 2e 35 34 37 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4031740 63 73 73 2f 62 67 31 2e 6a 70 67>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d919f8 83 02 01 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 38 2e 34 31 34 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b40317e0 63 73 73 2f 73 74 79 6c 65 31 2e 63 73 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91a70 30 04 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 39 2e 34 31 35 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4031880 66 61 76 69 63 6f 6e 2e 69 63 6f>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91ae8 be 10 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 31 30 2e 30 33 32 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4031920 69 6e 64 65 78 2e 68 74 6d 6c>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91b60 23 03 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 31 30 2e 38 31 35 5a 1b 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } } ] +94ms
  safenetworkjs:container Key            :  Safe-auth-log-010917.txt +4ms
  safenetworkjs:container Key            :  Safe-broswer-log-010917.txt +0ms
  safenetworkjs:container Key            :  _metadata +0ms
  safenetworkjs:container Key            :  blues.mp3 +0ms
  safenetworkjs:container Key            :  blues2.mp3 +0ms
  safenetworkjs:container Key            :  css/bg1.jpg +0ms
  safenetworkjs:container Key            :  css/style1.css +0ms
  safenetworkjs:container Key            :  favicon.ico +0ms
  safenetworkjs:container Key            :  index.html +0ms
  safenetworkjs:container Key            :  Safe-auth-log-010917.txt +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  Safe-broswer-log-010917.txt +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  _metadata +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  blues.mp3 +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  blues2.mp3 +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  css/bg1.jpg +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  css/style1.css +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  favicon.ico +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  index.html +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container MATCH RESULT:  <no match> +0ms
  safenetworkjs:container hello2 is type:  not-found +0ms
  safenetworkjs:container loop result-2: 'not-found' +0ms
  safenetworkjs:container Object.call returning result: 'not-found' +0ms
  safenetworkjs:container itemType(jpl/root-safe-blues/hello2) returning:  not-found +0ms
  safenetworkjs:container PublicContainer._clearResultForPath(jpl/root-safe-blues/hello2) +0ms
  safe-fuse:vfs-cache getattr('/_public/jpl/root-safe-blues/hello2') result type: not-found reply(Fuse.ENOENT) +530ms
   unique: 344, error: -2 (No such file or directory), outsize: 16
unique: 345, opcode: LOOKUP (1), nodeid: 11, insize: 47, pid: 6026
LOOKUP /_public/jpl/root-safe-blues/hello2
getattr /_public/jpl/root-safe-blues/hello2
  safe-fuse:ops getattr('/_public/jpl/root-safe-blues/hello2') +531ms
  safe-fuse:vfs-cache VfsCacheMap.getattr(/_public/jpl/root-safe-blues/hello2) +1ms
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues/hello2) +531ms
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues) +0ms
  safe-fuse:vfs:index getHandler(/_public/jpl) +0ms
  safe-fuse:vfs:index getHandler(/_public) +0ms
  safe-fuse:vfs:root getHandlerFor(/_public) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +531ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues/hello2) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safenetworkjs:container PublicContainer.itemAttributesResultRef('jpl/root-safe-blues/hello2') +1ms
  safenetworkjs:container PublicContainer.itemType('jpl/root-safe-blues/hello2') +0ms
  safenetworkjs:web getMutableDataValueVersion([object Object],_public/jpl/root-safe-blues/hello2)... +99ms
  safenetworkjs:web -106: Core error: Routing client error -> Requested entry not found
  safenetworkjs:web     at module.exports (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_error.js:19:10)
  safenetworkjs:web     at args.push.ffi.Callback.restArgs (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_base.js:92:27)
  safenetworkjs:web     at /home/user/safe-fuse-test/safenetworkjs/node_modules/ffi/lib/callback.js:66:25 +67ms
  safenetworkjs:web getMutableDataValueVersion() WARNING no entry found for key '_public/jpl/root-safe-blues/hello2' +0ms
  safenetworkjs:container PublicContainer._getShortestEnclosingKey('jpl/root-safe-blues/hello2/') +67ms
  safenetworkjs:container Matching path:  _public/jpl/root-safe-blues/hello2/ +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b40324d0 5f 70 75 62 6c 69 63 2f 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 2d 62 6c 75 65 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91d78 0b 10 af 57 0d f9 77 6a 2b 98 4e 6a aa 9c e8 78 c6 ef 51 ee 2e ac 16 9b 00 1c 14 90 6a 84 f1 1a>,
  safenetworkjs:container        version: 0 } } ] +98ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +1ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container Matching against:  _public/jpl/root-safe-blues/hello2/ +0ms
  safenetworkjs:container MATCH RESULT:  <no match> +0ms
  safenetworkjs:container PublicContainer.callFunctionOnItem(jpl/root-safe-blues/hello2, itemType, p2, p3, p4, p5) +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b40327b0 5f 70 75 62 6c 69 63 2f 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 2d 62 6c 75 65 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91dd8 0b 10 af 57 0d f9 77 6a 2b 98 4e 6a aa 9c e8 78 c6 ef 51 ee 2e ac 16 9b 00 1c 14 90 6a 84 f1 1a>,
  safenetworkjs:container        version: 0 } } ] +99ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container Value (encrypted):  
�wj+�Nj���x��Q�.�#�##�j��# +1ms################�W
  safenetworkjs:container Value            : 
wj+Nj踆.# +0ms###############################W
  safenetworkjs:container Version:  0 +0ms
  safenetworkjs:container Key            :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container Match Key      :  _public/jpl/root-safe-blues +0ms
  safenetworkjs:container PublicContainer._getContainerForKey('_public/jpl/root-safe-blues') +0ms
  safenetworkjs:container NfsContainer.itemType('hello2') +0ms
  safenetworkjs:file NfsContainerFiles._fetchFileState('hello2', +451ms)
  safenetworkjs:file no entry found for: hello2 +56ms
  safenetworkjs:web getMutableDataValueVersion([object Object],hello2)... +255ms
  safenetworkjs:web -106: Core error: Routing client error -> Requested entry not found
  safenetworkjs:web     at module.exports (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_error.js:19:10)
  safenetworkjs:web     at args.push.ffi.Callback.restArgs (/home/user/safe-fuse-test/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/_base.js:92:27)
  safenetworkjs:web     at /home/user/safe-fuse-test/safenetworkjs/node_modules/ffi/lib/callback.js:66:25 +51ms
  safenetworkjs:web getMutableDataValueVersion() WARNING no entry found for key 'hello2' +0ms
  safenetworkjs:container NfsContainer._getShortestEnclosingKey('hello2/') +107ms
  safenetworkjs:container Matching path:  hello2/ +0ms
  safenetworkjs:container entriesList: [ { key: <Buffer@0x7f58b40319f0 53 61 66 65 2d 61 75 74 68 2d 6c 6f 67 2d 30 31 30 39 31 37 2e 74 78 74>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91e88 9f 21 01 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 30 2e 34 30 31 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4014ac0 53 61 66 65 2d 62 72 6f 73 77 65 72 2d 6c 6f 67 2d 30 31 30 39 31 37 2e 74 78 74>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91f00 f4 15 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 31 2e 33 30 37 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b402d690 5f 6d 65 74 61 64 61 74 61>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91f78 01 2f 00 00 00 00 00 00 00 53 65 72 76 69 63 65 20 52 6f 6f 74 20 44 69 72 65 63 74 6f 72 79 20 66 6f 72 3a 20 6a 70 6c 2f 72 6f 6f 74 2d 73 61 66 65 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b401c410 62 6c 75 65 73 2e 6d 70 33>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d91ff8 80 3e 0b 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 32 2e 32 36 31 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b401c430 62 6c 75 65 73 32 2e 6d 70 33>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d92070 00 a7 0a 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 35 2e 35 34 37 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b402fd00 63 73 73 2f 62 67 31 2e 6a 70 67>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d920e8 83 02 01 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 38 2e 34 31 34 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b402fda0 63 73 73 2f 73 74 79 6c 65 31 2e 63 73 73>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d92160 30 04 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 30 39 2e 34 31 35 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b402fe40 66 61 76 69 63 6f 6e 2e 69 63 6f>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d921d8 be 10 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 31 30 2e 30 33 32 5a 1e 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } },
  safenetworkjs:container   { key: <Buffer@0x7f58b4000fe0 69 6e 64 65 78 2e 68 74 6d 6c>,
  safenetworkjs:container     value: 
  safenetworkjs:container      { buf: <Buffer@0x2d92250 23 03 00 00 00 00 00 00 18 00 00 00 00 00 00 00 32 30 31 38 2d 30 39 2d 31 34 54 32 33 3a 34 32 3a 31 30 2e 38 31 35 5a 1b 00 00 00 00 00 00 00 32 30 ... >,
  safenetworkjs:container        version: 0 } } ] +54ms
  safenetworkjs:container Key            :  Safe-auth-log-010917.txt +3ms
  safenetworkjs:container Key            :  Safe-broswer-log-010917.txt +0ms
  safenetworkjs:container Key            :  _metadata +0ms
  safenetworkjs:container Key            :  blues.mp3 +0ms
  safenetworkjs:container Key            :  blues2.mp3 +0ms
  safenetworkjs:container Key            :  css/bg1.jpg +0ms
  safenetworkjs:container Key            :  css/style1.css +0ms
  safenetworkjs:container Key            :  favicon.ico +0ms
  safenetworkjs:container Key            :  index.html +0ms
  safenetworkjs:container Key            :  Safe-auth-log-010917.txt +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  Safe-broswer-log-010917.txt +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  _metadata +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  blues.mp3 +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  blues2.mp3 +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  css/bg1.jpg +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  css/style1.css +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  favicon.ico +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container Key            :  index.html +0ms
  safenetworkjs:container Matching against:  hello2/ +0ms
  safenetworkjs:container MATCH RESULT:  <no match> +0ms
  safenetworkjs:container hello2 is type:  not-found +0ms
  safenetworkjs:container loop result-2: 'not-found' +0ms
  safenetworkjs:container Object.call returning result: 'not-found' +1ms
  safenetworkjs:container itemType(jpl/root-safe-blues/hello2) returning:  not-found +0ms
  safenetworkjs:container PublicContainer._clearResultForPath(jpl/root-safe-blues/hello2) +0ms
  safe-fuse:vfs-cache getattr('/_public/jpl/root-safe-blues/hello2') result type: not-found reply(Fuse.ENOENT) +431ms
   unique: 345, error: -2 (No such file or directory), outsize: 16
unique: 346, opcode: CREATE (35), nodeid: 11, insize: 63, pid: 6026
create flags: 0x80c1 /_public/jpl/root-safe-blues/hello2 0100644 umask=0022
  safe-fuse:ops create('/_public/jpl/root-safe-blues/hello2', 33188) +0ms
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues/hello2) +431ms
  safe-fuse:vfs:index getHandler(/_public/jpl/root-safe-blues) +0ms
  safe-fuse:vfs:index getHandler(/_public/jpl) +0ms
  safe-fuse:vfs:index getHandler(/_public) +0ms
  safe-fuse:vfs:root getHandlerFor(/_public) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +431ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root getHandlerFor(/_public/jpl/root-safe-blues/hello2) - containerRef: { safePath: '_public', safeUri: undefined }, mountPath: /_public +0ms
  safe-fuse:vfs:root RootHandler for { safePath: '_public', safeUri: undefined } mounted at /_public create('/_public/jpl/root-safe-blues/hello2') +0ms
(node:5766) UnhandledPromiseRejectionWarning: TypeError: this.getContainer(...).createFile is not a function
    at RootHandler.create (/home/user/safe-fuse-test/safenetwork-fuse/src/safe-vfs/root.js:351:40)
    at create (/home/user/safe-fuse-test/safenetwork-fuse/src/fuse-operations/create.js:10:38)
(node:5766) 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: 2)
(node:5766) [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.

#84

I’m also sort of in standby a bit, waiting for the worst to be over. :slight_smile: I’ll do some testing once things are more stable. Please consider a PPA for testing stuff on a Ubuntu base.


#85

Thanks John, looks like I might have broken something with recent changes so I’ll see if I can replicate this and let you know. This is the purpose of testing and it is very helpful.


#86

I don’t even know what that means! :slight_smile:

If anyone would like to assist with that, or create an issue requesting it with more details (what, why etc) , that would be great.


#87

Oh, I meant a Personal Package Archive (PPA) as described here:
https://help.launchpad.net/Packaging/PPA
It would just mean everybody who puts the PPA in their sources.list would always get the latest packages and dependencies installed automatically. I guess it’s a bit like AUR for Arch. I wish all SAFE stuff could be packaged like that. Just sudo apt-get … and there you go testing the latest stuff.


#88

Ah, thanks for explaining.

Indeed, but the reason it isn’t is the work that involves. I haven’t tried to do this yet so step 1 is days researching and trying things out, then implementing properly, which I suspect is tricky to get right, and then of course more test and maintenance in the release process.

So it is great for users, but for one person projects quite a big ask.

If I had time my first priority would be to put together some regression tests to catch things like the above which it looks like John has found, but… time.

Also go though all the comments documentation I’ve written that is now out of date, or need fixing for JSDocs, better explanations etc

But there are also vital features that need writing, lots of bugs to flush out and fix and so on.

So don’t hold your breath :wink:


#89

I’ve never managed a PPA but I can imagine it requires some work. It’s probably too much to ask of a one person project, but maybe Maidsafe as a company could look into this. Easier testing would mean more testers and more bugs discovered. Also, the whole back and forth about whether somebody is using the right dependencies or the latest packages when testing could always be answered by a simple: Have you done apt-get update? Just a thought.


#90

Having thought a little more myself :slight_smile: I’m not sure PPA helps SAFE Drive much with this because for end users I’m already shipping a packaged executable to avoid the need for checking node version etc. It would though help with dependencies, but you then have to package for each different OS (and John is not on Ubuntu).

It is worth nothing that whatever packaging method is used, we still have to do this testing - exactly what John has been helping with and which revealed I wasn’t including debug for Safenetworkjs. That’s what gets us to the stage where we can put out a built package.


#91

I did a little research on how to implement regression tests for SAFE Drive and created an issue with some pointers. I found a package called BATS that looks like it will help a lot. I haven’t evaluated it, but it looks like a good place to start.

If anyone fancies a go at this, reply to the issue to let us know you’re picking it up.

The good thing about writing tests for SAFE Drive is that they will also do a good job testing many features of safenetworkjs until that has its own API based regression tests, which isn’t likely to happen any time soon!


#92

I think you mean


#93

I have just fixed this (fingers crossed) and pushed the change so you can pick up the latest code and should find it now works much better. The issue you spotted could have affected a lot of functionality.

To get the change, in your safenetwork-fuse directory, you should just need to do: git pull

EDIT: …and the same in your safentworkjs directory!


#94

Applause for @JPL please :clap: :clap: :clap:, he’s helped me identify and fix three issues in the last week.

I’m a happy :rabbit:

And he’s offered to have a look at setting up regression tests which will be amazing! Other can help with this I expect, so let us know if you are willing. See: https://github.com/theWebalyst/safenetwork-fuse/issues/13


#95

Looking good so far …

lookin-good


#96

Works a treat - really quick too, considering it’s not optimised. A brief summary of my meanderings.
Copy a file hello2 to a pre-existing folder with files in. :white_check_mark:
cat hello2 to read file :white_check_mark:
firefox hello2 :white_check_mark:
ls to see contents of the directory :white_check_mark:
cat much longer file - very quick :white_check_mark:

Copy a 30kb image file to mounted SAFE drive: 3 seconds
200kb image - 5s
2MB image - 50s

Copying 4.4mb file from mounted SAFE drive to local drive: 7s

echo Hello world > ~/SAFE/_public/jpl/root-safe-blues/helloworld.html :white_check_mark:

Make a directory eg mkdir ~/SAFE/_public/jpl/root-www worked but can’t copy a file into it
cp hello2 SAFE/_public/jpl/root-www/hello2 :negative_squared_cross_mark: (I think this is kown and just not done yet)
error: cp: cannot create regular file 'SAFE/_public/jpl/root-www/hello2': No such file or directory
After trying that the new folder is no longer there ls SAFE/_public/jpl/ does not show the folder.

Observation: new folders created via Web Hosting Manager are not recognised on the mounted SAFE drive until they contain something

Automounting containers as per this post works a treat :white_check_mark:

Accessing the mounted SAFE drive via file manager (Thunar), Firefox, VLC, etc all work :white_check_mark:

Observation: all this tinkering only cost me 35 PUTs. Pretty sure it would have been more uploading files via Web Hosting Manager?

I think @happybeing’s cracked it you know. :tada::champagne:


#97

One thing I forgot. Running node bin starts Peruse but does not mount the SAFE drive. That requires issuing the command again from another console window.


#98

This is great @JPL, thanks yet again.

Not only for the very practical help. When I see other people explore and use stuff I’ve built or worked on it is one of the biggest rewards I get from making stuff, I expect other ‘makers’ will agree.

Correct. You can make directories fine, but they aren’t real until you copy a file into them (same for WHM). This is why you don’t see an empty directory created by WHM in SAFE Drive (or vice versa), until you copy a file to it. I imagine that won’t make sense to anyone who hasn’t delved into the API, which makes it very hard to help a user understand what’s going on here.

The above (create directory, copy file into it) would work in an existing container created by WHM, but I have not provided a way to make the containers using SAFE Drive yet.

_public is a container of containers, but doesn’t hold any files itself. So you need to create a container inside _public, and then you can save files to that. My thought was to create the file container automatically when you copy the first file into a new directory (for which there is not yet a container), but I’m not sure about that. I wonder what you and others think? I think it makes it really easy, but maybe too easy to create lots of containers without realising it.

The alternative would be to provide a separate command line utility to create a container, but I think that’s going to be too hard for users.

I have tried to keep PUTs and particularly GETs to a minimum, but I’m not sure whether there’s a real difference here - they do pretty much the same thing. Maybe somebody will do some comparisons.

Did you try mounting website containers (_webMounts/cat.ashi, _webMounts/heaven) , or automounting SAFE containers (_public, _publicNames), or both?

I tried git init --bare last night and it almost works - fails right at the end, so I can’t yet publish a repo this way, but anyone can now share files. Who will be first to share files over SAFE Network using SAFE Drive?

How about it? :slight_smile:


#99

Both!

What does git init --bare do? Are you trying to create a Git repo in SAFE?


#100

Yes, a bare repository works like a central repository - github without the fancy stuff, just git push/pull etc. So I could have a repo that I publish changes to and others could pull them. Its how people would use git before github, with a shared drive for example.

It falls over with file operations at certain points, and has helped me find and fix a few bugs along the way, but still not completing. So we may be a way off that working yet.


#101

Another bug? I tried copying a file into ~/SAFE/_webMounts/cat.ashi and it’s hanging (debug output below). How do you create the _webMounts container anyway?

Summary
  safe-fuse:ops wrote 1689 bytes +1ms
   write[1] 1689 bytes to 53248
   unique: 196, success, outsize: 24
unique: 197, opcode: FLUSH (25), nodeid: 13, insize: 64, pid: 6798
flush[1]
  safe-fuse:stub TODO: implement fuse operation: flush(/_webMounts/cat.ashi/tired-face.jpg, fd) 1 +2s
   unique: 197, success, outsize: 16
unique: 198, opcode: RELEASE (18), nodeid: 13, insize: 64, pid: 0
release[1] flags: 0x8001
  safe-fuse:ops release('/_webMounts/cat.ashi/tired-face.jpg', 1) +0ms
  safe-fuse:vfs:index getHandler(/_webMounts/cat.ashi/tired-face.jpg) +1ms
  safe-fuse:vfs:index getHandler(/_webMounts/cat.ashi) +0ms
  safe-fuse:vfs:root getHandlerFor(/_webMounts/cat.ashi) - containerRef: { safeUri: 'safe://cat.ashi' }, mountPath: /_webMounts/cat.ashi +1ms
  safe-fuse:vfs:root getHandlerFor(/_webMounts/cat.ashi/tired-face.jpg) - containerRef: { safeUri: 'safe://cat.ashi' }, mountPath: /_webMounts/cat.ashi +0ms
  safe-fuse:vfs:root RootHandler for { safeUri: 'safe://cat.ashi' } mounted at /_webMounts/cat.ashi close('/_webMounts/cat.ashi/tired-face.jpg') +0ms
  safenetworkjs:container NfsContainer.closeFile('tired-face.jpg', 1) +1ms
  safenetworkjs:container NfsContainer._clearResultForPath(tired-face.jpg) +0ms
  safenetworkjs:file NfsContainerFiles.closeFile('tired-face.jpg', 1) +0ms
  safenetworkjs:file doing insert('tired-face.jpg') +583ms
  safenetworkjs:cli fromUri(app, [object Object]) +3m
  safenetworkjs:cli ipcReceive(6685) +816ms
Server path not specified, so defaulting to ipc.config.socketRoot + ipc.config.appspace + ipc.config.id /tmp/app.6685
starting server on  /tmp/app.6685 
starting TLS server false
starting server as Unix || Windows Socket