Voyz / ibeam

IBeam is an authentication and maintenance tool used for the Interactive Brokers Client Portal Web API Gateway.
Apache License 2.0
547 stars 111 forks source link

2FA handler found. You may define your own 2FA handler or use built-in handle #85

Closed MislavSag closed 2 years ago

MislavSag commented 2 years ago

Describe the bug I am trying to open a gateway through docker using my paper account.

I have set credentials and change conf.yalm file as explained here https://github.com/Voyz/ibeam/issues/83

Now, when I run the docker image with:

docker run -v /root/inputs:/srv/inputs --env-file env.list -p 5000:5000 voyz/ibeam

I get an error:

root@localhost:~# docker run -v /root/inputs:/srv/inputs --env-file env.list -p 5000:5000 voyz/ibeam
2022-05-19 08:25:25,735|I| ############ Starting IBeam version 0.4.0 ############
2022-05-19 08:25:25,737|I| Custom conf.yaml found and will be used by the Gateway
2022-05-19 08:25:25,740|I| Gateway not found, starting new one...
2022-05-19 08:25:25,740|I| Note that the Gateway log below may display "Open https://localhost:5000 to login" - ignore this command.
running
 runtime path : root:dist/ibgroup.web.core.iblink.router.clientportal.gw.jar:build/lib/runtime/*
 verticle     :
2022-05-19 08:25:26,745|I| Gateway started with pid: 12
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/srv/clientportal.gw/build/lib/runtime/netty-common-4.1.15.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 -> mount demo on /demo
Java Version: 11.0.12
****************************************************
version: ed4af2592e9dd4a784d5403843bd18292fd441ea Fri, 9 Nov 2018 13:23:18 -0500
****************************************************
This is a Beta release of the Client Portal Gateway
for any issues, please contact api@ibkr.com
and include a copy of your logs
****************************************************
https://www.interactivebrokers.com/api/doc.html
****************************************************
Open https://localhost:5000 to login
App demo is available after you login under: https://localhost:5000/demo/
2022-05-19 08:25:30,408|I| No active sessions, logging in...
^C2022-05-19 08:25:41,525|I| Credentials correct, but Gateway requires two-factor authentication.
2022-05-19 08:25:41,526|C| ######## ATTENTION! ######## No 2FA handler found. You may define your own 2FA handler or use built-in handlers. See documentation for more: https://github.com/Voyz/ibeam/wiki/Two-Factor-Authentication
2022-05-19 08:25:41,619|I| Authentication process failed
2022-05-19 08:25:41,620|W| Shutting IBeam down due to critical error.

I am using paper account that doesn't have 2FA. Does tha mean, I have to use 2FA ?

Expected behavior A clear and concise description of what you expected to happen.

Environment IBeam version: latest Docker image or standalone: Docker Python version (standalone users only): - OS: Debian

Voyz commented 2 years ago

Hey @MislavSag thanks for submitting your issue and thanks for baring with me 👍

If IBeam displays No 2FA handler found then it means it recognised a prompt in the login page asking for the 2FA. This would mean that either your paper account requires 2FA (which I don't know if is even possible - can you try logging in manually without IBeam to confirm this?), or you're actually providing the live account credentials. Can you double check you're supplying the correct credentials?

Voyz commented 2 years ago

Closing this issue due to lack of activity. Feel free to reopen if you'd like to continue the discussion 👍