binance-trading-bot icon indicating copy to clipboard operation
binance-trading-bot copied to clipboard

TypeError: Cannot read property 'filters' of undefined

Open rando128 opened this issue 2 years ago • 3 comments

Version

0.0.90

Description

The bot is raising TypeError: Cannot read property 'filters' of undefined errors every second and I can't log anymore in the GUI. Restarting the bot doesn't fix the issue. I've no clue what to do to recover my setup, beyond trying to backup/restore with latest PR.

To Reproduce

It seems to have happened after applying a global configuration on customised settings.

Additional context

Here are the logs after a restart:

> [email protected] migrate:up /srv
> migrate up --store=/srv/mongo-state-storage.js

WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
  migration : complete

> [email protected] start /srv
> node dist/server.js

WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
[2022-09-15T08:54:09.559Z] ERROR: binance-api/46 on 883a0055cdf0: ⚠ Execution failed. (version=0.0.90, gitHash=48865a0, server=cronjob, job=trailingTradeIndicator, uuid=14ae6f11-5d1d-47a2-b80d-92cf3c7eb56a, debug=true, saveLog=true)
    TypeError: Cannot read property 'filters' of undefined
        at getSymbolInfo (/srv/dist/server.js:1:72487)
        at async execute (/srv/dist/server.js:1:97358)
        at async /srv/dist/server.js:1:90356
        at async errorHandlerWrapper (/srv/dist/server.js:1:101469)
        at async execute (/srv/dist/server.js:1:89686)
        at async /srv/dist/server.js:1:136343
        at async CJ.<anonymous> (/srv/dist/server.js:1:136181)
[2022-09-15T08:54:16.364Z] ERROR: binance-api/46 on 883a0055cdf0: ⚠ Execution failed. (version=0.0.90, gitHash=48865a0, server=binance, helper=queue, jobName=trailingTrade, correlationId=beb3073d-7272-404c-b013-430a6ee6ce09, symbol=BTCDOWNUSDT, debug=true, saveLog=true)
    TypeError: Cannot read property 'filters' of undefined
        at getSymbolInfo (/srv/dist/server.js:1:72487)
        at async execute (/srv/dist/server.js:1:42427)
        at async /srv/dist/server.js:1:21183
        at async errorHandlerWrapper (/srv/dist/server.js:1:101469)
        at async execute (/srv/dist/server.js:1:19855)
[2022-09-15T08:54:16.650Z] ERROR: binance-api/46 on 883a0055cdf0: Unable to fully release the lock on resource "redlock:trailing-trade-symbols:TRXDOWNUSDT-symbol-info". (version=0.0.90, gitHash=48865a0)
    LockError: Unable to fully release the lock on resource "redlock:trailing-trade-symbols:TRXDOWNUSDT-symbol-info".
        at loop (/srv/node_modules/redlock/redlock.js:282:18)
        at /srv/node_modules/redlock/redlock.js:462:10
        at tryCatcher (/srv/node_modules/standard-as-callback/built/utils.js:12:23)
        at /srv/node_modules/standard-as-callback/built/index.js:22:53
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
[2022-09-15T08:54:17.055Z] ERROR: binance-api/46 on 883a0055cdf0: ⚠ Execution failed. (version=0.0.90, gitHash=48865a0, server=binance, helper=queue, jobName=trailingTrade, correlationId=ea036c7c-db11-4f48-9d51-9e76bfed2516, symbol=BNBUPUSDT, debug=true, saveLog=true)
    TypeError: Cannot read property 'filters' of undefined
        at getSymbolInfo (/srv/dist/server.js:1:72487)
        at async execute (/srv/dist/server.js:1:42427)
        at async /srv/dist/server.js:1:21183
        at async errorHandlerWrapper (/srv/dist/server.js:1:101469)
        at async execute (/srv/dist/server.js:1:19855)
[2022-09-15T08:54:17.360Z] ERROR: binance-api/46 on 883a0055cdf0: ⚠ Execution failed. (version=0.0.90, gitHash=48865a0, server=binance, helper=queue, jobName=trailingTrade, correlationId=88bdac52-67cb-4aa8-a8f8-8ce193ff6394, symbol=BNBDOWNUSDT, debug=true, saveLog=true)
    TypeError: Cannot read property 'filters' of undefined
        at getSymbolInfo (/srv/dist/server.js:1:72487)
        at async execute (/srv/dist/server.js:1:42427)
        at async /srv/dist/server.js:1:21183
        at async errorHandlerWrapper (/srv/dist/server.js:1:101469)
        at async execute (/srv/dist/server.js:1:19855)

rando128 avatar Sep 15 '22 09:09 rando128

At 08:32:53.042 UTC those messages started here as well. I get:

(09:21:20.035) Execution failed:
Job: Trailing Trade Indicator
Code: undefined
Message:
Cannot read property 'filters' of undefined
- Current API Usage: 40

Last config changes were done around 4 hours ago. There is a new message every 20-50 seconds.

Rayn0r avatar Sep 15 '22 09:09 Rayn0r

The message flooding seems to have ended. Last message was sent at 10:31:56.076 UTC.

Rayn0r avatar Sep 15 '22 11:09 Rayn0r

Indeed. I just started my instance again and everything seems alright. I'm curious to understand which external dependency (binance, tradingview,...) produced this temporary glitch.

rando128 avatar Sep 15 '22 13:09 rando128

Hello guys,

The latest version may help you to resolve these issues. Upgrade to latest version and try it. If no more issues, please close the issue :)

habibalkhabbaz avatar Oct 07 '22 09:10 habibalkhabbaz

Close the issue. Feel free to reopen if needed.

chrisleekr avatar Nov 30 '22 19:11 chrisleekr