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

Show database error message in the extension UI #129

Closed
alexriabtsev opened this issue Jul 11, 2020 · 5 comments
Closed

Show database error message in the extension UI #129

alexriabtsev opened this issue Jul 11, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers ui Related to browser UI

Comments

@alexriabtsev
Copy link

Just installed Promnesia extension for my Firefox on macOS and launched server (finally got it working -> the process is not easy and straightforward).

But there is no luck saving URLs. Every page I'm visiting is marked with:
ERROR: NetworkError when attempting to fetch resource.

However I see Promnesia server running at 13131 port and Firefox extension says it can connect to backend:
Success! {"db":null,"version":"0.11.20200605"}

How can I get it working?

@alexriabtsev
Copy link
Author

alexriabtsev commented Jul 11, 2020

FIXED
just changed the path in config.py

Figured out:
there is two different paths:
/Users/ral/Library/Application Support/promnesia/promnesia.sqlite and /Users/ral/.local/share/promnesia/promnesia.sqlite

Index works with one path and server running with another one. I copied the db to another directory and got extension working. Now need to figure out where is the config error.

@karlicoss
Copy link
Owner

Hi! Sorry it wasn't straightforward, I don't have macos, so basically working blind here! :)

ERROR: NetworkError when attempting to fetch resource.
However I see Promnesia server running at 13131 port and Firefox extension says it can connect to backend

Yeah, I can see it's confusing, db: null indicates a problem, but it's pretty cryptic. There is a todo for it. I guess I could return db_path: {error: "Error message"}, at least it would be visible to the user.

there is two different paths:
/Users/ral/Library/Application Support/promnesia/promnesia.sqlite and /Users/ral/.local/share/promnesia/promnesia.sqlite

Hmm, that's odd! The first path looks correct, I believe this is user_data_dir on OSX:

def default_output_dir() -> Path:
return Path(appdirs().user_data_dir)

But not sure how you ended up with .local/share, don't think I hardcoded it anywhere in the code. Can you share the commands you're use to index and run the server? Also the config if you don't mind. Thanks!

@karlicoss karlicoss reopened this Jul 11, 2020
@karlicoss karlicoss changed the title NetworkError? Show database error message in the extension UI Jul 11, 2020
@karlicoss karlicoss added enhancement New feature or request good first issue Good for newcomers ui Related to browser UI labels Jul 11, 2020
@alexriabtsev
Copy link
Author

You may ask me to test whatever you need for macOS (sorry, can't present a macbook to you, yet ;) )

@karlicoss
Copy link
Owner

Implemented proper error handling & display in the UI here #164
Will be in the next release!

@karlicoss
Copy link
Owner

P.S. all released (+ extension now works even without the backend), so hopefully you can try it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers ui Related to browser UI
Projects
None yet
Development

No branches or pull requests

2 participants