Closed happybeing closed 5 years ago
Monkey see; monkey do.. not understanding all that but following the steps, getting a different output that looks alive.
$ git push origin master
Counting objects: 571, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (161/161), done.
Writing objects: 100% (571/571), 296.07 KiB | 0 bytes/s, done.
Total 571 (delta 408), reused 571 (delta 408)
To /home/safe/SAFE/_public/tests/data1/blah
* [new branch] master -> master
Referee? "No foul" ?no bug
Very interesting, thanks this could be useful.
What OS / version and git version are you using. The messages ('Counting objects') and the numbers in your output are quite different, so maybe a different build of git.
Did you follow the instructions exactly - commands, environment variables etc? Just wondering about any explanations for the discrepancies in the output you have.
I really appreciate you diving in here David, thanks 😄
This bug is still live - David's report was without SAFE Drive and created a repo on his local drive.
Closing in favour of issue #10 in new SAFE Drive repo as this repo is no longer in use.
The bug here is probably in SafenetworkJS, but SAFE Drive is needed to investigate and fix it, so filing here.
To reproduce you need to be set up for development on SAFE Network using SAFE Browser.
OS Ubuntu 18.10 SAFE Browser 11.1 git 2.19.1 safenetwork-fuse master branch safenetworkjs master branch
To reproduce the error:
1) Make a copy of the safenetworkjs git repository in
sjs.git
just for testing:2) Start SAFE Browser (v11.1 or later) dev build and create / sign into an account:
3) Start SAFE Drive with
NODE_ENV=test
to select mock SAFE Network,SAFENETWORKJS_TESTS=testing
to create a test container, andDEBUG=
to generate console debug output, and 'Accept' any auth requests in the browser. For example:Note:
--inspect-brk
(or--inspect
) enables you to connect with the Chromium/Chrome debugger by visitingchrome://inspect/#devices
and clicking 'Open dedicated DevTools for Node'.For details of how to setup your debug environment, see Development in the README.
4) Check your SAFE Drive is ready:
5) Initialise a bare headless git repo in the test container, exactly as follows:
6) Inside
sjs.git
execute the following commands in order:The
git push
output should be similar to this:The message
remote: fatal: premature end of pack file, 65 bytes missing
occurs because inside git (built from source code), while git is parsing the 'pack' filexpread()
ingit/index-pack.c / unpack_data()
, prematurely returns zero bytes. Examining the SAFE Drive console output appears to show no errors, and that the last readFile() returned data as expected. So it isn't clear if the cause of problem is in SafenetworkJs, fuse-bindings or git.Note: the above error can be avoided by setting a breakpoint in
safenetworkjs/src/nfs-files.js
openFile()
in theelse
block ("// Handle failure to open file", about here). Just hitting the breakpoint and restarting execution avoids this error, although a different error occurs soon afterwards. The second failure is a different error, so the effect of pausing at the breakpoint for a few seconds may be a clue to the first error above.Here's what the output looks like if you set the breakpoint, and restart immediately: