wakatime-cli icon indicating copy to clipboard operation
wakatime-cli copied to clipboard

Cannot open PowerPoint files hosted on sharepoint (https)

Open 64q opened this issue 2 years ago • 6 comments

Hi guys,

The present issue seems to be related to #426.

Wakatime is unable to sync the activity performed in PowerPoint when I work on a file hosted on a SharePoint accessed through https.

Expected behavior (what should have happened):

Wakatime should be able to grab the activity from the file opened though PowerPoint (hosted on sharepoint)

Actual behavior (what went wrong):

The file is not found by wakatime, resulting in no data collected by wakatime.

{"now": "2022/03/01 17:30:21 +0100", "version": "13.0.7", "plugin": "powerpoint/16.0 powerpoint-wakatime/2.1.0", "time": 1646152217.610504, "caller": "wakatime\\main.py", "lineno": 68, "is_write": true, "file": "https://xxx.sharepoint.com/personal/yyy/Documents/01 - XXX/10 - YYY/03 - ZZZ/13 - XXX/file.pptx", "level": "DEBUG", "message": "File does not exist; ignoring this heartbeat."}

Environment:

  • OS: Windows 10
  • Platform: amd64

Logs:

{"now": "2022/03/01 17:30:21 +0100", "version": "13.0.7", "plugin": "powerpoint/16.0 powerpoint-wakatime/2.1.0", "time": 1646152217.610504, "caller": "wakatime\\main.py", "lineno": 68, "is_write": true, "file": "https://xxx.sharepoint.com/personal/yyy/Documents/01 - XXX/10 - YYY/03 - ZZZ/13 - XXX/file.pptx", "level": "DEBUG", "message": "File does not exist; ignoring this heartbeat."}

Thanks.

64q avatar Mar 01 '22 17:03 64q

If you visit that https://xxx.sharepoint.com/personal/yyy/Documents/01 - XXX/10 - YYY/03 - ZZZ/13 - XXX/file.pptx url in your browser does it load the file? I'm just curious if any authentication is needed to access files on sharepoint. If no auth is needed, it should be very simple for us to get that file over https, the same way we do for ssh and sftp in #426.

alanhamlett avatar Mar 01 '22 17:03 alanhamlett

If you visit that https://xxx.sharepoint.com/personal/yyy/Documents/01 - XXX/10 - YYY/03 - ZZZ/13 - XXX/file.pptx url in your browser does it load the file? I'm just curious if any authentication is needed to access files on sharepoint. If no auth is needed, it should be very simple for us to get that file over https, the same way we do for ssh and sftp in #426.

You are right, the file is hosted on a sharepoint behind a corporate authentification. So wakatime is unable to fetch the file because of that. What I found odd is that the file is synced locally with OneDrive and it seems to use the URL in the HTTP form and not a local drive access.

64q avatar Mar 01 '22 17:03 64q

Looks like the Office and Powerpoint extensions are still using the legacy wakatime-cli. First we need to update them to use this repo, then we can add support for reading sharepoint files over http(s).

alanhamlett avatar Mar 03 '22 20:03 alanhamlett

Switching to the new Go wakatime-cli with https://github.com/wakatime/nuget-wakatime-shared-extension-utils/pull/5.

alanhamlett avatar Mar 03 '22 21:03 alanhamlett

@64q now that WakaTime for PowerPoint uses the new wakatime-cli, does it work when editing sharepoint files or is more work needed?

alanhamlett avatar Jun 19 '22 10:06 alanhamlett

PowerPoint still uses legacy cli.

gandarez avatar Jun 20 '22 19:06 gandarez