keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.9k stars 1.23k forks source link

Cannot enable keybase in explorer #13130

Closed zkascak closed 6 years ago

zkascak commented 6 years ago

My computer at work was replaced last week and I have not been able to enable keybase filesystem.

I click on the Yes, enable button to enable Keybase filesystem in windows explorer. The application starts the Dokan library install process after I click through the buttons, it starts the install process and after a few seconds the process fails giving me the message 0x80070483 No application is associated with the specified file for this application. There is also a log file attached. Dokan_Library_1.1.0.2000_Bundle_20180803102647.log

My current version of keybase is as follows: Client: 2.3.0-20180710101247+64615d6258 Service: 2.3.0-20180710101247+64615d6258

I am currently running Windows 10 Enterprise 2016 LTSB version 1607 os build 14393.2363

strib commented 6 years ago

cc @taruti @zanderz

zanderz commented 6 years ago

The log says: Error 0x80070483: Failed to elevate. It is likely that you lack permission to run an installer with elevated permissions on that computer. All we do when you click that button is invoke the Dokan installer, which you can try by itself at https://github.com/dokan-dev/dokany/releases/download/v1.1.0.2000/DokanSetup_redist.exe, or run the one in %localappdata%\Keybase. If that is not allowed to complete, there is little else to be done.

zkascak commented 6 years ago

Tried running from the %localappdata%\Keybase and from the download from the link mentioned as administrator and was still unable to install. Thank your for your assistance.

Mikeinnc commented 5 years ago

Hello - I'd like to reopen this issue as there appears to be a serious flaw in the Windows client. I have had numerous problems attempting to get the Dokan library 1.2.1.0.2000 to run from Keybase when I click 'enable Keybase in Explorer'. No matter how many times I delete the 'old' Dokan library; even delete and reinstall the Windows app; reboot between reloads etc - as indicated - the installation fails with error code 0x80070643. After many frustrating attempts, and reading one of the comments above, I have managed to load the latest Dokan library from the standalone installer _DokanSetupredist.exe Now, when I click 'enable Keybase in Explorer', the client obviously does NOT recognise that the latest library is already successfully loaded, and it wants to reload it. And it can't. At all. It fails, whether I reboot; run the client as a Windows Admin - in fact, whatever I try, it fails. Miserably! So - why, with the Dokan library successfully loaded independently does the Keybase client want to reload it again? And it can't! Any assistance gratefully received! (My OS is Windows 7 Ultimate 64 bit - from log file: Burn v3.11.1.2318, Windows v6.1 (Build 7601: Service Pack 1))

zanderz commented 5 years ago

@Mikeinnc We may be able to tell if you do keybase log send and send the ID. We try to identify the Dokan version by inspecting the resources in the .dll, and there should be some output around that in the logs.

As for that particular installation error, this thread suggests it might be a corrupt .NET library, but that is pretty speculative. As far as the Dokan installer, we ship packages straight from the project's release page, so there shouldn't be any difference if you get it straight from there.

Mikeinnc commented 5 years ago

Thanks @zanderz. I've done as requested and the log ID is: 1d784b774de38e10e74f461c

As an aside, I also have another (desktop) machine running 64 bit 'Windows 7 Ultimate' and I attempted to load Keybase on it this morning. It worked, and when I selected 'enable Keybase in Explorer', the Dokan library 1.2.1.0.2000 installed flawlessly - without having to launch Keybase as an admin etc. I did note that it paused for a while, reporting it was loading 'Visual C++ redistributable 2017 (x64) v14.11.25325' but after that pause, the Dokan library quickly loaded. I already had a K drive allocated on that machine (nothing to do with Keybase) but KB worked round that and very successfully set-up an M drive, and it is indeed shown in Explorer - exactly as I'd expect. This seems to indicate that there's not a collective issue with Windows 7!

I have checked the current (laptop) machine that is throwing the error, and it appears I have the same Redistributable Visual C++ version (14.11.25325) as was successful on the desktop machine. I do appear to have both the 32 bit (x86) and the 64 bit versions installed - not a problem?

It still seems strange that I can successfully load the standalone Dokan library on this machine, but then it isn't recognised by Keybase? I agree with your comment - since the install from 'inside' Keybase appears to be identical to that if I use the standalone package, why does it fail from one, but not from the other. And again - why should I be required to reload a Dokan version, to enable Explorer tools, that is identical to that already loaded? Well, let's hope that the logs give some indication! Oh, and I did look at the thread you mentioned in your previous reply, but I agree - it seems to be a very long shot, and I won't do anything re that at this point in time. Thanks so much for your help..... Mike

zanderz commented 5 years ago

Your log shows dokan1.dll version: 1.1.0.1000 Likely if you do where dokan1.dll it will say %SystemRoot%\System32\dokan1.dll, and likewise wmic datafile where name="c:\\Windows\\System\\dokan1.dll" get version will show the above, which is of course too old.

Is there a chance another software package depends on an older Dokan on your system? I would say it's best to once again uninstall all the Dokans you can find, and then delete %SystemRoot%\System32\dokan1.dll manually before running the 1.2.1.2000 package.

Mikeinnc commented 5 years ago

OK, so I removed dokan1.dll after checking the version (and, yes, you were, of course correct - it was old!). I also then removed the library and ALL instances of Dokan that I could find - any file that had a dokan* name! Then rebooted - as requested - and removed Keybase and reinstalled. When it was successfully loaded, I logged in and clicked 'enable in explorer' as before. The Bundle setup 1.2.1.2000 dialog appears, and the library starts loading - and crashes, just as before, with error 0x80070643. There are two associated log files with this error - I'll attach them here so you can see. One interesting thing is that there is now NO evidence of a dokan?.dll file anywhere in the system. There IS a dokan1.sys loaded in \System32\drivers but that's all. Incidentally, I know of no other application in my system that uses the dokan library. This is really strange!

Dokan_Library_1.2.1.2000_Bundle_20190130080708.log Dokan_Library_1.2.1.2000_Bundle_20190130080708_000_Dokan_x64.msi.log

zanderz commented 5 years ago

I'm afraid that if there really is still an old Dokan, just deleting files won't fix it. If you have dokan1.sys in the system drivers directory, you can use explorer to see what version it is. If a program doesn't show up in the control panel for uninstall but still has cruft left behind, you can sometimes get it right by using this microsoft tool.

Is there any chance you don't have Service Pack 1 on that Windows system?

At this point, it is purely a matter of getting the right Dokan on there; uninstalling Keybase won't help with that. If you found the package works better from the Dokan release page, go ahead and try that one again too.

Mikeinnc commented 5 years ago

Thanks for all your help and valuable comments. Definitely, I have SP1 on the system! I'll add a screen shot to show it. I really cannot see any old Dokan instance at all. I have a very good search program that will scan my entire drive and find anything that has 'dokan' in its name. I've been through the registry and deleted ANY key that has the word 'dokan' in it (including a couple that really didn't want to go! - HKLM/system/controlset001/enum/root/dokanlegacy). I've uninstalled Keybase. I've cleaned out Keybase keys from the registry. I've restarted and reinstalled keybase - successfully. I've then - on a system that is as clean as it it is physically possible to be - attempted to /enable explorer'. And I get the same error - every time. Seriously, I am a loss as to what to do next. Keybase is working - it's just that I cannot, no matter what I try, get that Explorer/keybase integration working on this specific machine. And, as I previously explained, when I did get the Dokan library installed from the Dokan release page, Keybase wouldn't 'recognise' it and insisted on reinstalling it. Which, of course, didn't work!!!!! So it looks as though even if I get Dokan installed via the "direct" route, Keybase won't integrate with it. Correct? keybase_issue1

Mikeinnc commented 5 years ago

Oh, and yes, dokan1.sys is now again installed after the last failed attempt at Explorer/Keybase integration. Here's a screen shot of the property details. We can see it is the correct version.

keybase_issue2

No dll file, though - as you'd probably expect!

zanderz commented 5 years ago

Again, Keybase and Dokan are not that tightly integrated, it doesn't matter where 1.2.1.2000 comes from, as long as it is there with a matching dokan1.dll. You can tell if the driver is installed by running sc query dokan, it shoudl say RUNNING. If you have that, all you need is the dll, which you could just copy from another 64 bit system I think, or unzip it from a package on the Dokany site.

Still unclear and mysterious as to why the Dokan install is failing. Scrubbing registry and files does not address the windows installer database, which is is why I suggested that Microsoft tool, above. Have you run that?

Mikeinnc commented 5 years ago

Thanks Steve. I'll try again later as I'm not on my system at the moment. I'm sorry that I didn't get a chance to try the MSoft tool yet, but I will do. I can understand what you are saying re the integration of the two packages. It's just that sometimes, when all else is failing, you'll try anything!! The real problem is clearly that the Dokan library just will not sucessfully load, quite independent of Keybase. I did previously open a thread on their git page, but they are as mystified as you and I as to why. At one time, I did actually get it to load independently of Keybase as I believe I mentioned, but I had to run it as an admin to do that. Now, I can't even replicate that process! Copying the dll file from my other - successful - 64 bit Win 7 system is a good idea - I will try that too. Oh, the joys of computing!!

On Thu, 31 Jan 2019 at 02:13, Steve Sanders notifications@github.com wrote:

Again, Keybase and Dokan are not that tightly integrated, it doesn't matter where 1.2.1.2000 comes from, as long as it is there with a matching dokan1.dll. You can tell if the driver is installed by running sc query dokan, it shoudl say RUNNING. If you have that, all you need is the dll, which you could just copy from another 64 bit system I think, or unzip it from a package on the Dokany site.

Still unclear and mysterious as to why the Dokan install is failing. Scrubbing registry and files does not address the windows installer database, which is is why I suggested that Microsoft tool, above. Have you run that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/keybase/client/issues/13130#issuecomment-459049603, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFflmXnSueb0ZLBVD2J3Z8tVJhCeQD4ks5vIeC0gaJpZM4VuGk8 .

Mikeinnc commented 5 years ago

OK, more info - and it's not good! So, I last night I really decided to see if I could get on top of this. And, I'll be honest, I can't. I have really reached the end of my tether - spending many, many hours just isn't worth it any longer, even as a purely academic exercise! I did exactly as you suggested with the MSoft tool. Total waste of time and effort! I then decided to compare the log files from the failing install with those from the successful install - after all, they are both Win 7 systems. So, I can see that the failure is due to the Dokan install being unable to possibly write, but certainly execute, the Dokan-x64.msi file from the \ProgramData\Package Cache directory. This is where it falls over and, of course, goes downhill from there. Here's the bit that defines the error:

_[2464:1200][2019-01-30T10:32:25]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, options: 0x7, disable resume: No [2464:1200][2019-01-30T10:32:25]i000: Caching bundle from: 'C:\Users\Mike\AppData\Local\Temp{5CF2493E-9892-4A28-AD91-84710BF202F1}.be\DokanSetup.exe' to: 'C:\ProgramData\PackageCache{3033f520-fbfd-410e-bce7-e86beb2fade3}\DokanSetup.exe' [2464:1200][2019-01-30T10:32:26]i320: Registering bundle dependency provider: {5F030BFA-CE6E-408A-9694-F593B319DBBE}, version: 1.2.1.2000 [2464:1200][2019-01-30T10:32:26]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, resume: Active, restart initiated: No, disable resume: No [2464:1100][2019-01-30T10:32:27]i305: Verified acquired payload: Dokan_x64.msi at path: C:\ProgramData\Package Cache.unverified\Dokan_x64.msi, moving to: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi. [2464:1200][2019-01-30T10:32:27]i323: Registering package dependency provider: {65A3A964-3DC3-0102-0001-181221101125}, version: 1.2.1.2000, package: Dokan_x64.msi [2464:1200][2019-01-30T10:32:27]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokanx64.msi, arguments: 'ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to install MSI package. ** Looks like directory NOT writeable? *** [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to execute MSI package. [2AF0:2B98][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to configure per-machine MSI package.

So, I thought I'd be sneaky and check the permissions on the 'Package Cache' directory; make sure that it was writable for every man and his dog!; build the directory mentioned in the log and put the .msi file in it manually. Well, that was a spectacular failure. I also tried executing the msi file directly using msiexec command. Nope! Windows wasn't having a bar of it - told me it 'wasn't a suitable file to execute? Huh? So, in the wee hours of the morning (and luckily it was a warm summer night!), I gave up. This morning, I copied every Dokan file I could find on the successful machine and replicated the install on this machine (I did a screen dump of a search for Dokan to know exactly how to replicate). You'd suggested that might work. Well, I'm sorry to tell you it doesn't. At all! I've restarted; I've let the KB 'enable explorer' ie Dokan install run from KB - but it fails. Every stinking time! KB has absolutely no idea that the files are installed (and they are), and just insists on running again - and I know, instinctively now, that it will just fail. Every time! Oh, and I tried the sc query command and I get 'The specified service does not exist as an installed service' - which I suppose is what you'd expect. So, that's where we are at. All the Dokan files are installed. The service isn't or won't run. KB refuses to recognise that the files are actually installed, and insists on re-installing them (and, recall it did this even the one time when I'd actually got Dokan to load correctly - a situation I now cannot repeat!), and it fails Every time. Always at the same point. Thanks for all your help - looks like I must accept this won't ever work, and goodness only knows why......

zanderz commented 5 years ago

I only meant to suggest that if Dokan was otherwise installed correctly, and the only difference was a dll that was too old for some reason, copying over the DLL could work. I thought you said it works to install it from the Dokan project github directly? There was a point where that version was installed except dokan1.dll was too old for some reason?

If you can't run an .msi that is quite serious - is that .msi corrupt? can you run any other msi files?

Mikeinnc commented 5 years ago

Thanks Steve - and excuse my obvious frustration! I had previously opened an issue with Dokan, and I've gone back to them for advice as clearly it isn't a Keybase issue at all. In fact, it's obvious it's not a Dokan issue either, as I have successfully and easily installed Dokan on an alternative machine as I previously explained. The entire issue is beset with strange anomalies. I have NO fundamental problems running a .msi file, and no, it is definitely not corrupt. In fact, I have NO problems (other than this!) whatsoever with the computer as a whole. I use it daily and constantly and it is stable and dependable. Yet something, somewhere is clearly amiss. All sorts of issues are being bought up - the Visual C redistributable is the latest, yet none of them seems to shed any light on the problem. I'm working with Dokan developers to see if we can find the cause - and if - when? - I do, be assured I'll let you know on here in a heartbeat. There might just be someone, somewhere on the globe who has a similar issue!

On Sat, 2 Feb 2019 at 03:06, Steve Sanders notifications@github.com wrote:

I only meant to suggest that if Dokan was otherwise installed correctly, and the only difference was a dll that was too old for some reason, copying over the DLL could work. I thought you said it works to install it from the Dokan project github https://github.com/dokan-dev/dokany/releases directly? There was a point where that version was installed except dokan1.dll was too old for some reason?

If you can't run an .msi that is quite serious - is that .msi corrupt? can you run any other msi files?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/keybase/client/issues/13130#issuecomment-459832610, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFfli5SkwanYXnA9F-kH0aUQqf307jPks5vJJAbgaJpZM4VuGk8 .

Mikeinnc commented 5 years ago

Well, it looks like I may have been incorrect in my assumption that it wasn't a problem with the Visual C++ redistributable. I'd checked it last night, and all seemed good, but this morning, I actually deleted both the 32 bit and 64 bit 2017 redistributable files, as I recalled from my "successful" machine installation seeing that Dokan would reinstall them if they weren't present, and it seemed like a 'belt-n-braces' method of making sure they were good to go. I then rebooted and tried the install again - from Keybase - and it worked!!! Just like that! Yes, the Dokan install did bring back the two Visual C++ files, and installed them as part of the process - and clearly, that did the trick. I've restarted Keybase and, sure enough, the K drive in now there, showing my folders, exactly as expected. One to remember, perhaps! Thanks for all your invaluable advice - Mike

zanderz commented 5 years ago

ugh, if only the logs could have shown that clearer. One of the reasons we stopped using wix burn was because errors can get buried like this. Sorry about all that hassle, glad you're up and running again.