question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Constantly getting "Gateway session active but not authenticated"

See original GitHub issue

Describe the bug After logging in and authenticating through 2FA via the IBKR mobile app, the login succeeds, but the session immediately appears as non-authenticated:

2020-12-12 05:22:11,726|I| Gateway started with pid: 12
2020-12-12 05:22:13,200|I| No active sessions, logging in...
2020-12-12 05:22:53,237|I| Login succeeded
2020-12-12 05:22:54,451|E| Gateway session active but not authenticated
2020-12-12 05:22:54,731|I| Starting maintenance with interval 60 seconds
2020-12-12 05:23:54,943|I| Gateway session found but not authenticated, authenticating...
2020-12-12 05:24:11,539|I| Login succeeded
2020-12-12 05:24:12,753|E| Gateway session active but not authenticated
2020-12-12 05:24:56,693|I| Gateway session found but not authenticated, authenticating...
2020-12-12 05:25:18,914|I| Login succeeded
2020-12-12 05:25:20,123|E| Gateway session active but not authenticated

And it constantly asks me to login again. I seem to be able to make some requests anyway: i.e. /portfolio/accounts works just fine. But /portfolio/{accountId}/positions/0 doesn’t work.

To Reproduce Steps to reproduce the behavior:

  1. Start IBeam through Docker providing authentication details in an env file
  2. Complete 2FA through the mobile app
  3. Observe “Login succeded” in the log, rejoice temporarily
  4. Despare at the sight of “Gateway session active but not authenticated”

Expected behavior After login succeeds, the gateway session should be and stay authenticated.

Environment IBeam version: 0.2.0 Python version: 3.7.7 OS: Linux (running on the default Docker image)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:34 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
Voyzcommented, Dec 12, 2020

Hey thanks for reporting and following up on this issue! 👋 I’m glad you managed to find a solution so quickly 😊 To be quite honest - I noticed similar pattern appearing sometimes, despite not being logged in anywhere else than using IBeam. It seems to stabilise after a few minutes and then the problem goes away - still, I’d rather this didn’t happen at all. Please let me know if this problem repeats and we’ll try to look into it further. Thanks! Voy

1reaction
Voyzcommented, Oct 19, 2021

Thanks for reporting back @Wenuka 👍 It sounds like we may want to resort to proxy wrangling. Due to workload I won’t have time to look into it in the few upcoming weeks, so feel free to propose a PR handling this functionality in the meantime.

As for manually logging in every week - could you link up the documentation you’re referring to? I think due to all the various errors I never had the Gateway continuously authenticated for as long as a week, so it’s hard for me to tell if that could cause any issues, but thanks for highlighting it as a potential problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot the on-premises data gateway - Microsoft Learn
This article provides ways for you to troubleshoot issues you might have with the on-premises data gateway.
Read more >
Configure Citrix Gateway session policies for StoreFront
This article describes how to configure a Citrix Gateway domain only authentication with StoreFront for users who are using Citrix Workspace ...
Read more >
Gateway Error Codes | Mastercard Developers Platform
The most common cause of this issue is that the signing (private) key used by the client does not correspond to the public...
Read more >
How to interpret and troubleshoot Duo Access Gateway debug ...
1. Successful Primary authentication to AD · 2. Incorrect user password · 3. Incorrect user OR incorrect search base DN OR incorrect search...
Read more >
Troubleshoot AuthPoint - WatchGuard Technologies
If authentication does not work as expected, or if a failure occurs, you can use reports, alerts, and audit logs to troubleshoot the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found