positron icon indicating copy to clipboard operation
positron copied to clipboard

Help window does not work

Open iamYannC opened this issue 1 year ago • 38 comments

Positron Version:

Positron Version: 2024.06.1 (system setup) build 2024.06.1-27 Code - OSS Version: 1.90.0 Commit: a893e5b282612ccb2200102957ac38d3c14e5196 Date: 2024-06-26T01:33:58.809Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

Steps to reproduce the issue:

  1. type ?data_frame or any other ?

What did you expect to happen?

Open a help window

Were there any error messages in the output or Developer Tools console?

No error msg, but it just shows the html address and does not display the help documentation (only when hover, which is nice but not enough) image

iamYannC avatar Jun 30 '24 14:06 iamYannC

Seems like this is likely a problem with Windows only, as I cannot reproduce this on a Mac. Can you go to "Output" and see if there are related errors, such as in the "Extension Host" output channel?

juliasilge avatar Jun 30 '24 21:06 juliasilge

?data.frame is working fine for me in Windows 10 with Positron 2024-06.1-27.

By the way, why F1 shortcut to open Help only works for .py files? It is an important time saving feature, it would be great to work for .R files too (as in RStudio).

GitHunter0 avatar Jul 01 '24 06:07 GitHunter0

@GitHunter0 it does work for R files

DavisVaughan avatar Jul 01 '24 11:07 DavisVaughan

@GitHunter0 it does work for R files

Sorry @DavisVaughan, in an .R file it is indeed working (my previous test was in a Quarto .qmd file).

GitHunter0 avatar Jul 01 '24 14:07 GitHunter0

Seems like this is likely a problem with Windows only, as I cannot reproduce this on a Mac. Can you go to "Output" and see if there are related errors, such as in the "Extension Host" output channel?

Hey. Still with this bug. I am not sure what you meant by Ext host, but i did find the log file, it's a bit long but here are the first lines, if that help a bit

2024-07-01 19:05:14.340 [info] Extension host with pid 16168 started
2024-07-01 19:05:14.340 [info] Skipping acquiring lock for c:\Users\97253\AppData\Roaming\Positron\User\workspaceStorage\5c969ba0f57a1e99e1f000f15ab1f060.
2024-07-01 19:05:14.358 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-07-01 19:05:14.372 [info] ExtensionService#_doActivateExtension vscode.jupyter-adapter, startup: false, activationEvent: 'onLanguage:r', root cause: vscode.positron-r
2024-07-01 19:05:14.408 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: false, activationEvent: '*', root cause: vscode.git
2024-07-01 19:05:14.434 [info] ExtensionService#_doActivateExtension vscode.positron-r, startup: false, activationEvent: 'onLanguage:r'
2024-07-01 19:05:14.464 [info] ExtensionService#_doActivateExtension vscode.git, startup: false, activationEvent: '*'
2024-07-01 19:05:14.509 [info] ExtensionService#_doActivateExtension vscode.github, startup: false, activationEvent: '*'

Otherwise, In the OUTPUT tab (next to problems, ports, debug etc..) there is not input. image

-- F1: I get this pop-up: image

iamYannC avatar Jul 01 '24 16:07 iamYannC

Can you run the command "Developer: Toggle Developer Tools" and take a look for logs related to Help? For me, I see this;

dev-tools-help

Which includes:

INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:53548/library/base/html/data.frame.html

juliasilge avatar Jul 01 '24 22:07 juliasilge

PositronHelpService langu

Filtering for help image vscode-app-1719906795045.log

Filtering for data.frame (the example i used) image vscode-app-1719906915661.log

And there was also that log (might be temp address? it changed): vscode-app-1719906634973.log

Let me know if there is any additional info needed for you guys :)

iamYannC avatar Jul 02 '24 07:07 iamYannC

Ok. I played with it with screen sharing and at one point something worked, but far less responsive than in rstudio.. When a small note appears in the bottom right its when i pressed F1 (with Fn button active)

https://github.com/posit-dev/positron/assets/130578277/2eb6f926-0974-499f-98dc-765b9907d59d

iamYannC avatar Jul 02 '24 08:07 iamYannC

@iamYannC, If you have the time, could you try this with python? E.g. switch to a python interpreter and run a help-generating command like ?load?

nstrayer avatar Jul 02 '24 16:07 nstrayer

@iamYannC, If you have the time, could you try this with python? E.g. switch to a python interpreter and run a help-generating command like ?load?

Python's help works. takes a sec to load, but help page is loaded. tried with ?load, ?range and ?%copy and pd.read_csv - all works fine

btw, Julia's docu works but it only prints the help results in the consule, it doesnt open the documentation in the designated Julia extension area. But let's stick with R :P

iamYannC avatar Jul 02 '24 19:07 iamYannC

Okay cool -- thanks for checking! This means something is going wrong in the R language pack end. @DavisVaughan or @lionel- does that seem like a correct assessment?

nstrayer avatar Jul 02 '24 20:07 nstrayer

Observation re: the 3rd log (vscode-app-1719906634973.log):

I see the proxy being created at port 51197:

workbench.desktop.main.js:61147 [Extension Host] [HPM] Proxy created: /  -> http://127.0.0.1:51197

But the 502 error looks like a request on port 51301:

workbench.desktop.main.js:127455 DEBUG Webview(e2477533-89ab-4388-9864-96255b8e2083): webview ready
127.0.0.1:51301/library/base/html/data.frame.html:1 
        
        
       Failed to load resource: the server responded with a status of 502 (Bad Gateway)

In equivalent logging in my own Positron session just now, these two ports are the same (61588, yes, I know these ports are random):

[Extension Host] [HPM] Proxy created: /  -> http://127.0.0.1:61588
...
INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:61588/library/base/html/data.frame.html

jennybc avatar Jul 02 '24 20:07 jennybc

Observation re: the 3rd log (vscode-app-1719906634973.log):

I see the proxy being created at port 51197:

workbench.desktop.main.js:61147 [Extension Host] [HPM] Proxy created: /  -> http://127.0.0.1:51197

But the 502 error looks like a request on port 51301:

workbench.desktop.main.js:127455 DEBUG Webview(e2477533-89ab-4388-9864-96255b8e2083): webview ready
127.0.0.1:51301/library/base/html/data.frame.html:1 
        
        
       Failed to load resource: the server responded with a status of 502 (Bad Gateway)

In equivalent logging in my own Positron session just now, these two ports are the same (61588, yes, I know these ports are random):

[Extension Host] [HPM] Proxy created: /  -> http://127.0.0.1:61588
...
INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:61588/library/base/html/data.frame.html

This is wayy too much SE for me but If needed, I can go on a remote session or if you guide me like @juliasilge did, i hope I could provide some other usefull logs.

I did not try from other computers so can't say if its something in my local machine or in-fact some bug.

Thanks for the attention!

iamYannC avatar Jul 02 '24 20:07 iamYannC

@iamYannC can you:

  • download the latest release: https://github.com/posit-dev/positron/releases
  • open up Positron and toggle Developer Tools on
  • request help, such as via ?data.frame
  • look for two elements in the logs with ports

One will look like this:

[Extension Host] [HPM] Proxy created: / -> http://127.0.0.1:59984

The other will look like this:

INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:59984/library/stats/html/lm.html

Notice that I, like @jennybc, have the same port in these two places. Do you have different ports?

juliasilge avatar Jul 03 '24 18:07 juliasilge

@iamYannC can you:

  • download the latest release: https://github.com/posit-dev/positron/releases
  • open up Positron and toggle Developer Tools on
  • request help, such as via ?data.frame
  • look for two elements in the logs with ports

One will look like this:

[Extension Host] [HPM] Proxy created: / -> http://127.0.0.1:59984

The other will look like this:

INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:59984/library/stats/html/lm.html

Notice that I, like @jennybc, have the same port in these two places. Do you have different ports?

Hey. I cant understand its behaviour. It doesnt work, but then I just load a package (here, dplyr), and it's as if it brings up also the base R help documentation. I did another video. I hope it also gives a clue as to what might happen. I tried either using ? or with pressing F1

-- Positron Version: 2024.06.1 (system setup) build 2024.06.1-54 Code - OSS Version: 1.90.0 Commit: 5115c73e0670f39139e55eeedf0717b468a0658d Date: 2024-07-03T03:17:46.140Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

-- image

3 Log files for data frames vscode-app-1720035176864.log vscode-app-1720035192394.log vscode-app-1720035200716.log

image 2 Log files vscode-app-1720035326995.log vscode-app-1720035337750.log

-- Here is what I did:

https://github.com/posit-dev/positron/assets/130578277/1fbd5f35-4499-4d35-8199-ea0be1316095

iamYannC avatar Jul 03 '24 19:07 iamYannC

@iamYannC do you mind rebooting your computer and then downloading the latest release to try again?

juliasilge avatar Jul 08 '24 20:07 juliasilge

@iamYannC do you mind rebooting your computer and then downloading the latest release to try again?

Positron Version: 2024.07.0 (system setup) build 2024.07.0-17
Code - OSS Version: 1.90.0
Commit: 203958161106d234eaa85556293c1be8f8b395b3
Date: 2024-07-08T03:22:52.213Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

Same behviour. Trying ?data.frame or ?data.frame() doesn't work. but then I just call a random help on a user-library function (without even loading, e.g ?glue::glue) and after that, ?data.frame works

Failed to load resource: the server responded with a status of 502 (Bad Gateway) - data.frame.html vscode-app-1720475758729.log

On my second try it didnt load glue for the first time, so i re-ran it and it worked again..

https://github.com/posit-dev/positron/assets/130578277/c871f5ee-6e8e-483c-b919-c8df549e3407 Logs for failing ??glue and ?glue::glue vscode-app-1720476182716 - log for calling glue package.txt vscode-app-1720476212101 - log for calling glue function [failure].txt

iamYannC avatar Jul 08 '24 22:07 iamYannC

It would also be helpful to see your Console: R x.y.z output channel logs.

  • Toggle Command Palette
  • Search for Output: Show output channels
  • Choose the one for Console: R x.y.z where x.y.z is your version
  • Copy the entire log and paste it in or upload as a .log file
Screenshot 2024-07-09 at 6 00 02 PM

DavisVaughan avatar Jul 09 '24 16:07 DavisVaughan

Console R 4.4.0.log

I think i keep getting these SEND heartbeat w tout 30 secs line printed.. I am curious to know if i am the only one with these issues

iamYannC avatar Jul 09 '24 18:07 iamYannC

Did you try and perform a help request before you captured those logs? I don't see a help request attempt anywhere in the logs. The heartbeat is normal.

DavisVaughan avatar Jul 13 '24 06:07 DavisVaughan

I also have the same issue: when typing ??function or help, the help window does not display properly and only shows a web link. image

dengyuyueyuyue avatar Jul 13 '24 12:07 dengyuyueyuyue

Did you try and perform a help request before you captured those logs? I don't see a help request attempt anywhere in the logs. The heartbeat is normal.

Console R 4.4.0.log

2024-07-13T20:17:22.817219Z ERROR No help port is available to check if 'http://127.0.0.1:31109/library/base/html/mean.html' is a help url. Is the help comm open? [R] at crates\ark\src\interface.rs:1435

Another attempt yielded that line (log not attached):

2024-07-13T20:21:49.851336Z ERROR Error proxying http://localhost:14414/library/base/html/mean.html: error sending request for url (http://localhost:14414/library/base/html/mean.html): connection error: An established connection was aborted by the software in your host machine. (os error 10053)

iamYannC avatar Jul 13 '24 20:07 iamYannC

I also have the same issue: when typing ??function or help, the help window does not display properly and only shows a web link. image

https://youtu.be/DfxWhM8YTcw?t=202 Seems like we are not alone, also in python

iamYannC avatar Jul 15 '24 11:07 iamYannC

I'm bumping this back to triage since multiple people are running into this problem.

juliasilge avatar Jul 15 '24 21:07 juliasilge

@iamYannC the Console: R logs are quite helpful, thanks!

DavisVaughan avatar Jul 15 '24 22:07 DavisVaughan

@iamYannC okay one more request. Please do exactly what you did before with the logs, but first go into Settings (Cmd + , on Mac) and change this setting to trace and then completely restart Positron. Forgot to tell you that earlier, so sorry.

Screenshot 2024-07-15 at 6 13 35 PM

DavisVaughan avatar Jul 15 '24 22:07 DavisVaughan

@iamYannC okay one more request. Please do exactly what you did before with the logs, but first go into Settings (Cmd + , on Mac) and change this setting to trace and then completely restart Positron. Forgot to tell you that earlier, so sorry.

Screenshot 2024-07-15 at 6 13 35 PM

Console R 4.4.0 with trace.log I restarted positron after modifying the R log, but I still got this "Debug": image

Just in case, I will restart and do that ?mean one more time, this time with a trace also in the console window: Console R 4.4.0 with trace 2.log

iamYannC avatar Jul 21 '24 12:07 iamYannC

I have the same problem, which never happened before. Even after I restart my Mac and updated Positron.

Positron Version: 2024.07.0 (Universal) build 85 Code - OSS Version: 1.91.0 Commit: 9dfa34e1eb5a42ebbd1c1d17b55bef7e7bf0bf1f Date: 2024-07-22T04:48:59.704Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

2024-07-22_positron.log Screenshot 2024-07-22 at 16 32 18

CongSIBR avatar Jul 22 '24 08:07 CongSIBR

It's amazing, after working with VS Code for a while, I accidentally discovered that the positron issue was resolved! It's working now! I can see the help information. I wonder if this issue could be related to VS Code.

CongSIBR avatar Jul 22 '24 09:07 CongSIBR

We haven't yet linked this discussion where folks are having similar problems: https://github.com/posit-dev/positron/discussions/3738

juliasilge avatar Jul 23 '24 17:07 juliasilge