wakatime / delphi-wakatime

Embarcadero Delphi plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/delphi
BSD 3-Clause "New" or "Revised" License
29 stars 6 forks source link

Wakatime not working on Delphi 11.3 Alexandria #2

Closed mobius1qwe closed 11 months ago

mobius1qwe commented 12 months ago

Describe the bug After adjusting the source code, the include file, the version number of the latest released wakatime-cli (1.73.1 x64 for me), creating the package, building it and installing on the IDE, inputting the token, all steps following the guide under README.md, toggled the waka form on debug mode to list everything on the log, it doesn't show errors but doesn't send anything to the wakatime dashboard either.

I also tried using the 32 bit client of windows thinking it could be something about the bitness but still nothing.

To Reproduce Steps to reproduce the behavior:

  1. install Delphi 11.3,
  2. follow the steps of the README.md from this repository,
  3. toggle debug mode on the wakatime form under IDE
  4. do something with some project,
  5. open your wakatime account on the dashboard page
  6. nothing will show, saying that nothing was received by the plugin.

Expected behavior at least a response message from wakatime-cli to understand what kind of error happened and how to fix it or not getting any messages but the dashboard or anywhere in the website would show what happened, either error or success.

Desktop (please complete the following information):

mobius1qwe commented 12 months ago

Quick Update: I made several changes that I think made the plugin work, will do further testing to check if its true. I won't be able to test on every platform tho.

diegomgarcia commented 12 months ago

Hi @mobius1qwe did you try to install from get it package manager? It’s already available there for the new versions of the IDE =)

Also the new version you don’t need to manually install the cli anymore. It should install automatically after you install the package on the IDE.

I will try to install the beta version of this Delphi that you report it to simulate it and check if it will work fine and report it back to you as son I’ve done the tests.

mobius1qwe commented 11 months ago

I don't use GetIt as it hardly has anything useful and most of the time I have to search github for solutions anyways.

Also the new version you don’t need to manually install the cli anymore. It should install automatically after you install the package on the IDE.

The autoinstall part doesn't work, at least it didn't for me, I had to manually create the .wakatime folder, get the client, put it inside the folder, rename it, go into Tools menu, enable debug checkbox so it could properly create the log file to then try to see why it wasn't working.

The autoinstall part tries to run powershell to perform wget on the file, In my case I believe it won't work at all because I have a few delphi versions installed so my environment variable path is overriden on every delphi version to remove IDE path conflict. I don't know if powershell needs a specific env. path or whatever, but it never gets called. I'm using windows 10, ps is installed by default on win11, I had to manually install mine and its not on the default windows folder as anything that I install manually never is.

diegomgarcia commented 11 months ago

Ah I see it.

thanks for your detailed overview of your setup.

Indeed the auto install/update will just work if you already have the power shell installed. Also the Rad Studio environment path shouldn’t be impacting the WakaTime cli as we don’t use any binaries from or files referenced by. The setup just get it from the windows environment your profile folder to create the .wakatime folder. So this shouldn’t be impacting.

One thing that I opted to rely on powershell was to avoid Indy dependencies across the Delphi versions, or to have to implement the http get manually across windows versions. However you pointed an important information that is missing on the readme.md that is the dependency of power shell that is not documented.

I will prepare a VM with the same windows that you reported here and install the Alexandria trial to test it and define additional fail checks to warn for missing power shell installation and etc.

If you can provide me how you are starting your Delphi passing the path etc it would be great so I can simulate it here. I have this kind of setup here but just on my build server and maybe it could be different then the one you are using it.

mobius1qwe commented 11 months ago

I can submit the changes I've made so far on the project that is now working for me properly. Should I send a PR to dev branch or master branch?

diegomgarcia commented 11 months ago

Thats great!

Please submit to the development branch so I can review.

mobius1qwe commented 11 months ago

I found several diferences from my master source version and the development version which made me test the dev package first to check if the same issue happened. As far as I can tell it did but this time I didn't had to add the --key command to the param list, something was wrong with the source I had or maybe the env path.

diegomgarcia commented 11 months ago

Ohh maybe you have an old version before some fixes that was done on the final version.

I will review your PR.

diegomgarcia commented 11 months ago

Thanks @mobius1qwe, I've reviewed your PR and integrated to the main repo. As you've tested and it's working I will close this issue, however I have some updates to do it based on our conversation.