-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
COM Registration Fixing tool doesn't work #9039
Comments
What happens if you execute all the tweaks in #2807 (comment) by hand? |
cc: @jcsteh, @michaelDCurran |
There are a lot of them. I haven't tried all of them, but here's a summary of some things I did try. Testing with a win7 VM, this fixes it, note that this doesn't work on my real win10 machine, and requires an NVDA restart: On my win10 machine, this python console command fixes it if NVDA is run as administrator, but I forgot exactly what it does. It seems to return an error, but I'm not sure how to turn the int back into a HRESULT. However, it doesn't work on the win7 VM: On the win10 machine, Registering c:\windows\syswow64\oleacc.dll and c:\windows\syswow64\oleaut32.dll didn't fix it. |
Just to make sure, did you try OneCoreCommonProxyStub.dll on Windows 10
as well?
|
@LeonarddeR Tried that. I didn't realize you linked to a comment, let's try these.
Next steps:
|
Hmm, so oleaut32.RegisterTypeLib does work why registering it with resvr32 does not, is that correct? |
Yes, at least on win10. |
That RegisterTypeLib call registers the oleacc typelib. The thing is that on Windows 10, oleacc is not supposed to use the typelib marshaler; it should marshal using oleacc.dll. That's one of the tasks the tool performs: it sets the correct marshaler. I could understand why things would be broken if you run the COM reg tool and don't reboot, since Explorer will still be using the wrong marshaler. However, I would have thought that running the tool and then rebooting would fix things, since now, everything is using oleacc.dll as the marshaler. (It's worth noting that we don't ask the user to reboot, so if that is indeed required, we should fix that.) Technically, you could prove this by just restarting Explorer rather than rebooting. I guess it's possible that something somewhere still uses the typelib even when oleacc.dll is registered as the marshaler (instead of the typelib marshaler). It certainly wouldn't hurt to add this RegisterTypeLib call; a broken typelib entry is a bad thing regardless. |
Actually, you'd have to restart both Explorer and NVDA if you didn't want to reboot, since NVDA will probably be using the wrong marshaler too at that point. |
I wonder whether IDispatch still needs the typelib registered correctly, even if oleacc.dll is used as the marshaler. I guess that would make some sense. NVDA shouldn't be using IDispatch directly, but it could still feasibly be causing weirdness. |
@jcsteh do you know if there are separate typelib registrations required
for 64 and 32 bit?
Or is running it from within NVDA (32 bit) enough?
|
I'm not certain. This StackOverflow thread suggests they can be different. On the flip side, that same thread also gives me the impression that you can register a 64 bit typelib even in a 32 bit process. |
@tspivey: I want to get this into the COM registration fixing tool for 2019.1, however, with my copy of mathplayer that I have, on my system uninstalling it does not cause any of the problems you mention, though I do admit I have seen the problem a few years back. I thought that Design Science had addressed the issue in their installer. |
@michaelDCurran Have you made any progress here? |
@tspivey does this occur only in case of mathplayer? Or did you see this behavior with installing and uninstalling other programs as well? |
No, I haven't personally seen it with anything other than mathplayer. But since I've had to help people fix it, it's still a problem. |
Hi, Update: we had a user report that things in web browsers were not read, and the workaround noted by Tyler did work. I think, for 2020.1, the workaround line should be attempted unless we can fine a more refined solution for 2020.2. Thanks. |
This is still confusing, and I can still reproduce this issue using 2020.4. |
Aside from the typelib issue here, it seems the COM registration tool isn't applying the registry patch correctly, but I don't know why. STR (on a 64 bit system):
What's odd is that if I rename the .reg file, an error gets logged, so the function is definitely running. And if I manually run: |
Oh! I think I understand what's going wrong here. In 32 bit apps, Windows WOW64 redirects certain file system paths. So, when you run c:\windows\regedit.exe, this gets redirected transparently to c:\windows\syswow64\regedit.exe. The same happens for regsvr32. This means this tool has never worked for the 64 bit registry, only the 32 bit registry. WOW64 recognises c:\windows\sysnative as a special path which redirects to the native (64 bit) system directory. However, regedit.exe isn't in system, so this may not work for that. If not, we'll have to disable WOW64 file system redirection before our subprocess calls and re-enable it again afterward. |
This thread confirms that indeed you can't do sysnative\regedit.exe. However, you can apparently do sysnative\regedt32.exe, which apparently redirects to the 64 bit regedit. What a mess. |
NVDA keeps saying "unknown" in my Firefox, and the "Run COM Registration Fixing tool" does not take any effect. I use Windows 10 64-bit. I know this issue was mentioned in another thread and the solutions were suggested; however, would you mind sharing step-by-step instructions here for Windows 10 64-bit users? I tried to fix the issue on my end following the suggested comments in other threads, but none of them worked. |
Is this recent; i.e. only with the Firefox 89 update? If so, this is due to
a bug in Firefox. Please update to Firefox 89.0.1, which should fix this.
If this isn't recent (i.e. it happens with older versions of Firefox too),
this is due to COM registration issues.
|
@jcsteh, mine was 89, so have just updated to 89.0.1 following your suggestion. Still, I have the same issue. I also tried with the COM fixing tool and did reboot. No success. |
Please try the following:
1. Press Windows+r to open the run dialog.
2. Paste the following:
%ProgramFiles(x86)%\nvda\COMRegistrationFixes\oleaccProxy.reg
3. Allow admin access, then allow registry editor to make the changes.
4. Reboot.
|
Unfortunately, no success. Still, "unknown". |
…64bit Windows (nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls, per discussions linked from nvaccess#9039. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - For convenience, and because it's required in System32, renamed regedit.exe to regedt32.exe in the subprocess calls. - Removed now unused sysWow64 path constant. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Updated copyright.
…64bit Windows (nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls, per discussions linked from nvaccess#9039. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - For convenience, and because it's required in System32, renamed regedit.exe to regedt32.exe in the subprocess calls. - Removed now unused sysWow64 path constant. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Updated copyright.
@jooyoungseo Please try this try-build. You said in your other comment, that you "executed the installer with admin privilege". |
@tspivey, @cary-rowen. |
Hello, this is the log I executed on Win1021H1. It has a dll registration error. |
@LeonarddeR @jcsteh Next, I switched back to latest Alpha, and tried running @tspivey's typeLib code (modified to work in py3, and also modified to let the system choose the dll it wanted (I used system32 as the path not syswow64)). I have to say I am at a bit of a loss at this point. @michaelDCurran I don't think this is the fault of the PR, I think it still does a better job than the old tool. I tested the old tool in alpha, and it did no better. So I don't think this should hold up #12560, but there's obviously more to do. While in Firefox, here is the dev info for an "unknown":
Lastly, I have a desktop shortcut key setup to taskkill Firefox.
|
@cary-rowen It looks like you downloaded an earlier build. Try this link. |
@XLTechie, no luck -- still having "unknown" controls in Firefox instead of actual content although the new test build has been successfully installed. The "COM Registration Fixing tool" still does not work. Microsoft Windows Version
|
Also tried with JAWS 2021 "/type repair" tool, but no success. |
@XLTechie On Windows 10 64 bit build 21390 I installed and then uninstalled the Mapthplayer linked in this issue. As expected my Firefox started saying unknown everywhere. I then ran the COM registration fixing tool from the latest try build of your branch, and restarted NvDA, and Firefox started working perfectly again. |
No sorry I spoke too soon. It fixed the Library (download history) Window, and any existing open tabs still work, but all new tabs and windows are broken. However, Chrome is not broken, thus I think it may have something to do with Firefox's inter-process proxying code. There may be another interface from the MSAA typelibrary we need to correct its COM marshaller for. |
FYI, of course, I restarted my system after the NVDA snapshot installation. Plus, rebooted after applying the "COM Registration Fixing tool." I am using 64 bit Firefox (v89.0.1). No success. |
Does it work in troubleshoot mode (previously safe mode)? If so then try changing the theme in Firefox to something else than the default one. I did to Firefox Alpenglow and got it working still in version 89.0 this way, but in 89.01 it already works fine here with default settings. Maybe completely uninstalling Firefox along with related data and installing again would also help. |
I saw exactly the same situation over a PC of a (not advanced) user I assisted remotely, after running various fixes manually. I'm following discussion with great interest. |
…64bit Windows (nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls, per discussions linked from nvaccess#9039. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - For convenience, and because it's required in System32, renamed regedit.exe to regedt32.exe in the subprocess calls. - Removed now unused sysWow64 path constant. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Updated copyright.
@michaelDCurran @jcsteh @LeonarddeR I am not sure what I'm looking for here. I have tried variations of this on a couple systems, including a diff between a working system, then an install and remove of MathPlayer. Unfortunately, Firefox updated and Windows Security updated, while I was doing it, even though I had WIFI off until near the end to test Firefox. |
@Mary5958 Unfortunately, there are other apps which are effected by this. For example, regshot, the program I used to make that registry diff, has menus which stop working after MathPlayer is uninstalled. At least on one system, Notepad wouldn't read properly. |
…64bit Windows (Partial fix of nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - Now use reg.exe's import option to load .reg files instead of regedit.exe. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. - Removed now unused sysWow64 path constant. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Moved comments with discussion links into module docstring, and rearranged. - Updated copyright.
Very interestingly, my Firefox works again after installing MathPlayer. |
Very interestingly, my Firefox works again after installing MathPlayer.
Yes. MathPlayer is very aggressive in its uninstallation, and takes
something with it that it shouldn't.
When it is installed, it doesn't assume that something to be there, so it
installs it, thus resolving the problem.
Trying to figure out what that something is (presumably a registry key
that registers a particular interface) is what is underway now.
|
Here is another try build for people to test: https://ci.appveyor.com/api/buildjobs/04lnhv7snv1fe12l/artifacts/output%2Fnvda_snapshot_try-oleaccProxyFix-23189%2C2ac08400.exe This is based on pr #12560 but adds an extra change to the oleaccProxy.reg file, namely that it deletes the TypeLib subkey from the IAccessible interface key. This was never initially done as that file changed the proxyClsid32 value to point directly to oleacc.dll rather than the automation typelib marshaller, thus Windows would never have a reason to look at the TypeLib subkey (whether it was correct or not). But it seems that Firefox specifically looks at this subkey or at very least tries to get the IAccessible type library and fails, as it points to the removed Mathplayer type library. I'm mostly interested in this being tested on windows 7. I have confirmed this works okay on Windows 10. |
@michaelDCurran a couple things.
|
…64bit Windows (Partial fix of nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - Now use reg.exe's import option to load .reg files instead of regedit.exe. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. - Removed now unused sysWow64 path constant. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Moved comments with discussion links into module docstring, and rearranged. - Updated copyright. - In gui/__init__.py: added a recommendation that the user restart the computer, to the completion message.
…64bit Windows (Partial fix of nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - Now use reg.exe's import option to load .reg files instead of regedit.exe. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. - Removed now unused sysWow64 path constant. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Moved comments with discussion links into module docstring, and rearranged. - Updated copyright. - In gui/__init__.py: added a recommendation that the user restart the computer, to the completion message.
That TypeLib key does not exist at all on default installs of Windows
10, and I'm assuming Windows 7 either, and is only put there by
MathPlayer, as the IAccessible interface is incorrectly included in
their type library, and therefore registered like that when mathPlayer
is installed.
So, I don't believe there really is a valid value for that key anyway.
|
…64bit Windows (Partial fix of nvaccess#9039). Problems: - The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. - The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. - The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). Remediation: - Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. - Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. - The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. - Updated to more descriptive error logging. - Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. Path remediations: - Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. - Added sysnative path to the list of path constants at the top of the file. - Now use Sysnative in the path for intentional 64bit calls. - Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. - Now use reg.exe's import option to load .reg files instead of regedit.exe. - Now check whether to use "Program Files" or "Program Files (x86)" on Win7. - Removed now unused sysWow64 path constant. Misc: - Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. - Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. - Moved comments with discussion links into module docstring, and rearranged. - Used subprocess.STARTUPINFO to prevent console windows from being shown. - In gui/__init__.py: added a recommendation that the user restart the computer, to the completion message.
…fective on 64-bit windows, and fix more problems (#12560) Fixes #9039 The COM Registration Fixing Tool seems to have never worked fully on 64bit Windows, as a result of path confusion caused by the use of SysWOW64, and the executable names used. In addition, modern browsers seem to check a typelib registration that could be damaged by certain uninstallations (e.g. older versions of MathPlayer). We didn't previously do anything about this. Further background: In 64 bit Windows, %WINDIR%\System32 contains 64-bit executables. Meanwhile, %WINDIR%\SysWOW64 contains 32-bit executables. That seems inverted from what it should be, but there is a good explanation here for why it's like that. When a 32-bit application calls something in System32, SysWOW64 assumes that it wants the 32-bit version, and redirects the call to the version in the SysWOW64 directory. If the 32-bit application really wants the 64-bit version of whatever it's calling, it has to use the virtual directory %WINDIR%\Sysnative, which SysWOW64 provides. We were calling regedit.exe and regsvr32.exe in contexts where we assumed 32-bit, from either %WINDIR% or %WINDIR%\System32. Because NVDA is 32-bit, that would result in the 32-bit application being called. That's okay. However when the test was made for 64-bit, executables in %WINDIR%\SysWOW64 were being used, which are also 32-bit. At least one of those should be 64-bit for COM reregistrations, but neither are. In no case should we ever call anything in %WINDIR%\SysWOW64 ourselves, which we currently do. Description of how this pull request fixes the issue: Taken from the commit that rewrites COMRegistrationFixes/__init__.py: Repaired the COM Registration Fixing Tool so it is more effective on 64bit Windows (Partial fix of #9039). • Problems: ◦ The registerServer function called the 32-bit version of regsvr32.exe, even in 64-bit contexts. ◦ The applyRegistryPatch function called the 32-bit version of regedit, even in 64-bit contexts. ◦ The Win7 32-bit run did not take into account 32-bit only systems (no Program Files (x86) folder). • Remediation: ◦ Replaced applyRegistryPatch function with two new functions: apply32bitRegistryPatch and apply64bitRegistryPatch. ◦ Replaced registerServer function with register32bitServer and register64bitServer, to make clear what they do. ◦ The new functions don't check 32/64 bitness; they leave that to the caller and log errors on failure. ◦ Updated to more descriptive error logging. ◦ Adjusted the Windows 7 code to use server registration with proper bitness for each DLL. • Path remediations: ◦ Moved the OLEACC_REG_FILE_PATH constant to the top of the file with the rest. ◦ Added Sysnative path to the list of path constants at the top of the file. ◦ Now use Sysnative in the path for intentional 64bit calls. ◦ Now use System32 in the path for 32-bit calls on either 32-bit or 64-bit systems. ◦ Now use reg.exe's import option to load .reg files instead of regedit.exe. ◦ Now check whether to use "Program Files" or "Program Files (x86)" on Win7. ◦ Removed now unused sysWow64 path constant. • Misc: ◦ Added docstring note about 32 and 64 bit functions needing attention if NVDA goes 64-bit in the future. ◦ Converted path constants to uppercase-with-underscore style, and corrected case on some Windows paths. ◦ Moved comments with discussion links into module docstring, and rearranged. ◦ Used subprocess.STARTUPINFO to prevent console windows from showing during executions. ◦ In gui/__init__.py update the message shown on tool completion, to recommend a restart. Separately, @michaelDCurran found a registry key that we should delete to restore browser functionality under certain circumstances. That is included as a separate joint commit.
Steps to reproduce:
Actual behavior:
The tool doesn't fix NVDA's accessibility support.
Expected behavior:
The tool fixes NVDA's accessibility support.
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
Version: alpha-16405,19bb21c2
Windows version:
Version 1809 (OS Build 17763.134)
Name and version of other software in use when reproducing the issue:
Other information about your system:
Other questions
Does the issue still occur after restarting your PC?
Yes
Have you tried any other versions of NVDA?
No
The text was updated successfully, but these errors were encountered: