-
-
Notifications
You must be signed in to change notification settings - Fork 345
CKAN.URLHandlers error every time when opening CKAN on Windows #2362
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
Comments
Thanks for the report. That's very strange, as the Lines 85 to 107 in 9ee3584
Could you please check these paths in
|
Thanks! Can you please try this test build? I reworked that function a bit to try to re-use the originally successful return value of the Open call to also do the deletion. Hopefully this will at least give us an exception that's different in an informative way.
|
Sure. The test build prompts me to add a handler upon launch. The console window then prompts for the rights to make changes, and throws the same error. I ran it twice to check if it was setting the handler, same result the second time.
|
Thanks! Not to nitpick, but that's not quite the same error. It switched from:
to:
So I think your user can't modify HKEY_LOCAL_MACHINE for whatever reason. If you're comfortable making changes in regedit, could you please try deleting HKEY_LOCAL_MACHINE\Software\Classes\ckan manually? Then we can check whether CKAN recreates it in the same place or not. |
Yeah, you're right. Sorry, I was doing something else and didn't even read the error the second time, just copied it. I've deleted the registry entry and got a new error:
|
Did you get the "CKAN requires permission to add a handler for ckan:// URLs." dialog that time? That would tell us whether CKAN is attempting to elevate permissions in order to set the key. |
Yes, I did get a permissions prompt. I just ran the test build again and received no prompt to register the handler (and thus no error message in the console). There are no CKAN entries under either current user or local machine classes. Edit: Entering Edit 2: Running the stable version of CKAN still produces the same original error on launch. |
OK, I was being a bit dense there. The main (unelevated) process catches the unauthorized access exception, handles it fully (user prompt, retry with elevated permissions, etc.), and then re-throws it for no reason: Lines 51 to 67 in 9ee3584
... which means that the error you're seeing now will be printed every time CKAN tries to register its URL handler as a normal user, regardless of whether it's ultimately successful. It's a red herring. Here's a new test build with that re-throw statement removed:
If that looks better, we can try making this change in the main code. |
Okay, that seems to work, at least partially. I tried running the new build from a new location on my drive, without deleting the previous registry entries. It prompted for setting the handler on startup, prompted for permissions in the console, and then didn't throw any errors, but upon launching it again, it prompted for setting the handler again, and After deleting the registry entry again, it now sets the handler without throwing an error. Relaunching works as expected, and launching via the browser works as expected. So there is still the issue of it not deleting/resetting previously set registry entries, but it can set a new entry without throwing any errors. |
I've received the following error every time while opening any version of CKAN I've tried on Windows 10 64-bit. It doesn't seem to affect any of the functions of the tool, but I thought I'd share it anyway, since searching for the problem does not yield a solution.
The text was updated successfully, but these errors were encountered: