Recognise IB Gateway 1037+ login controls (hyphenated forms)#366
Recognise IB Gateway 1037+ login controls (hyphenated forms)#366frankboehkeenlab wants to merge 1 commit into
Conversation
IB Gateway 10.37 renamed several UI controls to use hyphens in place of
spaces, which prevents IBC from auto-logging in. Affected controls:
* Window title: 'IBKR-Gateway' (was 'IBKR Gateway')
* Login button: 'Paper-Login' (was 'Paper Log In')
* Mode toggles: 'Live-Trading' / 'Paper-Trading'
(was 'Live Trading' / 'Paper Trading')
* API toggle: 'FIX-CTCI' (was 'FIX CTCI')
Without these, GatewayLoginFrameHandler.recogniseWindow() returns false,
the login handler never fires, and IBC exits 1112 (LOGIN_DIALOG_DISPLAY_
TIMED_OUT) after its 60s wait, with the IBC log showing only the
'IBKR-Gateway frame Opened' event followed by silence.
Behaviour confirmed by enabling LogComponents=open and dumping the live
Swing component tree: the new names are emitted verbatim by Gateway
1037. Older Gateway/TWS versions remain matched by the existing
space-separated strings (the change is purely additive, no removals).
End-to-end verified on Gateway 10.37.1q (Windows, paper trading):
fully automated login completes in ~10s and the Gateway API port (4002)
stays listening continuously.
|
I never downloaded 10.37.1q, and it's no longer accessible from the IBKR website, so I'm unable to verify this. I'm not suggesting your report is incorrect, just that I can't verify it. However it is no longer the current stable version (and hasn't been for some time). I suspect this is one of those occasional mistakes that IBKR make, and because it's no longer current they haven't bothered to fix it. The current version is now 10.45.1g. That version doesnt suffer from this problem. Is there some reason why you can't just upgrade to the current stable version? I'd rather not have to go to the trouble of releasing a new version of IBC so that an unsuported old version of Gateway with a fault can be made to work. |
|
Thanks for the response — I upgraded to 10.45.1g as suggested and the bug reproduces identically. The cause turns out to be locale-specific, which explains why you don't see it:
The hyphenated forms are IBKR's German UI strings. They've been emitted by Gateway since at least 10.37 and are still present in 10.45.1g (verified by freshly installing the current stable and dumping the live Swing tree with Stock IBC 3.23.0 against this Gateway exits 1112 after 60s of silence post- So this isn't an obsolete-Gateway bug — it's an IBC i18n gap that's been hiding under English-locale testing. Setting Happy to add other-locale checks if you can point me at known label variants for FR/IT/JP, but the German fix alone already unblocks non-English users on every Gateway 10.37–10.45 build. |
|
Ah, yes, Gateway and TWS have aways been multilingual. But IBC (and its predecessor IBController) have always been English only. This is mentioned in the User Guide. So the workaround for this is to run TWS/Gateway in English rather than your locale. I realise this could be a problem for some users, but it presumably won't be for you. The various language strings needed to internationalise it are programmatically available to it, but it's not a 5-minute job and I have no intention of doing it at this stage.. |
|
fair point, understood and agree :) |
|
Like your patch, added it to my local repository. Even though I run TWS in en_DE locale and english IBC/TWS: That is US keyboard with EurKEY layout, english language and collation, but monetary, paper sizes, address format, telephone, measurements, and numerics are german, week starts on Monday. With date in ISO-format: Which TWS JRE translates into: Look for a file called locales.jar if you want to go mad translating labels. But I caution, save the time. After many years you are the first to even complain about i18n. If you have any issue with TWS or Gateway, you will find nothing using german translations. There is a property called locale_to_use, could be enough to switch to en_US without switching the OS. Like -Dlocale_to_use=en_US or similar. Any reason you'd want to stay with German locale? |
|
I've already decided to change back to english, just wanted the heads up of my findings. |
Problem
IB Gateway 10.37 renamed several UI controls to use hyphens instead of spaces. IBC 3.23.0 doesn't recognise the new forms, so
GatewayLoginFrameHandler.recogniseWindow()returnsfalse, the login handler never fires, and IBC eventually exits with code 1112 (LOGIN_DIALOG_DISPLAY_TIMED_OUT).Diagnostic signature in the IBC log:
Affected controls
Confirmed by enabling
LogComponents=openand dumping the live Swing tree of Gateway 10.37.1q's login window:IBKR GatewayIBKR-GatewayPaper Log InPaper-LoginLive Trading/Paper TradingLive-Trading/Paper-TradingFIX CTCIFIX-CTCIFix
Purely additive — keep the existing strings, add the new ones as fallbacks. Touches three files:
GatewayLoginFrameHandler— title + paper-login button + FIX-CTCI toggleAbstractLoginHandler— genericfindLoginButton+setTradingModetogglesReconnectDataOrAccountConfirmationDialogHandler— titleOlder Gateway/TWS versions remain matched by the existing space-separated strings.
Verification
End-to-end test on Gateway 10.37.1q (Windows, paper trading, German locale):
StartGateway.batSetting user name→Setting password→Login attempt→Authentifizierung...→ port 4002 LISTENINGBefore the patch: every IBC start exited 1112 after exactly 60s; after the patch: full auto-login completes in ~10s.