Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Cannot read property 'toLowerCase' of undefined #1173

Closed
discosultan opened this issue Oct 2, 2017 · 12 comments
Closed

Cannot read property 'toLowerCase' of undefined #1173

discosultan opened this issue Oct 2, 2017 · 12 comments

Comments

@discosultan
Copy link
Contributor

  • I'm submitting a ...
    [X] bug report

  • Action taken (what you did)

    • Install latest stable gekko (0.5.8)
    • Start using node gekko --ui
    • In web interface, start new paper trader with all default values
  • Expected result (what you hoped would happen)
    No errors in browser console

  • Actual result (unexpected outcome)
    The following error on receiving websocket messages:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at Oe.e.$emit (build.js:6)
    at a.s.onmessage (build.js:6)
    at HTMLDivElement.<anonymous> (reconnecting-websocket.min.js:2)
    at WebSocket.h.onmessage (reconnecting-websocket.min.js:2)
@julesGoullee
Copy link
Contributor

Check yoyr config file specialy backtest fees config with the sample example

@askmike
Copy link
Owner

askmike commented Oct 2, 2017

dup of #1090. And yes, I think @julesGoullee is right here.

@adipascu
Copy link

I am also facing this issue when adding a market watcher.
I noticed that on the browser receives this message over WebSockets:

{"gekko_id":"945885678687925","gekko_mode":"realtime","gekko_type":"watcher","emitter":"gekko","updates":{}}

It is missing the type prop, this is causing a crash in ws.js at line 61 .

@ndr
Copy link

ndr commented Nov 22, 2017

@adipascu @askmike
@adipascu is right. In [https://github.com/askmike/gekko/blob/stable/web/vue/assets/reconnecting-websocket.min.js]
this part - "k.addEventListener("message",function(a){g.onmessage(a)})"
a.data doesn't have "type" property. I have added some code to add no-gekko equivalent properties to "a.data", and after I changed the file there are no errors in console, but I am not sure If it is works fine or I have fixed only errors in console and "g.onmessage" function is waiting for another data. There is modified code:

k.addEventListener("message",function(a){ try { var newData = a.data; var newDataObj = JSON.parse(newData); var extendObj = {}; Object.keys(newDataObj).forEach(function (key) { extendObj[key.replace(/^gekko_/,'')] = newDataObj[key]; }); Object.assign(newDataObj, extendObj); a.data = JSON.stringify(newDataObj); } catch (err) {} g.onmessage(a) })

@thomaskoren
Copy link

having the same issue with latest version on stable branch (v0.5.11).

#1090 was closed because it couldn't be reproduced, so please try this:

  • build a docker image and start with a fresh copy of sample-config.js
  • the error occurs in the UI console when trying to start a market watcher (tested bitstamp, kraken and poloniex) for EUR-BTC.

There are no immediate error messages in the server log, but after about 5 minutes I saw 3 messages saying:
ERROR: Failed to tick in time, see https://github.com/askmike/gekko/issues/514 for details
this may be unrelated but since 3 matches the number of my attempts to start market watchers, it might be worth looking into. of course the system was not hibernating as suggested by #514

let me know if you need any more information.

@askmike
Copy link
Owner

askmike commented Jan 16, 2018

This is fixed since #1705.

@askmike askmike closed this as completed Jan 16, 2018
@christhecanadien
Copy link

Have downloaded the lastest stable version 2 days ago to trade with Binance
I ran the bot live and I have the same issue:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at Oe.e.$emit (build.js:6)
at a.s.onmessage (build.js:6)
at HTMLDivElement. (reconnecting-websocket.min.js:2)
at WebSocket.h.onmessage (reconnecting-websocket.min.js:2)

It gets few candles and stop with an Error message

capture d ecran 2018-01-19 a 12 09 50

Pleaaaaaase HELP !

@askmike
Copy link
Owner

askmike commented Jan 19, 2018

@christhecanadien please download the latest version on the develop branch here: https://github.com/askmike/gekko

I will push out a new release soon.

@nazab
Copy link

nazab commented Jan 19, 2018

I can tell that it works with binance I run it LIVE now .

@christhecanadien
Copy link

@askmike I did download the latest dev branch as you recommand and I get this after few minutes:
UI:
capture d ecran 2018-01-19 a 13 00 21
Terminal:
capture d ecran 2018-01-19 a 13 03 16

I'm using a mac !!! (in case)

@nazab ... lucky you ! ;)

@askmike
Copy link
Owner

askmike commented Jan 19, 2018

@christhecanadien please upload the log file found inside the logs folder somewhere and link to it here.

@christhecanadien
Copy link

@askmike Here is a log of the Stable Gekko... I don't have any log for the Dev branch gekko !
2018-01-19-17-04-UTC-tradebot.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants