Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show error when use wrong API key #544

Merged
merged 3 commits into from
Nov 30, 2022
Merged

Conversation

chrisleekr
Copy link
Owner

@chrisleekr chrisleekr commented Nov 30, 2022

Description

There have been several issues opened that the bot is stuck at loading. 99% of this issue is caused by using a wrong API key.

To provide more information, I've updated the front end to display an error message when the bot can't get account information.

Related Issue

#538

Motivation and Context

As description.

How Has This Been Tested?

Screenshots (if appropriate):

image

@chrisleekr chrisleekr added the enhancement New feature or request label Nov 30, 2022
@chrisleekr chrisleekr changed the title fix: show error when use wrong API key feat: show error when use wrong API key Nov 30, 2022
@chrisleekr chrisleekr linked an issue Nov 30, 2022 that may be closed by this pull request
@chrisleekr chrisleekr merged commit 577229d into master Nov 30, 2022
@rando128
Copy link
Contributor

rando128 commented Dec 3, 2022

@chrisleekr, did you test in dev mode?

Launching the bot for local development via docker-compose -f docker-compose.yml up -d --build leads to the APIError screen.

_.get(accountInfo, 'accountType') is undefined.

@chrisleekr
Copy link
Owner Author

@rando128
yeah? hm, let me check.

@chrisleekr
Copy link
Owner Author

Hm, @rando128 are you sure you configured the API key? can you check again?
I just tested with the master branch and seems fine.

@rando128
Copy link
Contributor

rando128 commented Dec 3, 2022

Yeah, that's weird. My .env has all the keys setup:

BINANCE_MODE=test

## Live
BINANCE_LIVE_API_KEY=...
BINANCE_LIVE_SECRET_KEY=...

## Test
BINANCE_TEST_API_KEY=...
BINANCE_TEST_SECRET_KEY=...

my docker-composer.yml has:

...
      target: dev-stage
...
      - BINANCE_MODE=test
...

I didn't change my setup, just pulled 0.094. And the APIError screen started to show up despite a functional environment.

If it works on your side and nobody is facing the same issue I have, I will simply hack my LockScreen.js.

@chrisleekr
Copy link
Owner Author

Yeah, I would assume you would have the correct configuration.
You might find a bug? Not sure. Let me know if you find anything.

@peweb
Copy link

peweb commented Dec 27, 2022

@rando128 @chrisleekr
My bot stopped working after updating to from 094 to 0.95
I didnt change env and my API keys cant expetive because they are attached to static IP.
I added BINANCE_MODE=live in the env file as well but it didnt help.

I double checked everything, generated new API keys but I still cant login to the bot interface and keep getting the new error screen - Failed to load your account information.

Can you please help me fix it?

Thanks!

My env file is

BINANCE_MODE=live
BINANCE_LIVE_API_KEY=yMo.....
BINANCE_LIVE_SECRET_KEY=p242w...

BINANCE_TEST_API_KEY=fXQdqeK4aDCDx....
BINANCE_TEST_SECRET_KEY=7ZVCKtgrItrc60u....

BINANCE_SLACK_ENABLED=false
BINANCE_LOCAL_TUNNEL_ENABLED=false

BINANCE_FEATURE_TOGGLE_NOTIFY_ORDER_CONFIRM=false
BINANCE_FEATURE_TOGGLE_NOTIFY_DEBUG=false
BINANCE_FEATURE_TOGGLE_NOTIFY_ORDER_EXECUTE=true

BINANCE_AUTHENTICATION_ENABLED=true
BINANCE_AUTHENTICATION_PASSWORD=xxx
BINANCE_JOBS_TRAILING_TRADE_BOT_OPTIONS_AUTHENTICATION_LOCK_LIST=true
BINANCE_JOBS_TRAILING_TRADE_BOT_OPTIONS_AUTHENTICATION_LOCK_AFTER=120

I have
BINANCE_MODE=live in the docker-compose.server.yml

@habibalkhabbaz
Copy link
Contributor

@peweb

There is a merged pull request #556 which solves a similar issue.
It may solve your issue too.

@rando128
Copy link
Contributor

rando128 commented Dec 27, 2022

@peweb, depending on your grids status, you might be facing bug #555. It's fixed and merged in master, but not released. Though it is not related to the API error screen. Do you see any error in the console of your browser?

@peweb
Copy link

peweb commented Dec 27, 2022

@rando128 yes,

image

How to switch to master?

@rando128
Copy link
Contributor

Hum, AFAIK the bot doesn't use this library. So this is something else. Check this thread just in case.

@peweb
Copy link

peweb commented Dec 27, 2022

@rando128 Yeah Loom extension!
Uninstalled it and now no errors in console but I still can login to the bot. May I downgrade to 0.94?

@peweb
Copy link

peweb commented Dec 27, 2022

@chrisleekr @rando128
Just to let you know the master works fine. I prefer to work with docker-compose.server.yml so please, kindly release the last fixes. Thanks.

@VandrisV
Copy link

I have same issues master work fine till i loud dompose.server.yml and all stop.

@chrisleekr
Copy link
Owner Author

Guys, thanks for the investigation.

I will release a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bot stuck on loading
5 participants