codota / TabNine

AI Code Completions
https://tabnine.com
MIT License
10.58k stars 493 forks source link

TabNine::config page always be blank on vscode-remote #305

Closed FourLeafTec closed 1 year ago

FourLeafTec commented 3 years ago

TabNine::config page always be blank on vscode-remote

And I can't find useful log.

boaz-codota commented 3 years ago

Hey @FourLeafTec I'm sorry you encounter such problems. Lets try to resolve that issue for you!

Could you press F12 and submit the console output here? This will help me greatly to understand what might have gone wrong.

Thank!

FourLeafTec commented 3 years ago

Sure,if has any help to resolve it. 截屏2020-12-03 上午11 02 50

boaz-codota commented 3 years ago

Thanks for the response @FourLeafTec

Actually I'd need you to open Tabnine Hub using in the browser (type tabnine::config anywhere in a code file where you get tabnine suggestions) and paste the console from there.

Thanks, and sorry for being unclear.

FourLeafTec commented 3 years ago

I have try it,but can't open Tabnine Hub in the browser. 截屏2020-12-08 上午11 59 26

tobiascornille commented 3 years ago

I have the same problem and can't open a browser either. Just did a fresh reinstall too

crewone commented 3 years ago

I have the same with tabnine pro.

On a local vscode it works fine, but running with WSL - the config page stays blank.

tabnine::config opens a page on localhost - http://127.0.0.1:5555/nomomtejndmazgriqjau

But when running with WSL, that does not lead to the config page.

The problem seems to be that the tabnine host runs within WSL, and listens on 0.0.0.0 and only accepts localhost connections. (From the WIndows 10 host into WSL is technically not a localhost connection, as WSL2 has it's own network and IP address)

What works, is running a SSH tunnel -

ssh -L 5555:127.0.0.1:5555 username@[wsl ip address]

And then connecting to localhost:5555/[config-url]

But this is quite bothersome and it used to work just fine a few months ago.

crewone commented 3 years ago

Any update on this? This is quite the problem and I at least expect an acknowledgement of the problem after paying for the product. (Call me spoiled or whatever.....) ;)

eioo commented 3 years ago

Experiencing same issue when using Remote-SSH with a mac host.

VSCode 1.55.0-insider Tabnine v.3.2.8 Host: macOS Big Sur 11.2.2

ghost commented 3 years ago

Also having the same issue, can't add the API key and I'm running into the daily limit for free fairly quickly.

Found the way to do it manually though:

In your terminal whilst in your homefolder: find . -iname tabnine_config.json Should return: ./.config/TabNine/tabnine_config.json (at least for me)

Now you can open that file and add the api_key. From the vscode terminal: code ./.config/TabNine/tabnine_config.json Or from an ssh session outside of code: nano ./.config/TabNine/tabnine_config.json or something like vi if that's your preference

After you've added the api key it will take a little while for it to load that or you can just restart vscode.

Now I have tabnine pro running on my local ubuntu vm w/o using the tabnine hub page.

sanderkooger commented 3 years ago

The issue is that the port 5555 does not get forwarded by default. If using remote SSH vscode extension please add port 5555 to your config.

Fro the development team of this plugin, I think you should be able to set this option programmatically during setup.

JonnyNilsen commented 3 years ago

@sanderkooger Thank you so much for the solution! :D Everything is working great now. :D I feel like I' was going insane because of this issue related to ssh remote :(

jack-rory-staunton commented 3 years ago

@MrQrax I was hopeful that @sanderkooger 's solution would work for me but I set up port forwarding on 5555:5555 but I still get nothing in the browser or on TabNine Hub in vscode. It shows up as normal when I am in a local workspace. Any idea what I might be missing?

myurasov commented 3 years ago

Any updates??

louchenyao commented 3 years ago

Same issue. Because of this issue, I cannot enter the API key to upgrade to Tabnine Pro after purchasing it, which is frustrating.

IvsonEmidio commented 3 years ago

Same here!!

IvsonEmidio commented 3 years ago

if u having this issue (USING REMOTE SSH) Press F1 > Forward a Port > Add port this port> 5555 > Save > Now u can open tabnine Hub :).

myurasov commented 3 years ago

Doesn't help under the VPN connection. (That allows ports, incl. 5555 passthrough).

On Wed, Apr 28, 2021 at 9:24 PM IvsonSilva @.***> wrote:

if u having this issue (USING REMOTE SSH) Press F1 > Forward a Port > Add port this port> 5555 > Save > Now u can open tabnine Hub :).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/codota/TabNine/issues/305#issuecomment-828930346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABW2N7WTCLR34FYDICPHPTTLDNPPANCNFSM4UJ74JEQ .

-- Mikhail Yurasov

jack-rory-staunton commented 3 years ago

if u having this issue (USING REMOTE SSH) Press F1 > Forward a Port > Add port this port> 5555 > Save > Now u can open tabnine Hub :).

This does not work for me

IvsonEmidio commented 3 years ago

Do this when u connected to the remote ssh, if this doest work, try to check if u computer are blocking local ports or if the port 555 has aready in use

Em qui, 29 de abr de 2021 09:09, Jack Rory Staunton < @.***> escreveu:

if u having this issue (USING REMOTE SSH) Press F1 > Forward a Port > Add port this port> 5555 > Save > Now u can open tabnine Hub :).

This does not work for me

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/codota/TabNine/issues/305#issuecomment-829185823, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCRZ6NNSS7TBECC4N7ARGTTLFEARANCNFSM4UJ74JEQ .

rajathelementure commented 3 years ago

Forward PORT 5555 Here By Adding Manually It Works! Screenshot 2021-05-12 at 11 56 15 PM

rajathelementure commented 3 years ago

Sure,if has any help to resolve it. 截屏2020-12-03 上午11 02 50

It Resolved For Me. https://github.com/codota/TabNine/issues/305#issuecomment-840004410

guiguan commented 3 years ago

my blank tabnine hub was fixed by rm -rf ~/Library/Application\ Support/Code/User/globalStorage/tabnine.tabnine-vscode then reload vscode

dhevsabharish commented 3 years ago

I had the same issue with wsl 2 [Debian]. But this worked for me: Just drag and drop the sign-in/sign-up button in the TabNine hub page in your browser.

alonaddy commented 2 years ago

How do you get the API Key? I can't see anything for it in the tabnine site.

skrenes commented 2 years ago

I'm using code-server and it's also broken for me due to TabNine trying to connect to 127.0.0.1 instead of the FQDN that vscode requires. I couldn't find a setting for TabNine that even allowed this to be changed.

LiorNevo commented 2 years ago

I'm using code-server and it's also broken for me due to TabNine trying to connect to 127.0.0.1 instead of the FQDN that vscode requires. I couldn't find a setting for TabNine that even allowed this to be changed.

I have the same issue

wvffle commented 2 years ago

I'm using code-server and it's also broken for me due to TabNine trying to connect to 127.0.0.1 instead of the FQDN that vscode requires. I couldn't find a setting for TabNine that even allowed this to be changed.

For now I've worked this around with connecting to the server where my code-server is with ssh and port forwarding:

ssh -L 5555:localhost:5555 code-server.mydomain.com
camAtGitHub commented 2 years ago

I'll put the solution that worked for me first: On my remote (ssh) server (with portforwarding) I open neovim, then do the :CocCommand tabnine.openHub as documented everywhere - Then the trick was to do ps uax | grep 5555 where I would see: lynx http://127.0.0.1:5555/sec-isdjdksdfsdfsnfbnb - Using that additional page/link then worked.

The symptoms for me was that even with SSH port forwarding, I would see the page render for half a second, then go blank. Opening developers console there were 2 errors consisting of:

04:45:04.495 TypeError: t.map is not a function      [react-dom.production.min.js:216:199]
    Toe WowMomentsModal.tsx:25
    React 8
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    flush notifyManager.js:75
    promise callback*T utils.js:322
    flush notifyManager.js:74
    batch notifyManager.js:30
    dispatch query.js:390
    setData query.js:83
    onSuccess query.js:334
    f retryer.js:58
    promise callback*c retryer.js:116
    u retryer.js:156
    fetch query.js:330
    executeFetch queryObserver.js:199
    onSubscribe queryObserver.js:40
    subscribe subscribable.js:16
    D useBaseQuery.js:60
    Bl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
    L scheduler.production.min.js:16
    onmessage scheduler.production.min.js:12
    36813 scheduler.production.min.js:12
    Webpack 10
react-dom.production.min.js:216:199

and

04:48:01.427 Uncaught TypeError: t.map is not a function    [WowMomentsModal.tsx:25:17]
    Toe WowMomentsModal.tsx:25
    React 8
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    flush notifyManager.js:75
    promise callback*T utils.js:322
    flush notifyManager.js:74
    batch notifyManager.js:30
    dispatch query.js:390
    setData query.js:83
    onSuccess query.js:334
    f retryer.js:58
    promise callback*c retryer.js:116
    u retryer.js:156
    fetch query.js:330
    executeFetch queryObserver.js:199
    onSubscribe queryObserver.js:40
    subscribe subscribable.js:16
    D useBaseQuery.js:60
    Bl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
    L scheduler.production.min.js:16
    onmessage scheduler.production.min.js:12
    36813 scheduler.production.min.js:12
    Webpack 10
WowMomentsModal.tsx:25:17
    Toe WowMomentsModal.tsx:25
    React 7
    yl self-hosted:1198
    Ki React
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    flush notifyManager.js:75
    (Async: promise callback)
    T utils.js:322
    flush notifyManager.js:74
    batch notifyManager.js:30
    dispatch query.js:390
    setData query.js:83
    onSuccess query.js:334
    f retryer.js:58
    (Async: promise callback)
    c retryer.js:116
    u retryer.js:156
    fetch query.js:330
    executeFetch queryObserver.js:199
    onSubscribe queryObserver.js:40
    subscribe subscribable.js:16
    D useBaseQuery.js:60
    Bl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
    L scheduler.production.min.js:16
    onmessage scheduler.production.min.js:12
    (Async: EventHandlerNonNull)
    36813 scheduler.production.min.js:12
    Webpack 10
ksylvan commented 2 years ago

I’m having the same issue with TabNine config hub on a remote VSCode setup. I’ve port forwarded 5555 to the remorse server where TabNine is running, but still no luck.

How do I figure out what the random string is to access http://127.0.0.1:5555/{what-do-i-put-here} ???

camAtGitHub commented 2 years ago

@ksylvan - I'm guessing that 'if' the tabnine binary is running on the remote linux server, and you have 'triggered' the tabnine openHub command. You could login to the remote host in a different terminal window and try something like
ps uax | egrep -i 'lynx|5555|tabnine|127.0.0.1' and see what turns up....?

ksylvan commented 2 years ago

Hmmm… After port forwarding 5555, I see the same symptoms as @camAtGitHub when trying http://localhost:5555; namely, I see the page render for a fraction of a second, then a blank page.

Using Web Inspector, I see these errors:

undefined is not a function (near '...t.map...')
    aa@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:472966
    Fa@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:482534
    Os@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512508
    ks@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512436
    ws@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512299
    ys@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:509265
    ys@[native code]
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458758
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:608594
    Yr@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458704
    Ur@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458639
    bs@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:509586
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:540711
    promiseReactionJob@[native code]
TypeError: undefined is not a function (near '...t.map...')
    r@webkit-masked-url://hidden/:27:166011
    value@webkit-masked-url://hidden/:27:182883
    @webkit-masked-url://hidden/:27:184904
null
    r@webkit-masked-url://hidden/:27:166011
    value@webkit-masked-url://hidden/:27:182883
    @webkit-masked-url://hidden/:27:184904

My TabNine version is 3.6.14

Help->About on VSCode shows this:

code-server: v4.7.0
Code: 1.71.0
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-09T18:33:04.596Z (2 days ago)
ksylvan commented 2 years ago

When visiting http://localhost:5555/preferences I see these errors in JavaScript console:

undefined is not an object (evaluating 'this.featureFlags.includes')
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:5581778
    jue@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:5582096
    aa@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:472966
    Fa@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:482534
    Os@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512508
    ks@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512436
    ws@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:512299
    ys@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:509265
    ys@[native code]
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458758
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:608594
    Yr@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458704
    Ur@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:458639
    fs@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:506642
    Oa@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:478292
    Oa@[native code]
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:1759291
    u@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:599421
    @http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:599206
    Ie@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:1751352
    a@http://127.0.0.1:5555/static/js/main.eb6c0893.js:2:1751558
    promiseReactionJob@[native code]
null
    r@webkit-masked-url://hidden/:27:166011
    value@webkit-masked-url://hidden/:27:182883
    @webkit-masked-url://hidden/:27:184904
camAtGitHub commented 2 years ago

@ksylvan my previous post was to help try identify the secret/magic string. also it may help if lynx is also installed on the remote server when you attempt this. give it a try.

ksylvan commented 2 years ago

@ksylvan my previous post was to help try identify the secret/magic string. also it may help if lynx is also installed on the remote server when you attempt this. give it a try.

@camAtGitHub - I see. I don’t use nvim and :CocInstall and CocCommand - I only have set things up on my remote cloud server to run VCode Web in my browser with code-server running on the remote. Can you point me to what I need to install on the remote so I can try this route?

I am seeing what you stated earlier, which is that the TabNine config page seems to pop up for a second and then becomes a blank page. And I see the above JavaScript errors (as others have seen in this thread)

camAtGitHub commented 2 years ago

@ksylvan - I know that your using vscode... I didnt say anything neovim specific.... And no I'm not prepared to help you set it up.

Anyway I have tested the below on vscode w remote workspace. Try the below:

  1. ensure that lynx is installed remotely
  2. in vscode in a new or existing file that is part of your remote workspace type the phrase: tabnine::config (press enter)
  3. on the remote system run the command ps uax | egrep -i 'lynx|5555'
    If you see something like: lynx http://127.0.0.1:5555/sec-whklsdfjhjsikdkuierbf then the sec-whklsdfjhjsikdkuierbf is the {what-do-i-put-here}

Good luck & Turning off notifications,
Yours forever
Cam x

ksylvan commented 2 years ago

Thanks, @camAtGitHub - That pointed me to the magic. With the “Error Lens” extension installed, I typed:

// tabnine::config

And then the following was highlighted with a Tab to insert showing:

Couldn't start web browser at http://127.0.0.1:5555/sec-XXXYYYZZZ. See https://tabnine.com/faq#browser_failed

So I hit Tab and now was able to put my cursor on the link and Follow Link… But it still does not work to render the page.

ksylvan commented 1 year ago

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

ksylvan commented 1 year ago

Any updates on this?

jsjoeio commented 1 year ago

Still waiting to hear back from tabnine team

stale[bot] commented 1 year ago

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.

hykw commented 1 year ago

any news?

madfelps commented 1 year ago

any news regarding this?

ghost commented 1 year ago

This is not stale, I just ran in to this same issue. Had to use DevTools to exract the link in order to login

See https://github.com/codota/TabNine/issues/377