TabNine icon indicating copy to clipboard operation
TabNine copied to clipboard

Unable to sign in to TabNine behind corporate proxy/vpn

Open zmeir opened this issue 3 years ago • 9 comments

please complete the following information:

  • OS version: macOS Monterey 12.2.1
  • Editor: PyCharm
  • Editor version: 2022.1
  • Programming language: python
  • TabNine extension version: 0.5.23
  • Engine version (could be located within Tabnine Hub): 4.4.4-48

Issue Details: When launching the TabNine hub from PyCharm, then trying to Sign In, the page tries to redirect to https://app.tabnine.com/auth/sign-in for the sign in process, but then nothing happens and the page redirects back to the hub URL (in http://127.0.0.1:5555) and just hangs there indefinitely with a blank page.
This only happens when operating inside of a corporate VPN. When I turn off the VPN I can sign in just fine.

This doesn't seem to be a duplicate of https://github.com/codota/TabNine/issues/181, as the suggested solution there is to update the http_proxy and https_proxy environment variables. However, since in this case TabNine is running from PyCharm, the same approach doesn't apply.

gz#13739

zmeir avatar Apr 25 '22 11:04 zmeir

Hi can you make sure Tabnine is whitelisted then? For tabnine to operate properly, it needs to be able to communicate with several hosts: api.tabnine.com, www.tabnine.com, cloud.tabnine.com, sa.tabnine.com.

maya-tabnine avatar Apr 28 '22 10:04 maya-tabnine

The problem is still working. After adding to the whitelist, I get a new message "Could not authenticate."

BKDev99 avatar May 03 '22 02:05 BKDev99

Hi can you make sure Tabnine is whitelisted then? For tabnine to operate properly, it needs to be able to communicate with several hosts: api.tabnine.com, www.tabnine.com, cloud.tabnine.com, sa.tabnine.com.

What do you mean by that? I have no control over our corporate VPN or firewall settings, but I can access all those hosts through our proxy. The problem is there are no proxy settings for the plugin anywhere (or at least nowhere I could find).

zmeir avatar May 03 '22 06:05 zmeir

I looked it up online, and perhaps you need to set the proxy settings in PyCharm. Look at this guide Let us know if that resolved it!

maya-tabnine avatar May 16 '22 12:05 maya-tabnine

I have the same problem with all tabnine subdomains whitelisted

raphaelbiermann avatar Jun 02 '22 06:06 raphaelbiermann

I looked it up online, and perhaps you need to set the proxy settings in PyCharm. Look at this guide Let us know if that resolved it!

I’ve set the proxy settings in both PyCharm and Safari/Chrome but still can’t sign in

zmeir avatar Jun 02 '22 06:06 zmeir

Please activate the api key signin again

raphaelbiermann avatar Jun 02 '22 06:06 raphaelbiermann

Please activate the api key signin again

Can you please elaborate?

I see no such option in my user profile. Did you mean I should enter an API key in the Tabnine Hub preferences here?
image
If so - I don't know how to get this key. My account was activated via email invitation to a Tabnine Team.

I also checked to see if my account is active as shown here and it seems ok:
image

zmeir avatar Jun 06 '22 10:06 zmeir

Can you please elaborate?

No, sorry, theres no option to get this API Key at the moment I believe and I want TabNine to offer this alternative for activation again.

raphaelbiermann avatar Jun 07 '22 08:06 raphaelbiermann

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 03 '22 08:10 stale[bot]

Issue is still present in latest version of PyCharm and TabNine

zmeir avatar Oct 03 '22 08:10 zmeir

The tabnine web code should be changed to use something like {baseURL}/proxy/5555 instead of 127.0.0.1:5555 for the tabnine hub, since this PR went into the base code-server: https://github.com/coder/code-server/pull/5624 @jsjoeio

ksylvan avatar Oct 26 '22 01:10 ksylvan

Let us know how we can help!

jsjoeio avatar Oct 26 '22 15:10 jsjoeio

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 25 '22 15:12 stale[bot]

This issue is still occurring with the latest TabNine and code-server

ksylvan avatar Dec 26 '22 18:12 ksylvan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 24 '23 19:02 stale[bot]

This issue is still occurring with the latest TabNine and code-server

BKDev99 avatar Mar 03 '23 08:03 BKDev99

Still having this issue. Now tabnine does not work under VPN at all. In the logs I can see the requests are getting timed out or getting some error:

n_app_messaging::internal] [2023-03-14:13:01:18 TabNine ERROR] Error while fetching messages. reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.tabnine.com")), port: None, path: "/in-app-messaging/notifications/1651877031980239000", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: nodename nor servname provided, or not known" })) } DEBUG [lunar_local::downloader] [2023-03-14:13:01:24 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:24 TabNine DEBUG] trigger manager observer digesting... DEBUG [lunar_local::downloader] [2023-03-14:13:01:25 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:25 TabNine DEBUG] trigger manager observer digesting... DEBUG [lunar_local::downloader] [2023-03-14:13:01:34 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:34 TabNine DEBUG] trigger manager observer digesting... DEBUG [lunar_local::downloader] [2023-03-14:13:01:34 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:34 TabNine DEBUG] trigger manager observer digesting... ERROR [in_app_messaging::internal] [2023-03-14:13:01:36 TabNine ERROR] Error while fetching messages. reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.tabnine.com")), port: None, path: "/in-app-messaging/notifications/1651877031980239000", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: nodename nor servname provided, or not known" })) } DEBUG [lunar_local::downloader] [2023-03-14:13:01:44 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:44 TabNine DEBUG] trigger manager observer digesting... DEBUG [lunar_local::downloader] [2023-03-14:13:01:44 TabNine-deep-local DEBUG] LunarLocalModelRelatedData { model_hash: "ce94127b", models_dir: Some("/Users/andrei.nazarenka/Library/Application Support/TabNine/models") } DEBUG [triggers::trigger_manager::analytics_observer] [2023-03-14:13:01:44 TabNine DEBUG] trigger manager observer digesting...

anazar2001 avatar Mar 14 '23 13:03 anazar2001

Or this one:

WARN [cloud_health] [2023-03-14:13:44:24 TabNine WARN] got error response from cloud health check. failures_counter: 9, e: error sending request for url (https://c2.p.tabnine.com/health): operation timed out ERROR [midline] [2023-03-14:13:44:25 TabNine-deep-cloud ERROR] Failed to query cloud v2 midline error sending request for url (https://c2.p.tabnine.com/infer): operation timed out

anazar2001 avatar Mar 14 '23 13:03 anazar2001

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 15 '23 10:05 stale[bot]

Still error

nvlinh99 avatar May 15 '23 11:05 nvlinh99

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 14 '23 11:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 16 '23 08:09 stale[bot]