Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting notifications for forwarded ports #117790

Closed
connor4312 opened this issue Feb 26, 2021 · 13 comments
Closed

Not getting notifications for forwarded ports #117790

connor4312 opened this issue Feb 26, 2021 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug remote-explorer Remote explorer view
Milestone

Comments

@connor4312
Copy link
Member

@alexr00 it seems like I'm not getting notifications for any forwarded ports, even if I explicitly configure them. Is this is a separate bug?

Originally posted by @connor4312 in #114448 (comment)

To reproduce:

  • Try a sample / start a Node.js container
  • npm install -g serve
  • Run serve anyhere
@alexr00
Copy link
Member

alexr00 commented Mar 1, 2021

Interesting. I'm still not able to repro. I used SSH. I ran serve.

@connor4312 can you run the command Terminal: Toggle Escape Sequence Logging, repro, then share all the console output? There should be a bunch of terminal logs.

@connor4312
Copy link
Member Author

connor4312 commented Mar 1, 2021

Sure, here you go:

xterm.js: sending data "
" [13]
LogService.ts:76 xterm.js: parsing data 

LogService.ts:76 xterm.js: parsing data �[31mERROR:�[39m Cannot copy to clipboard: Couldn't find the required `xsel` binary. On Debian/Ubuntu you can install it with: sudo apt install xsel
�[32m�[39m
�[32m   ┌───────────────────────────────────────────────────┐�[39m
   �[32m│�[39m                                                   �[32m│�[39m
   �[32m│�[39m   �[32mServing!�[39m                                        �[32m│�[39m
   �[32m│�[39m                                                   �[32m│�[39m
   �[32m│�[39m   �[1m- Local:�[22m            http://localhost:5000       �[32m│�[39m
   �[32m│�[39m   �[1m- On Your Network:�[22m  http://192.168.148.2:5000   �[32m│�[39m
   �[32m│�[39m                                                   �[32m│�[39m
�[32m   └───────────────────────────────────────────────────┘�[39m
�[32m�[39m

Screenshot: https://memes.peet.io/img/21-03-8ffe8a86-5d1c-4355-b187-02f30b4feef7.png

@alexr00
Copy link
Member

alexr00 commented Mar 2, 2021

Thanks, that all looks good.

I'll add some additional trace logging then we'll take a look at that.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug remote-explorer Remote explorer view labels Mar 2, 2021
@alexr00 alexr00 added this to the March 2021 milestone Mar 2, 2021
@alexr00
Copy link
Member

alexr00 commented Mar 11, 2021

All the new logging should be available in insiders. Can you please:

  1. Run the command "Set Log Level" -> "Trace".
  2. Repro the problem.
  3. Share logs from the output panel. The relevant logs will be in "Log (Window)", "Log (Extension Host)", "Log (Remote Extension Host)".

@connor4312
Copy link
Member Author

Window:

[2021-03-11 10:54:19.418] [renderer4] [trace] ForwardedPorts: (TunnelModel) removed candidates 
[2021-03-11 10:54:20.846] [renderer4] [trace] CommandService#executeCommand setContext

Ext host: nothing

Remote ext host:

[2021-03-11 10:54:10.981] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716
[2021-03-11 10:54:13.039] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716
[2021-03-11 10:54:15.079] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716
[2021-03-11 10:54:17.133] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716
[2021-03-11 10:54:19.271] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:20.698] [exthost] [trace] ExtHostCommands#executeCommand setContext
[2021-03-11 10:54:21.064] [exthost] [trace] ExtHostSCM#$provideOriginalResource 0 vscode-userdata:/c%3A/Users/Connor/AppData/Roaming/Code%20-%20Insiders/User/settings.json
[2021-03-11 10:54:21.337] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:23.378] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:25.430] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:27.475] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:29.517] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:31.554] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:33.593] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:35.634] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:37.672] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:38.488] [exthost] [trace] ExtHostCommands#executeCommand setContext
[2021-03-11 10:54:38.870] [exthost] [trace] ExtHostSCM#$provideOriginalResource 0 vscode-userdata:/c%3A/Users/Connor/AppData/Roaming/Code%20-%20Insiders/User/settings.json
[2021-03-11 10:54:39.708] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:41.753] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:43.790] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000
[2021-03-11 10:54:45.839] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 1716, 5000

@alexr00
Copy link
Member

alexr00 commented Mar 12, 2021

@connor4312 that all looks right. And, I can see from your original screenshot that we're picking up the process command line correctly too. What operating system are you using?

@connor4312
Copy link
Member Author

This is running Windows connecting to an Ubuntu remote

@connor4312
Copy link
Member Author

Also happy to screen/liveshare if that's easier :)

alexr00 added a commit that referenced this issue Mar 18, 2021
@alexr00
Copy link
Member

alexr00 commented Mar 22, 2021

@connor4312 I have added even more logging. Would you be able to do #117790 (comment) again?

@connor4312
Copy link
Member Author

Sure, here you go:

Log (window)

[2021-03-22 10:32:28.572] [renderer2] [trace] ForwardedPorts: (TunnelService) openTunnel request for localhost:5000 on local port undefined.
[2021-03-22 10:32:28.572] [renderer2] [trace] ForwardedPorts: (TunnelService) Creating tunnel without provider localhost:5000 on local port undefined.
[2021-03-22 10:32:28.573] [renderer2] [trace] ForwardedPorts: (TunnelService) Tunnel created without provider.
[2021-03-22 10:32:28.575] [renderer2] [trace] ForwardedPorts: (TunnelService) New tunnel established.
[2021-03-22 10:32:28.580] [renderer2] [trace] ForwardedPorts: (TunnelModel) restoring ports 5000
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (TunnelModel) restoring ports 
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) Starting action for 5000
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: 5000
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) Heuristic chose 5000
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is notify
[2021-03-22 10:32:28.585] [renderer2] [trace] ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification 27848 ms
[2021-03-22 10:32:30.407] [renderer2] [trace] ForwardedPorts: (TunnelModel) removed candidates 

Log (Remote Extension Host)

[2021-03-22 10:32:23.450] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716
[2021-03-22 10:32:25.494] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) number of possible root ports 14
[2021-03-22 10:32:25.506] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) heuristic ports 
[2021-03-22 10:32:25.506] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716
[2021-03-22 10:32:27.550] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) number of possible root ports 14
[2021-03-22 10:32:27.562] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) heuristic ports 
[2021-03-22 10:32:27.562] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716
[2021-03-22 10:32:29.608] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) number of possible root ports 14
[2021-03-22 10:32:29.621] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) heuristic ports 
[2021-03-22 10:32:29.621] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716
[2021-03-22 10:32:31.668] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) number of possible root ports 14
[2021-03-22 10:32:31.680] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) heuristic ports 
[2021-03-22 10:32:31.680] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716, 5000
[2021-03-22 10:32:33.732] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) number of possible root ports 14
[2021-03-22 10:32:33.744] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) heuristic ports 
[2021-03-22 10:32:33.744] [exthost] [trace] ForwardedPorts: (ExtHostTunnelService) found candidate ports 53300, 53469, 53728, 1716, 5000

Log (Extension Host): empty

@alexr00
Copy link
Member

alexr00 commented Mar 23, 2021

It looks like for some reason we think that your window of VS Code doesn't have focus. Is there anything interesting about your setup that might contribute to this?

@connor4312
Copy link
Member Author

hm, nothing that comes to mind. I haven't noticed focus behavior issues in other parts of VS Code or other applications.

@alexr00 alexr00 modified the milestones: March 2021, April 2021 Mar 24, 2021
@alexr00
Copy link
Member

alexr00 commented Nov 10, 2021

Closing since there haven't been any other reports of this issue.

@alexr00 alexr00 closed this as completed Nov 10, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug remote-explorer Remote explorer view
Projects
None yet
Development

No branches or pull requests

2 participants