wakatime / ssms-wakatime

SQL Server Management Studio plugin to quantify your coding with automatic time tracking and metrics about your programming. https://wakatime.com
BSD 3-Clause "New" or "Revised" License
40 stars 19 forks source link

Unknown Error upon starting SSMS Express 2014 #1

Closed ckempo closed 4 years ago

ckempo commented 8 years ago

Starting SSMS Express 2014 results in the following error message being displayed:

---------------------------
Microsoft SQL Server Management Studio
---------------------------
The Add-in 'WakaTime' failed to load or caused an exception.
Would you like to remove this Add-in?
If you choose yes, the file it was loaded from, 'C:\ProgramData\Application Data\Microsoft\MSEnvShared\Addins\WakaTime.Addin', will be renamed.

Error Message: <Unknown Error>
Error number: 80131515
---------------------------
Yes   No   
---------------------------

Is this just a case of the latest release not being supported? I've got other addins loading without issue so it doesn't seem to be a direct issue with SSMS, I think.

CatalinRadoi commented 8 years ago

I have the exact same error :(

jansenfuller commented 8 years ago

Seems to be a recent error. Tried installing it today and got the same error number

CrowderSoup commented 8 years ago

I just got the same error as well :cry:

jansenfuller commented 8 years ago

Found a possible fix. Re-download the most recent release (1.0.1 for me) after that right click the file and there should be a check box at the bottom saying 'unblock' alt text Check it and apply and hit Okay. Due to the plugin being a .dll and needing to connect to the internet, Windows automatically disables it and doesn't allow it to work.

Hope that helps

gandarez commented 8 years ago

Have you changed to the correct path after downloaded the binary? 0x80131515 - Could not load file or assembly

This is how I set mine:

E:\Git\gandarez\ssms-wakatime\bin\Debug\WakaTime.dll

Also please update your plugin since I just release a new version https://github.com/gandarez/ssms-wakatime/releases/tag/v1.0.2

juunas11 commented 8 years ago

I was getting the same error I think. I got it working after:

Though when it started, it asked to install Python but ran into some problem. So I installed Python 3.5.1 manually. Now SSMS starts up properly and there no complaints. However it does not ask for my API key and the menu item WakaTime is grayed out.

I got this log file:

2016-05-10 10:11:06.1144|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:11:06.3144|ERROR|WakaTime.Logger|GetPathFromMicrosoftRegister:: System.NullReferenceException: Object reference not set to an instance of an object.
   at WakaTime.PythonManager.GetPathFromMicrosoftRegister()
2016-05-10 10:11:33.6564|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
2016-05-10 10:11:33.6750|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:11:33.6750|ERROR|WakaTime.Logger|GetPathFromMicrosoftRegister:: System.NullReferenceException: Object reference not set to an instance of an object.
   at WakaTime.PythonManager.GetPathFromMicrosoftRegister()
2016-05-10 10:12:01.5368|ERROR|WakaTime.Logger|GetPathFromMicrosoftRegister:: System.NullReferenceException: Object reference not set to an instance of an object.
   at WakaTime.PythonManager.GetPathFromMicrosoftRegister()
2016-05-10 10:12:11.7878|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
2016-05-10 10:17:38.9552|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:17:40.6287|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
2016-05-10 10:17:40.6443|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:17:41.0766|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
2016-05-10 10:19:35.6214|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:19:36.5605|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
2016-05-10 10:19:36.5982|INFO|WakaTime.Logger|Initializing WakaTime v1.0.2
2016-05-10 10:19:37.0301|INFO|WakaTime.Logger|Finished initializing WakaTime v1.0.2
jnickle commented 6 years ago

Thanks for this thread. Directions for install state "right click and select unblock". They should say "Right click and select properties. Then select the Unblock Option. Apply changes and close/save". got me past this step.

gandarez commented 5 years ago

Just released a new version to support v2012+

Download and follow the instructions https://github.com/gandarez/ssms-wakatime/releases/tag/v2.0.0

mattr2882 commented 5 years ago

I am receiving the following error message after following all of the instructions with the new download. I am trying to install this update to SSMS 2014 on a Windows 10 machine.

Error Message displayed upon opening SSMS:

There was a problem loading the Add-in file C:\users\xxxxxx\AppData\Roaming\Microsoft\MSEnvShared\Addins\WakaTime.AddIn Would you like to remove this Add-in file? If you choose yes, the file will be renamed and no Add-ins will be loaded from it.

Error (Line 1): Switch from current encoding to specified encoding not supported.

Any help with solving this issue is greatly appreciated.

mattr2882 commented 5 years ago

#

I am receiving the following error message after following all of the instructions with the new download. I am trying to install this update to SSMS 2014 on a Windows 10 machine. Error Message displayed upon opening SSMS: There was a problem loading the Add-in file C:\users\xxxxxx\AppData\Roaming\Microsoft\MSEnvShared\Addins\WakaTime.AddIn Would you like to remove this Add-in file? If you choose yes, the file will be renamed and no Add-ins will be loaded from it. Error (Line 1): Switch from current encoding to specified encoding not supported. Any help with solving this issue is greatly appreciated.

Resolved this issue by removing the first line in the add-in file which is used to set the encoding to UTF-16. This allowed my to get past this error. I am now being prompted to install python even though it is already installed. I am also seeing "WakaTime" option greyed out in the "Tools" Menu.

Again any help with this is greatly appreciated.

mattr2882 commented 5 years ago

I have uninstalled Python 3.7 and installed Python 2.7.16 and now the prompt to install Python has gone away which is good. My issue now is the wakatime menu shows under my tools but It is greyed out / disabled. So cannot change / set my api key.

How can I get my wakaTime API key entered in SSMS 2014?

gandarez commented 5 years ago

@mattr2882 try running as administrator

mattr2882 commented 5 years ago

@gandarez I do not have that luxury to run as administrator. Is there a way to manually add the API Key to the code to bypass this process? Or maybe a way in the code to turn off the piece that is causing the option to be greyed out in the tools menu?

gandarez commented 5 years ago

sure, you can add it manually into the .wakatime.cfg file.

https://github.com/wakatime/wakatime#configuring

mattr2882 commented 5 years ago

@gandarez Where is this file located when using SSMS 2014? Do I have to create it or is it already existing? Thanks!

gandarez commented 5 years ago

@mattr2882 this file is located at C:\Users\<<user>>\.wakatime.cfg for Windows and $HOME/.wakatime.cfg for Linux and Mac

gandarez commented 5 years ago

since there's no feedback I'm closing this issue.

csteele86 commented 5 years ago

FYI, for anyone else having this issue with SSMS 2017, this fixed mine.

Found a possible fix. Re-download the most recent release (1.0.1 for me) after that right click the file and there should be a check box at the bottom saying 'unblock' alt text Check it and apply and hit Okay. Due to the plugin being a .dll and needing to connect to the internet, Windows automatically disables it and doesn't allow it to work.

Hope that helps

jnickle commented 5 years ago

Help? So I posted last year Sept 17, 2018 (see above). Got past that step, but could never get past the "install python" prompt. Gave up. lived with the "install python" popup every time I open SSMS since then. Now I'm circling back and seeing new install steps. Much quicker, easier, etc. I was hoping that following these instructions for v 2.0.1 for SSMS 2014 would "override/overwrite" problems with my previous install attempt, sadly it didn't. ... can anyone provide instructions on what I need to back out to make the new install work? I've got wakatime.cfg & .db & .log in my C:\Users\ folder. Do I keep these? What about the WakaTime.Addin and WakaTime.dll files in C:\users\xxxxxx\AppData\Roaming\Microsoft\MSEnvShared\Addins\ ?? Any others? I really want this tool to work, any advice greatly appreciated.

gandarez commented 5 years ago

@jnickle try removing all files related to wakatime (such as wakatime.cfg, .db and .log), also delete all files from AppData\Roaming then follow the installation instructions from here

jnickle commented 5 years ago

@gandarez , thank you for the info on cleaning up the past attempt. The clean up worked as I no longer get a prompt to install python every time I open SSMS 2014.

However, the directions located at the link you provided are not working. I see your name associated with those directions, so I'm not sure if you want me to discuss those issues here (in a connected thread) or on the page with the directions (direct issue with those stated directions). So, I will post in both for now...

Issue 1. (directions step 3): When I run the AddPackage.bat, I am met with the following results:

Adding to the registry the WakaTime package... Value SkipLoading exists, overwrite(Yes/No)? Yes The operation completed successfully. "Added WakaTime for SSMS 2012" Value SkipLoading exists, overwrite(Yes/No)?

(attaching screen shot as well) image

.... I'm confused b/c I'm running SSMS 2014. I do not have 2012 installed on this PC.

Issue 2. (directions step 4) says to copy the folder "WakaTime" to: (only showing the row that is relevant to my install):

v2014 - C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Extensions

The problem is that my 2014 install doesn't have that path. The Program Files (x86) folder path ENDS at Binn\ there is no ManagementStudio folder past that.

However, I do have the stated sub folders here:

C:\Program Files\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Extensions

So I put the folder there. Then rebooted SSMS, and tried to open the Wakatime option from SSMS Tools menu, only to receive an error message:.... I didn't capture it. And I've now been trying for a couple hours to get that back ... but I've now completely lost the wakatime from the menu. uninstall everything, follow steps as before, nothing. Tools>wakatime is gone.

I'm sure I did something wrong at this point. I really wish this could work as I spend 80% of my working time in SSMS ... any further ideas?

gandarez commented 5 years ago

In some cases the installer add dependencies for a previous version, maybe it's your case. Do you see any other message, like Added WakaTime for SSMS 2014?

You should have had the folder C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Extensions since that's the default forlder for SSMS 2014 installation. Try getting the folder from the SSMS executable you're running to double check against the folder you found.

jnickle commented 5 years ago

@gandarez , any interest in a reasonable $ payment to spend 15-30 minutes with me on a screen share meeting to see if we can sort this out? If so, I'm US based, PST timezone, and you can direct message or email me. Let me know if you have trouble seeing my contact info.