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
Another IB login page change? #145
Comments
Hrm, this is confusing... I restarted ibeam w/ IBEAM_ERROR_SCREENSHOTS enabled to see if i could capture more information, and it appears on this go-around it executed the JS and loaded the login form successfully.
|
hey @jimrobinson thanks for all the details 👍 Note that the error As for that JavaScript - no idea, but I remember that their page contains a load of JavaScript from when I read it the first time a couple of years ago. Still, it's hard to tell what's going on if it started working again. Keep the |
Thanks, will do. |
2023-06-21 13:52:49,780|I| Gateway started with pid: 13 <class 'selenium.common.exceptions.TimeoutException'> Message: timeout: Timed out receiving message from renderer: -0.003 2023-06-21 13:55:30,453|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7f2efa282510> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="6fb95fb9c2dfc09d5c99d6bbbc87d1fb")> This error noticed with the latest version |
@eswark18 , I was actually planning on closing out this ticket this morning. Today, about 30 minutes before the markets opened, I checked that ibeam was properly authenticated and I could make requests of the API, and it was working fine. When the market opened ibeam reported it was no longer logged in and started spewing the same sorts of errors you indicate in your comment. This time around I had access to port 5000 (the Java app IB is distributing) and could hit it at the same time as I was observing these errors in the ibeam logs. As far as I can tell from observation, the problem was indeed on the IB side of things. The login page was taking in excess of 30 seconds to load, and wouldn't respond when I tried to submit credentials. About 06:45 (Pacific) it finally started responding, and I could see that ibeam was able to login. So I strongly suspect this is some sort of load issue on the IB side of things, as the timing matches pretty well with what happened yesterday (recovery around 06:45 (Pacific)). It's just a personal theory but given my years in software development and operations I am suspicious that they may have rolled out a change on their side that isn't able to handle a load spike around the time of market open. |
Hey @eswark18 thanks for sharing your log. Looking at it, I'd lean towards hypothesising that there were some connectivity issue on your end in this case. You can see that IBeam fails to communicate with the Gateway on number of times:
If this was a Gateway/IBKR issues, we'd see a different type of error. I'm not 100% on this, but this is my intuition at this point. I'd suggest looking into your setup, network, and possibly trying it in a different configuration or on a different machine. If you could share more details about your setup we could help you look into this further. |
@Voyz Just FYI, I've opened a ticket with IB asking if they were aware of (and willing to admit to...) any problems. I'm set up now to generate an HAR against browser request to port 5000 if this happens again tomorrow. If I hear back from IB w/ anything useful I'll update this ticket. Otherwise I'll plan to close the ticket if I determine there's not anything to be done from my side. |
@jimrobinson many thanks for sharing these observations.
I mean, to be frank, grand majority of problems we encounter here are on IB side. IBeam is just trying to mitigate these problems and find ways around these. Just to underline: the requests go directly to the Gateway/IB, IBeam doesn't intercept or process these in between, just attempts to authenticate automatically.
Yeah, I was seeing this happening a lot recently too. It seems quite random, sometimes it loads, sometimes it doesn't. I'd imagine the servers being overloaded.
Yeah, there isn't really anything else to point at. Apart from load, I'd attribute it to possible misconfiguration and/or bugs and/or techincal limitations on their side. The best we can do is to submit support tickets to let them know how urgently we require attention in this area.
Great stuff. If possible, add a video recording of the issue at hand if you can. I also have a similar ticket open with them, sent HAR files and all, but I hardly get any replies. Hence it's important we do this as a joint effort, in order for their team to understand the breadth of these issues. Thanks for all your support here! 🙏 |
Hi @Voyz ,
Yes, 'Connection timeout after 15 seconds' was the first of the errors and it happened at 13:29:35 UTC. Then it struggled for awhile until 13:47:14 UTC. During the problematic period it sometimes loaded the login page successfully but then raised an error that the login credentials were wrong. This was a false error, the credentials are not changing throughout this sequence of login attempts, and it does eventually succeed. I've attached a snippet of the log below, from 13:00 UTC to 13:59 UTC.
Yeah, I'm not optimistic they'll admit to anything but we'll see. I'm not sure how I'd go about setting up a video recording of the session, but if I can figure it out w/o too much trouble I'll try to make one. |
That's really interesting. @eswark18 that could suggest that your errors weren't related to your setup after all like I suspected. I haven't seen this error behaviour before.
Yeah, the Gateway defaults to generic errors such as 'failed' and 'Invalid username password combination' when in reality these aren't the actual errors. It's safer to treat these as generic 'something went wrong' errors, than to read into the message.
Run IBeam (or the Gateway only) on your local system and then just access |
IB did reply to my ticket and stated that they have been having problems on their end for the last two days, but that they think the problem has been solved. Here's the reply from them:
|
Describe the bug
I am suspicious that IB has changed their login page again, breaking compatibility with what IBeam is expecting.
The system was working OK on 2023-06-16, and failing on 2023-06-19. I'm seeing a message that makes me think IBeam can no longer recognize / load the login form.
To Reproduce
I restarted IBeam and the logs indicated the above issue.
I then tried visiting the port 5000 page directly and pulled a login page down, which I filled in an submitted successfully.
After that IBeam indicated it was successfully logged in.
Expected behavior
I would have expected IBeam to navigate the login page.
Environment
IBeam version: v0.4.5
Docker image or standalone: Docker image
Python version (standalone users only):
OS: Linux
Additional context
I notice that the login page now has a large javascript component, I'm unclear on whether or not it had this before:
When it executes it renders the following page:
ib-login.post-js-hook.html.txt
This page contains a form with input elements that I would think would be matched by the code looking for elements By.NAME "username" and "password" (in version 2 of the login credentials searched for):
Suggest a Fix
I'm not confident to suggest it but I was wondering if it's possible that the JS is not being executed correctly to render the elements that IBeam is looking for.
The text was updated successfully, but these errors were encountered: