Skip to content
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

CKAN url handler throwing error on newly installed Linux #2626

Closed
DasSkelett opened this issue Dec 28, 2018 · 4 comments
Closed

CKAN url handler throwing error on newly installed Linux #2626

DasSkelett opened this issue Dec 28, 2018 · 4 comments
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux

Comments

@DasSkelett
Copy link
Member

Background

CKAN Version:
Current master branch - 1.25.5

Operating System:
Very fresh Linux (K)ubunutu install.

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
Yep, but shouldn't be relevant.

Problem

What steps did you take in CKAN?
Launch CKAN.
Let CKAN register its URL handler.

What did you expect to happen?
CKAN runs without error.

What happened instead?
CKAN catches and throws error and continues working:

8338 [1] ERROR CKAN.URLHandlers (null) - There was an error while registering the URL handler for ckan:// - Could not find a part of the path "/home/me/.local/share/applications/mimeapps.list".
8371 [1] ERROR CKAN.URLHandlers (null) -   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.IO.StreamWriter..ctor (System.String path) [0x00008] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
  at System.IO.File.WriteAllLines (System.String path, System.String[] contents) [0x00000] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at CKAN.URLHandlers.RegisterURLHandler_Linux () [0x0005c] in <80a0b4028ca640b1a29e9433917d2aec>:0 
  at CKAN.URLHandlers.RegisterURLHandler (CKAN.Configuration config, CKAN.IUser user) [0x0000c] in <80a0b4028ca640b1a29e9433917d2aec>:0 

So it looks like CKAN tries to read from/write to the mimeapps.list with this path: ~/.local/share/applications/mimeapps.list but applications/ and therefore mimeapps.list is not existing yet on my system, because I just installed a fresh Kubuntu on my old laptop.
CKAN catches the error and writes it to the console, but continues operating.

I think we should check if the applications/ folder exists, also mimeapps.list itself (maybe we do check the later one already, don't looked into that yet).
I will look into this tomorrow, am working on another isssue right now, but if someone wants to fix that before me, dew it!

@HebaruSan
Copy link
Member

#1848 contains fairly extensive discussion of these paths, whether to create them, etc.

Sorry, something went wrong.

@HebaruSan HebaruSan added Bug Something is not working as intended Linux Issues specific for Linux GUI Issues affecting the interactive GUI labels Dec 28, 2018
@DasSkelett
Copy link
Member Author

Oh thanks, didnt see that one.

Sorry, something went wrong.

@DasSkelett
Copy link
Member Author

Hmm, that's an open end over there, it seems. Should we suppress the error until we decide what to do and the PR is merged? Or let it as is?

Sorry, something went wrong.

@DasSkelett
Copy link
Member Author

I'm closing this now since we have #1848

Sorry, something went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux
Projects
None yet
Development

No branches or pull requests

2 participants