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

vsCode Enxtension Not Respecting no_ssl_verify #111

Closed
mpearon opened this issue Jul 17, 2019 · 24 comments
Closed

vsCode Enxtension Not Respecting no_ssl_verify #111

mpearon opened this issue Jul 17, 2019 · 24 comments
Assignees
Labels

Comments

@mpearon
Copy link

mpearon commented Jul 17, 2019

My vsCode extension is stuck in "Wakatime Initializing..." status.
I am fairly certain that this is due to a recent deep packet inspection protocol my employers have implemented.
I'm using wakatime.exe to send heartbeats from an interactive console, and that data appears to be reaching Wakatime (my evidence is that it is showing up on the console), but data from the extension does not appear to be respecting the cfg file stored in my profile.

I'm not sure where the logs for the extension actually land, or I would attach them to this case.

@gandarez
Copy link
Member

Please check if debug mode is turned on in your vscode wakatime plugin settings. To check, press F1 then type wakatime debug and press Enter. If it's current value is false, turn it on with true.

Then, let's check your ~\.wakatime.log file which should have some more log lines now.

@gandarez gandarez self-assigned this Jul 17, 2019
@mpearon
Copy link
Author

mpearon commented Jul 17, 2019

I turned on debug and bounced vsCode.
Interestingly, nothing showed up in the log at all until I deleted the file and let the ext. recreate it...but now I'm seeing my editor appear in the web console, even though the status bar is still showing "WakaTime Initializing..."

@mpearon
Copy link
Author

mpearon commented Jul 17, 2019

{"now": "2019/07/17 13:25:08 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387906.840242, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\logger.py", "lineno": 62, "file": "c:\\Users\\username\\.wakatime.log", "level": "DEBUG", "message": "Traceback (most recent call last):\n  File \"c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\stats.py\", line 121, in guess_lexer_using_filename\n    lexer = custom_pygments_guess_lexer_for_filename(file_name, text)\n  File \"c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\stats.py\", line 321, in custom_pygments_guess_lexer_for_filename\n    raise ClassNotFound('no lexer for filename %r found' % fn)\npygments.util.ClassNotFound: no lexer for filename '.wakatime.log' found\n"}
{"now": "2019/07/17 13:25:08 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387906.840242, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "file": "c:\\Users\\username\\.wakatime.log", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:25:08 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387906.840242, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "file": "c:\\Users\\username\\.wakatime.log", "level": "DEBUG", "message": "[{'time': 1563387906.840242, 'entity': 'C:/users/username/.wakatime.log', 'type': 'file', 'category': None, 'is_write': False, 'project': None, 'branch': None, 'language': None, 'dependencies': [], 'lines': 1, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:25:10 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387906.840242, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "file": "c:\\Users\\username\\.wakatime.log", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': '8e9db2d9-4b13-46a3-a3a8-5f35f3b3c6c2'}}, 201]]}"}
{"now": "2019/07/17 13:26:35 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387993.5104046, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "file": "c:\\Users\\username\\Desktop\\getFridays.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:26:35 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387993.5104046, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "file": "c:\\Users\\username\\Desktop\\getFridays.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:26:35 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387993.5104046, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "file": "c:\\Users\\username\\Desktop\\getFridays.ps1", "level": "DEBUG", "message": "[{'time': 1563387993.5104046, 'entity': 'C:/users/username/desktop/getfridays.ps1', 'type': 'file', 'category': None, 'is_write': False, 'project': None, 'branch': None, 'language': 'PowerShell', 'dependencies': [], 'lines': 10, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:26:36 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563387993.5104046, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "file": "c:\\Users\\username\\Desktop\\getFridays.ps1", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': '1de5e96c-c3ef-4c05-a4ff-1ce09d3f941a'}}, 201]]}"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388004.9373066, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388004.9373066, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388004.9373066, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "[{'time': 1563388004.9373066, 'entity': 'C:/users/username/desktop/parseics.ps1', 'type': 'file', 'category': None, 'is_write': False, 'project': None, 'branch': None, 'language': 'PowerShell', 'dependencies': [], 'lines': 39, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388006.1503155, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388006.1503155, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:26:47 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388006.1503155, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "[{'time': 1563388006.1503155, 'entity': 'C:/users/username/desktop/parseics.ps1', 'type': 'file', 'category': None, 'is_write': True, 'project': None, 'branch': None, 'language': 'PowerShell', 'dependencies': [], 'lines': 39, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:26:48 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388004.9373066, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': '62800c0f-d1c7-4610-adb0-35c11b9b02d6'}}, 201]]}"}
{"now": "2019/07/17 13:26:48 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388006.1503155, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': 'ad562ced-f10a-4274-8117-a1903de6edaa'}}, 201]]}"}
{"now": "2019/07/17 13:29:02 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388141.2464306, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:29:02 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388141.2464306, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:29:02 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388141.2464306, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "[{'time': 1563388141.2464306, 'entity': 'C:/users/username/desktop/parseics.ps1', 'type': 'file', 'category': None, 'is_write': False, 'project': None, 'branch': None, 'language': 'PowerShell', 'dependencies': [], 'lines': 39, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:29:03 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388141.2464306, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': '041082d4-df66-456d-a1f6-204b89254449'}}, 201]]}"}
{"now": "2019/07/17 13:29:11 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388150.0220928, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:29:11 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388150.0220928, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2019/07/17 13:29:11 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388150.0220928, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 59, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "[{'time': 1563388150.0220928, 'entity': 'C:/users/username/desktop/parseics.ps1', 'type': 'file', 'category': None, 'is_write': True, 'project': None, 'branch': None, 'language': 'PowerShell', 'dependencies': [], 'lines': 39, 'lineno': None, 'cursorpos': None, 'user_agent': 'wakatime/12.0.0 (Windows-10-10.0.18362-SP0) Python3.7.1.final.0 vscode/1.36.1 vscode-wakatime/2.1.2'}]"}
{"now": "2019/07/17 13:29:12 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388150.0220928, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 282, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "{'response_code': 202, 'results': [[{'data': {'id': '6dae08c4-016b-4b17-adce-917babdff760'}}, 201]]}"}
{"now": "2019/07/17 13:31:33 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388290.092836, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\dependencies\\__init__.py", "lineno": 122, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Parsing dependencies not supported for shell.PowerShellParser"}
{"now": "2019/07/17 13:31:33 -0500", "version": "12.0.0", "plugin": "vscode/1.36.1 vscode-wakatime/2.1.2", "time": 1563388290.092836, "caller": "c:\\Users\\username\\.vscode\\extensions\\wakatime.vscode-wakatime-2.1.2\\wakatime-master\\wakatime\\api.py", "lineno": 53, "is_write": true, "file": "c:\\Users\\username\\Desktop\\parseIcs.ps1", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}

@mpearon
Copy link
Author

mpearon commented Jul 17, 2019

Well, that's ugly. I'll upload a file instead.
wt.log

@alanhamlett
Copy link
Member

Everything looks normal in your log file. The last heartbeat was sent today at 2019/07/17 13:31:33 -0500 from your vscode. Are there any error messages in your vscode console window?

@mpearon
Copy link
Author

mpearon commented Jul 18, 2019

@alanhamlett I agree with you. Of course, it had to make a liar out of me...typical!
There are no errors at this point, just the persistent "WakaTime Initializing..." indicator.
image

@alanhamlett
Copy link
Member

What if you toggle showing/hiding the status bar in your plugin settings? F1 -> wakatime status bar enabled -> false, then back to true?

@alanhamlett
Copy link
Member

Also, if you open the vscode console window then refresh vscode (F5?) are there any console errors when the plugin loads? Refreshing the console simulates vscode startup so you get to see all errors in the plugin's initialization process.

@mpearon
Copy link
Author

mpearon commented Jul 18, 2019

@alanhamlett
Toggling the status bar does not seem to have an effect.

Yes, I see some mention of certificate errors (line 121).
vsconsole.log

@alanhamlett
Copy link
Member

Yes, looks like it's an SSL cert issue. Are you using a corporate proxy?

Error: unable to get local issuer certificate

@mpearon
Copy link
Author

mpearon commented Jul 18, 2019 via email

@alanhamlett
Copy link
Member

Hmm, wakatime for vscode only disables cert verification when sending heartbeats. I'll update this plugin to respect no_ssl_verify also when initializing.

Related, just browsing the source I've spotted a few unhandled promises that would cause the stuck Initializing... message.

@alanhamlett
Copy link
Member

Should be fixed with v2.2.0.

@mpearon
Copy link
Author

mpearon commented Jul 23, 2019

Update: Post v2.2.0, I'm still getting the "WakaTime Initializing..." indicator, but I'm not seeing any errors in the log.

@mpearon
Copy link
Author

mpearon commented Aug 2, 2019

@alanhamlett Just making sure you got that last notification. I think closed issues alert differently.

@alanhamlett alanhamlett reopened this Aug 2, 2019
@alanhamlett
Copy link
Member

Thanks for the mention, I didn't get the notification before.

Do you see errors when doing the console window refresh?

@mpearon
Copy link
Author

mpearon commented Aug 2, 2019

I do see mention of cert issues (line 112).
vsconsole.txt

I assume you were wanting me to look in the dev tools. I didn't see anything in the Output Panel.

@alanhamlett
Copy link
Member

This error might be causing WakaTime to detect python as installed when it's actually just a placeholder binary:
Invalid python version: Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640

Does the plugin start working if you download and install Python into the default location from:
https://www.python.org/downloads/

@mpearon
Copy link
Author

mpearon commented Aug 12, 2019

I ran that installer, and it suggested the same path at which I have Python installed:
C:\Users\USER_NAME\AppData\Local\Programs\Python\Python37-32\

I went ahead and ran the upgrade, though.

@alanhamlett
Copy link
Member

Let's just manually download and extract wakatime.zip to:
C:\Users\username\.vscode\extensions\wakatime.vscode-wakatime-2.2.0\wakatime-master

Make sure the file exists in this location after extracting:
C:\Users\username\.vscode\extensions\wakatime.vscode-wakatime-2.2.0\wakatime-master\wakatime\cli.py

Then restart vscode. It should still try and fail to download wakatime-cli but it should start working after typing in a file.

@mpearon
Copy link
Author

mpearon commented Aug 22, 2019

Sorry about the delay on this. I've just extracted that and have stared to play around in a file.
I'm still seeing the "Wakatime Initializing..." indicator.

@gandarez
Copy link
Member

@mpearon is it still happening?

@mpearon
Copy link
Author

mpearon commented Jan 28, 2020

@gandarez It appears to have been resolved! I should have updated this a while back...I’m sorry!

@gandarez
Copy link
Member

No worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants