stevencohn / OneMore

A OneNote add-in with simple, yet powerful and useful features
Mozilla Public License 2.0
2.6k stars 219 forks source link

OneMore fails to load #119

Closed dkter closed 3 years ago

dkter commented 3 years ago

Describe the bug After I install OneMore it doesn't load. The "COM Add-ins" dialog box provides the error message:

Not loaded. A runtime error occurred during the loading of the COM Add-in.

the above error

To Reproduce Steps to reproduce the behavior:

  1. Install OneMore
  2. Start OneNote

Expected behavior OneMore should be loaded

Environment (if applicable):

Additional context It doesn't seem like a log file was generated.

stevencohn commented 3 years ago

I have to ask the obvious question first: Did you use the OneMore 64-bit installer since you have the 64-bit version of Office? What happens if you try to tick the checkbox next to OneMoreAddin and click OK in the dialog you show?

dkter commented 3 years ago

Did you use the OneMore 64-bit installer since you have the 64-bit version of Office?

Yes, but I just noticed when I run the installer it tries to install OneMore in the Program Files (x86) folder, even though the file I downloaded says x64:

image

What happens if you try to tick the checkbox next to OneMoreAddin and click OK in the dialog you show?

Nothing happens, and if I restart OneNote the checkbox becomes unchecked again (though it doesn't show the error anymore).

1001QAdotNET commented 3 years ago

I can confirm there is problems with the new release After installing the new release the addon button disappeared and I can't put it back .... I had to go back to the 3.9.3

stevencohn commented 3 years ago

Apologies. I update the x64 installer. Please try it again. https://github.com/stevencohn/OneMore/releases/tag/3.10

1001QAdotNET commented 3 years ago

I think you linked the same 3.10 version that has the bug I guess you wanted to point us to 3.11?! 3.10 also reset the quick access toolbar (removes all the onenote related buttons) :-(

stevencohn commented 3 years ago

I just removed and updated the 3.10 version. Did you try it?

I'm not sure about the quick access toolbar. I'm guessing that if the commands are not available, OneNote tries to be too smart and kindly removes them for you? Nothing I can do about that. I have no control over that toolbar. That shouldn't happen if OneMore installs correctly though I think

dkter commented 3 years ago

It installs in the Program Files folder now but still doesn't seem to work :/

stevencohn commented 3 years ago

I've been having trouble trying to find a 64-bit installation of OneNote so I can't prove that the latest release solves the problem but I did make a change to the OneMore installer that might help. So I could use your help in testing if you're willing

https://github.com/stevencohn/OneMore/releases/tag/3.10.1

dkter commented 3 years ago

nope, still doesn't work. Is there a way I could provide any sort of logging or debugging info that could help?

stevencohn commented 3 years ago

RRRRGH! Sorry, I wish Microsoft didn't "second class" OneNote. It doesn't install along with Office and the 64-bit installer doesn't actually install 64-bit OneNote so even their installer is broken it seems :-(

There really isn't any viable logging in OneNote any more. There used to be in v2013 but alas...

If I figure out how to install 64-bit OneNote, I'll be able to figure it out I'm sure but until then I can only hope someone is willing to help diagnose this out of the kindness of their heart

stevencohn commented 3 years ago

Did it work for you in the past, or are you a new OneMore user?

Just so I know whether I actually broke something or it was broken all along.

dkter commented 3 years ago

nope, I'm a new user. Tried installing it for the first time and it didn't work

I should probably note that the first time I installed OneMore I accidentally had left OneNote open and when it didn't work I assumed that was the issue, but when I closed OneNote and tried uninstalling and reinstalling OneMore I had the same issue.

stevencohn commented 3 years ago

OK thanks. Not exactly the kind of "new user experience" I would hope for either

stevencohn commented 3 years ago

Alright, whew! I feel better for me, but still bad for you.

I was able to install 64-bit OneNote 2016 on a new machine and used the latest 3.10.1 installer and it seems to work just fine. So there's something strange with your configuration.

My only advice is to ensure that these Registry keys are deleted (do not exist) before you install OneMore:

HKEY_CLASSES_ROOT\AppID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CLASSES_ROOT\WOW6432Node\CLSID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CLASSES_ROOT\River.OneMoreAddIn HKEY_CLASSES_ROOT\River.OneMoreAddIn.1 HKEY_CURRENT_USER\SOFTWARE\Classes\AppID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\OneNote\AddIns\River.OneMoreAddIn HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\River.OneMoreAddIn.dll

then try the installer again

dkter commented 3 years ago

Oh hey I got it! That wasn't the issue though, all those registry keys don't exist after I run the uninstaller

The issue was that I needed to select "everyone" instead of "just me" (the default) in the installer. If I do that it installs fine. I'm guessing my install of OneNote must have been installed "for everyone" back when I set it up ages ago.

Thanks for the help and quick responses!

stevencohn commented 3 years ago

Good news! I'll make a note of it in the project Wiki.

1001QAdotNET commented 3 years ago

I am still having issues with this release

It shows up in addins as enabled but is it not showing on the ribbon bar Enabling and disabling the addon is not solving the issue Installing for everyone did not solve the issue

I am on Win10x64, OneNote 2013 x86

18120:1] Starting dllhost 18120, en-US/en-US, v3.10.1, OneNote 15.0, Office 15.0 18120:1] ..OnConnection(ConnectionMode:ext_cm_Startup,1) 18120:1] ..OneAddInsUpdate(custom[]:0) 18120:3] ..OnStartupComplete(custom[]:0) 18120:3] ..OneNote backup folder:: C:\Users\1001qa\AppData\Local\Microsoft\OneNote\15.0\Backup 18120:3] ..OneNote default folder: C:\Users\1001QA\Documents\OneNote Notebooks 18120:3] ..OneNote unfiled folder: C:\Users\1001QA\Documents\OneNote Notebooks\My Notebook\Quick Notes.one 18120:3] OnBeginShutdown(0) 18120:3] ..shutting down UI 18120:3] ..OnDisconnection(RemoveMode:ext_dm_HostShutdown,0) 18120:3] ..closing log

27516:1] Starting dllhost 27516, en-US/en-US, v3.10.1, OneNote 15.0, Office 15.0 27516:1] ..OnConnection(ConnectionMode:ext_cm_Startup,1) 27516:1] ..OneAddInsUpdate(custom[]:0) 27516:3] ..OnStartupComplete(custom[]:0) 27516:3] ..OneNote backup folder:: C:\Users\1001QA\AppData\Local\Microsoft\OneNote\15.0\Backup 27516:3] ..OneNote default folder: C:\Users\1001QA\Documents\OneNote Notebooks 27516:3] ..OneNote unfiled folder: C:\Users\1001QA\Documents\OneNote Notebooks\My Notebook\Quick Notes.one

stevencohn commented 3 years ago

Now you're really baffling me. It's registered and starting but not showing up! I think it's time to get a beer.

stevencohn commented 3 years ago

Give 3.10.2 a shot https://github.com/stevencohn/OneMore/releases/tag/3.10.2

Fingers crossed. I can't get it to break but .2 removes some unnecessary additions I made to .1

CLITrees commented 3 years ago

Same thing it installs but not showing up on the ribbon visible in the COM add-ons list If I put 3.9.3 back all is OK

stevencohn commented 3 years ago

with 3.10.1 or 3.10.2?

1001QAdotNET commented 3 years ago

3.10.2

stevencohn commented 3 years ago

OK. I'm trying to add some more error checking/logging. Thanks for your patience. This is one of those can't-repo "works-on-my-machine!" problems.

1001QAdotNET commented 3 years ago

ok np

stevencohn commented 3 years ago

So here's the deal....

  1. There's a new release 3.10.3 that adds some exception logging to the code that builds the ribbon bar group. I'm hoping your missing ribbon problems will be exposed in the log
  2. I've done a bunch of testing and proven that on a 64-bit machine, both x86 and x64 OneMore installers work for either 32-bit or 64-bit OneNote. (I don't have a 32-bit machine to test but I'm guessing no one has 32-bit machines anymore so I'm not going to support that.)
1001QAdotNET commented 3 years ago

The machine (OS) is x64 OneNote is x32 (x86)

Still does the same Maybe it is worth saying that when the first release came out I was able to install it and it was visible on the ribbon Not sure what happened but it suddenly disappeared. There might have been a crash or something I do not remember the incident exactly but something happened and after the restart of onenote it was gone Let me try to restart the machine to see if that changes the things 3.9.3 installs just fine so not sure what is going on

25448:1] Log restarted 25448:1] OnBeginShutdown(0) 25448:1] ..shutting down UI 25448:1] ..OnDisconnection(RemoveMode:ext_dm_HostShutdown,0) 25448:1] ..disposing 3 streams 25448:1] ..closing log

11936:1] Starting dllhost 11936, en-US/en-US, v3.10.3, OneNote 15.0, Office 15.0 11936:3] ..OnConnection(ConnectionMode:ext_cm_Startup,1) 11936:3] ..OneAddInsUpdate(custom[]:0) 11936:3] ..OnStartupComplete(custom[]:0) 11936:3] ..OneNote backup folder:: C:\Users\1001qa\AppData\Local\Microsoft\OneNote\15.0\Backup 11936:3] ..OneNote default folder: C:\Users\1001qa\Documents\OneNote Notebooks 11936:3] ..OneNote unfiled folder: C:\Users\1001qa\Documents\OneNote Notebooks\My Notebook\Quick Notes.one

stevencohn commented 3 years ago

Do you know which version of .NET you have installed?

1001QAdotNET commented 3 years ago

I have these image seems to be the latest https://dotnet.microsoft.com/download/dotnet-framework

1001QAdotNET commented 3 years ago

Even with the new debuging release I am still having the same issue Removed 3.9.3 installed the debugging release but no luck then disabled then enabled still no luck

18808:1] Starting dllhost 18808, en-US/en-US, v3.10.4, OneNote 15.0, Office 15.0 18808:1] ..OnConnection(ConnectionMode:ext_cm_Startup,1) 18808:1] ..OneAddInsUpdate(custom[]:0) 18808:1] ..building ribbon 18808:1] ..building ribbon colorizer commands 18808:1] ..loading System.Runtime.CompilerServices.Unsafe 18808:1] ..loaded System.Runtime.CompilerServices.Unsafe 18808:1] ..building ribbon groups 18808:1] ..building context menu 18808:1] ..building context menu search engines 18808:1] ..OnStartupComplete(custom[]:0) 18808:1] ..OneNote backup folder:: C:\Users\1001qa\AppData\Local\Microsoft\OneNote\15.0\Backup 18808:1] ..OneNote default folder: C:\Users\1001qa\Documents\OneNote Notebooks 18808:1] ..OneNote unfiled folder: C:\Users\1001qa\Documents\OneNote Notebooks\My Notebook\Quick Notes.one 18808:1] ..defining hotkeys 18808:1] ..ready 18808:1] OneAddInsUpdate(custom[]:0) 18808:1] OnDisconnection(RemoveMode:ext_dm_UserClosed,0) 18808:1] closing log

18588:1] Starting dllhost 18588, en-US/en-US, v3.10.4, OneNote 15.0, Office 15.0 18588:1] ..OnConnection(ConnectionMode:ext_cm_AfterStartup,1) 18588:1] ..OneAddInsUpdate(custom[]:0) 18588:1] ..building ribbon 18588:1] ..building ribbon colorizer commands 18588:1] ..loading System.Runtime.CompilerServices.Unsafe 18588:1] ..loaded System.Runtime.CompilerServices.Unsafe 18588:1] ..building ribbon groups 18588:1] ..building context menu 18588:1] ..building context menu search engines

1001QAdotNET commented 3 years ago

To make sure nothing is hiding out in plain sight I tried to use some of the shortcuts https://github.com/stevencohn/OneMore/wiki#keys bit none worked so I guess it is dead not hidden

stevencohn commented 3 years ago

I'm not surprised. Seems like it's not loading but I don't know where it's stopping. Can you use the latest 3.10.4 and send me the log please?

1001QAdotNET commented 3 years ago

the above are with 3.10.4

stevencohn commented 3 years ago

Here’s an idea... do any OneNote commands show up int the ribbon customize dialog?

Get Outlook for iOShttps://aka.ms/o0ukef


From: 1001QAdotNET notifications@github.com Sent: Tuesday, December 15, 2020 7:23:15 PM To: stevencohn/OneMore OneMore@noreply.github.com Cc: Steven stevencohn@live.com; Assign assign@noreply.github.com Subject: Re: [stevencohn/OneMore] OneMore fails to load (#119)

the above are with 3.10.4

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/stevencohn/OneMore/issues/119#issuecomment-745673413, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACMAZVORMFNVL6NRBFWKGCDSU74XHANCNFSM4UYXCOIA.

1001QAdotNET commented 3 years ago

You mean OneMore right? No they don't

1001QAdotNET commented 3 years ago

What is the diff between the two 3.9.3 that works fine and 3.10.X

stevencohn commented 3 years ago

Mainly I included a nuget package. It's crazy that I have four machines that work fine. I'll have to try to pull out that package and try a different approach. That's the only thing I can think of.

That's the line in the log about CompilerServices.unsafe. That's a dependency of System.Text.Json

stevencohn commented 3 years ago

I really appreciate your patience and am hoping I can ask you to try another installer. It's the same release but "b" versions of the installers here https://github.com/stevencohn/OneMore/releases/tag/3.10.4

If that doesn't work then I'll have to refactor things a bit

1001QAdotNET commented 3 years ago

Same behaviour Try to generate two versions of the same release with new (you just did) and the old installer so we can make sure that is the smoking gun

stevencohn commented 3 years ago

I added a "c" version to https://github.com/stevencohn/OneMore/releases/tag/3.10.4

This completely removes any reference to the System.Text.Json nuget package.

1001QAdotNET commented 3 years ago

nope ...I removed Onetastic (which I did not use anyway) but that did not solve the problem I also used the Windows option to repair onenote -no luck with any of the above Is this release using the old installer or you are still trying to adjust the new one?

1001QAdotNET commented 3 years ago

BTW I also have OneNote 2010 on my system -that one does not see the addon either Both are seeing onetastic which I reinstalled

stevencohn commented 3 years ago

There is no "new" or "old" installer. I haven't changed the installer. The only difference should have been adding that nuget package. I'll double check though... but I'm concerned that the only way I'll figure this out is to see it happen and I haven't been able to reproduce it.

stevencohn commented 3 years ago

Oh my. I just noticed some left out references in the installer.... I'll get rid of them

stevencohn commented 3 years ago

"d" installer is ready.

Apparently, Visual Studio isn't great at removing references from the installer even though you delete them from the VS editor. It still doesn't make sense in my mind why these extra assemblies would break it though so I'm keeping fingers crossed.

1001QAdotNET commented 3 years ago

same problem.. I wish I could reinstall 2013 but I am preparing an exam and that would be too extreme

1001QAdotNET commented 3 years ago

it installs fine on my wife's computer she is running OneNote 2010

1001QAdotNET commented 3 years ago

Would it be possible to register the add on manually ? If yes what file ? I tried to re-register RiverOnemore AddIn.dll but it is telling me it is not a valid addon When I check the installed one it says location mscoree.dll Is that normal?

stevencohn commented 3 years ago

Wait. Really? So it works OK on your wife's computer? You can see it in the ribbon bar and it works? Oh, if you can do some comparison that would be awesome. I would look at Windows updates, .NET versions, and then look at the Registry entries (see the COM Registration section on this page: https://github.com/stevencohn/OneMore/wiki/Developer-Notes)

Also when you uninstall it, make sure the ProgramFilesx86\River directory is entirely deleted before installing again.

Yes it registers itself as mscoree.dll. It's based on the example OneNoteVanillaAddin project that Microsoft provides. If you were trying to use regasm.exe that doesn't write all the necessary Registry entries.

1001QAdotNET commented 3 years ago

After uninstalling the following were still there Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\CustomUIValidationCache

Computer\HKEY_CLASSES_ROOT\Installer\Assemblies\C:|Program Files (x86)|River|OneMoreAddIn|System.Net.Http.dll

I deleted any key with name or value containing onemore and reinstalled no luck

What keys am I looking to compare with my wife's machine

stevencohn commented 3 years ago

They're all list above but here they are:

HKEY_CLASSES_ROOT\AppID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CLASSES_ROOT\WOW6432Node\CLSID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CLASSES_ROOT\River.OneMoreAddIn HKEY_CLASSES_ROOT\River.OneMoreAddIn.1 HKEY_CURRENT_USER\SOFTWARE\Classes\AppID{88AB88AB-CDFB-4C68-9C3A-F10B75A5BC61} HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\OneNote\AddIns\River.OneMoreAddIn HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\River.OneMoreAddIn.dll