ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

Profit -/+% display seems static. #113

Closed jangrewe closed 7 years ago

jangrewe commented 7 years ago

The current commit throws these errors when updating:

> tribeca@2.0.0 compile-server /opt/tribeca
> node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts

make: Entering directory '/opt/tribeca/build'
  CXX(target) Release/obj.target/tribeca/src/lib/tribeca.o
  CXX(target) Release/obj.target/tribeca/src/lib/round.o
  CXX(target) Release/obj.target/tribeca/src/lib/stdev.o
  SOLINK_MODULE(target) Release/obj.target/tribeca.node
  COPY Release/tribeca.node
make: Leaving directory '/opt/tribeca/build'
src/server/gateways/hitbtc.ts(151,5): error TS1128: Declaration or statement expected.

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "compile-server"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tribeca@2.0.0 compile-server: `node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tribeca@2.0.0 compile-server script 'node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tribeca package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tribeca
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tribeca
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jan/.npm/_logs/2017-05-31T07_46_05_630Z-debug.log

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tribeca@2.0.0 postinstall: `npm run compile-server && npm run compile-client && npm run compile-public && npm run compile-bundle`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tribeca@2.0.0 postinstall script 'npm run compile-server && npm run compile-client && npm run compile-public && npm run compile-bundle'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tribeca package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run compile-server && npm run compile-client && npm run compile-public && npm run compile-bundle
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tribeca
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tribeca
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jan/.npm/_logs/2017-05-31T07_46_05_660Z-debug.log

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "reinstall"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! tribeca@2.0.0 reinstall: `rm -rf app && git fetch && git merge FETCH_HEAD && npm install && npm run test && forever restartall`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the tribeca@2.0.0 reinstall script 'rm -rf app && git fetch && git merge FETCH_HEAD && npm install && npm run test && forever restartall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tribeca package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rm -rf app && git fetch && git merge FETCH_HEAD && npm install && npm run test && forever restartall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tribeca
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tribeca
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jan/.npm/_logs/2017-05-31T07_46_05_710Z-debug.log

The output of the first debug log is:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'compile-server' ]
2 info using npm@4.2.0
3 info using node@v7.10.0
4 verbose run-script [ 'precompile-server', 'compile-server', 'postcompile-server' ]
5 info lifecycle tribeca@2.0.0~precompile-server: tribeca@2.0.0
6 silly lifecycle tribeca@2.0.0~precompile-server: no script for precompile-server, continuing
7 info lifecycle tribeca@2.0.0~compile-server: tribeca@2.0.0
8 verbose lifecycle tribeca@2.0.0~compile-server: unsafe-perm in lifecycle true
9 verbose lifecycle tribeca@2.0.0~compile-server: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/opt/tribeca/node_modules/.bin:/usr/lib/node_modules/npm/bin/node-gyp-bin:/opt/tribeca/node_modules/.bin:/usr/lib/node_modules/npm/bin/node-gyp-bin:/opt/tribeca/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle tribeca@2.0.0~compile-server: CWD: /opt/tribeca
11 silly lifecycle tribeca@2.0.0~compile-server: Args: [ '-c',
11 silly lifecycle   'node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts' ]
12 silly lifecycle tribeca@2.0.0~compile-server: Returned: code: 2  signal: null
13 info lifecycle tribeca@2.0.0~compile-server: Failed to exec compile-server script
14 verbose stack Error: tribeca@2.0.0 compile-server: `node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid tribeca@2.0.0
16 verbose cwd /opt/tribeca
17 error Linux 4.9.0-2-amd64
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "compile-server"
19 error node v7.10.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 2
23 error tribeca@2.0.0 compile-server: `node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts`
23 error Exit status 2
24 error Failed at the tribeca@2.0.0 compile-server script 'node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the tribeca package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     node-gyp rebuild && tsc --alwaysStrict -t ES6 -m commonjs --outDir app src/server/*.ts src/server/*/*.ts src/share/*.ts
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs tribeca
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls tribeca
24 error There is likely additional logging output above.
25 verbose exit [ 2, true ]
jangrewe commented 7 years ago

It seems to be caused by something in commit b54c99d6518e0466a32f07ab3b25c93857ebbead (merge upstream), as the previous commit compiles fine.

ctubio commented 7 years ago

many thanks for the report, will fix soOn'

jangrewe commented 7 years ago

Thanks! The profit also seems to be broken again, i only get a static "+1.00%, +3.00%" shown.

jangrewe commented 7 years ago

Thanks @ctubio, it compiles fine now - but i still only get a static profit percentage shown. This must be a regression, as it was working "yesterday".

ctubio commented 7 years ago

for me the profit -/+% is working fine, im not sure how to reproduce what you are experiencing with this display, did you restarted the app appart from recompile latest modifications? (im sorry i cant imagine any other cause right now :sob:)

jangrewe commented 7 years ago

Yes, i did explicitly restart it and did Shift+Reload to clear the cache, to make sure it's not a typical user mistake.

Here's what the status widget looks like for me: https://pageshot.net/RXhUFJFYqfgXeqDT/192.168.0.1

ctubio commented 7 years ago

let me reinvestigate it this afternoon, but im a bit lost about how to reproduce your situaiton currently

many thanks for the img, i already downloaded it, feel free to remove it in case you want

ctubio commented 7 years ago

let me reinvestigate it this afternoon, but im a bit lost about how to reproduce your situaiton currently

many thanks for the img, i already downloaded it, feel free to remove it in case you want

jangrewe commented 7 years ago

Thanks, and good luck. I was really happy to see the profit display, so i'm hoping you're able to figure out what's wrong. =)

ctubio commented 7 years ago

is also strange that over the values you have simply the syymbol ":" instead it should say "BTC:" and "EUR:", not only ":"

can you maybe copy here the CSV exported from http://supportdetails.com? thanks''

jangrewe commented 7 years ago

Sure, here's the data:

Operating System: Windows Windows NT 10.0
Screen Resolution: 2560 x 1440
Web Browser: Chrome 58.0.3029.110
Browser Size: 2560 x 1335
IP Address: 87.128.111.190
Color Depth: 24
Javascript: Yes
Flash Version: Not Installed
Cookies: Yes
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/58.0.3029.110
Safari/537.36

Please be aware that it did work for some time. Your first commit to add this showed the same as i'm seeing now, some later commit made it work as expected, and now it's broken again.

jangrewe commented 7 years ago

Looks like this was caused by an abandoned instance of Tribeca. I can't explain why this would break it, but after killing all processes manually and starting one again, it's working now.