-
Notifications
You must be signed in to change notification settings - Fork 98
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
Extension is no longer tracking time #291
Comments
I see "Cross-Origin Request Blocked" in the logs. I believe that 88cd994 caused the issue. That commit removed However, adding back By the way, I think we can use manifest v3 for Firefox to be consistent with Chrome. |
#161 was opened just 2 days after Firefox 109 with MV3 support was released. I guess that was the reason to keep using MV2 for Firefox. Now it makes sense to migrate to MV3 for Firefox. |
1. Add permission for (api.)wakatime.com on Firefox. 2. Request permission for the API URL set by the user. 3. Restrict content script to run on meet.google.com only. This involves some strange logic about the host permissions: - If an origin is listed in `content_scripts.matches`, then the browser shows that the extension has permission to access data on that website. However, the background service worker cannot send cross-site requests to that URL. - If an origin is listed in both `content_scripts.matches` and `optional_host_permissions`, then the background service worker can send cross-site requests to that URL. So it's not possible to inject content scripts on all websites but conditionally ask for cross-site request permissions for specific websites only. Now it seems that the content script only works for meet.google.com. More websites may be added if needed later. An alternative solution is to use `scripting.registerContentScripts()` to dynamically register content script for websites, so that users can reject permissions on some websites and continue to use the extension. This could be implemented later. This should fix wakatime#291
@ouuan Is there any workaround to get this working for now? Surely I'm not the only one experiencing this issue? |
First, I want to make sure whether you are using the official WakaTime server (https://api.wakatime.com/) and whether you are using Chrome or Firefox. According to your screenshot, it seems that you are using Chrome. However, based on my experiments, the CORS request failure only happens for Firefox and custom WakaTime servers. For further troubleshooting:
|
@ouuan Thank you for getting back to me.
Is there anything else I can look at to find the issue? |
What about the "Site Access" under "Permissions"? You can change the permissions there.
Also check the Network tab. Switch between tabs and go back to the service worker inspector to see if heartbeats are sent. |
I have this: Can't find anything regarding Site Access under: Checking the network tab whilst flipping through a few sites I get the below: This is all being performed whilst using Chrome on Windows. I thought I should give it a try using Chrome on Mac and its the same result. I also tried using Chrome in Incognito mode with only the Wakatime extension enabled to remove any doubt of a conflicting extension, and it's the same outcome. |
This always shows me my current time from when I work and track time through VSCode. And when I inspect the extension and then click on the icon I get the same network result as per my previous screenshot. When I reinstalled the extension, I also removed all of my included sites and tested with one site to track thinking that maybe one of my configured sites was causing an issue but even with just using once site, no tracking came through. I tried with a few sites individually to get a good sample set of tests and none of them worked. Investigating a bit further, in the previous version when it did work. When you added a new site you needed to add "@@" after the URL to track so that it came up in Wakatime under the category/name you wanted. I just checked now, and the example provided no longer includes the "@@" perhaps this is my problem? |
@ouuan Alright, it's tracking it now, but it's not logging it under the correct Project. Now that the "@@" functionality has been removed... I see that I have to add it under projects in order to get it to correctly log under the right project as it was logging it under a completely irrelevant project name. Looks like there was no issue with the extension, just configuration changes that I was unaware of after the most recent update. I just double-checked the GitHub page and there isn't any reference to this configuration. Anyway, glad its working now. Thanks for the help. |
Fine, so we are encountering different issues. Glad to see yours is now resolved. I think you can close this issue as this thread is now off-topic for my issue on Firefox. |
Good luck! |
Ever since the most recent update to the extension, it has stopped tracking time. I have tried removing it and configuring it all again, but the result is the same.
Are there any logs that I can look at to see why nothing is being logged? It worked well for months.
The text was updated successfully, but these errors were encountered: