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

Error: No such table: ZSFNOTE #20

Open
azuryst opened this issue Oct 1, 2018 · 14 comments
Open

Error: No such table: ZSFNOTE #20

azuryst opened this issue Oct 1, 2018 · 14 comments

Comments

@azuryst
Copy link

azuryst commented Oct 1, 2018

I am getting this error on all calls. I can see that the ZSFNOTE table exists in the database:

"~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite."

@jonnnylingo
Copy link

jonnnylingo commented Oct 9, 2018

I get the same error after updating to Bear 1.6.3.

I dug into the source code and found it was setting the db_path to '~/Library/Containers/net.shinyfrog.bear/Data/Library/Application Support/net.shinyfrog.bear'.

However, the database.sqlite file size is 0 at that location.

The database.sqlite which Bear is using is located at '~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data' is not 0.

So it seems that the workflow is looking at the zero file but bear is using the non-zero file. I'm not sure why bear suddenly decided to zero that one out and how the two relate to each other. I deleted the file and opened Bear again. The file was re-created but still empty.

@sunknudsen
Copy link

sunknudsen commented Oct 15, 2018

I'm personally running Bear 1.6.3 and Alfred 3.7.

Here's how I solved this issue. First, I noticed that the released alfred-bear workflow links do not aways point to up to date releases depending on where you find them.

For instance, on Packal, the link points to version 0.2.0.

https://github.com/chrisbro/alfred-bear/releases/download/0.2.0/alfred-bear.alfredworkflow

When you run older versions such as 0.2.0, a wrong database path db_path is stored in the Alfred Workflow Data which explains the issue.

Please try deleting the Bear workflow (right-click delete in workflows).

Then, open a terminal and run the following command:

rm -fr ~/Library/Application\ Support/Alfred\ 3/Workflow\ Data/com.chrisbro.bear/

Then reinstall the Bear workflow via the released alfred-bear workflow link on https://github.com/chrisbro/alfred-bear.

Hope this helps!

@sunknudsen
Copy link

@chrisbro Thanks for the workflow! I believe an easy fix could be to update db_path on failures but haven't had a look at the full source code.

@azuryst
Copy link
Author

azuryst commented Oct 15, 2018

@sunknudsen it works now, great, thank you!

@jonnnylingo
Copy link

@sunknudsen that worked for me as well. Although the rm command didn't work initially. There were no errors, just returned without deleting. I had to cd into Workflow Data and delete it from there then close bear, delete the workflow, re-install the workflow, open bear and blam! Worked. Third time was the charm. Thanks!

@sunknudsen
Copy link

@azuryst @jonnnylingo Happy the fix worked for you too. Updated the rm command. It should work now.

@psi59
Copy link

psi59 commented Nov 20, 2018

@sunknudsen Thank you so much

@deanishe
Copy link

deanishe commented Nov 20, 2018

@sunknudsen Good find, but there's no need to use Terminal.

You can delete the existing data by entering bs workflow:reset in Alfred.

@chrisbro You might want to rework the workflow logic so the "an update is available" mechanism doesn't also get killed if there's an exception. Going forward, that might avoid (inevitable) changes to Bear totally breaking outdated versions of the workflow.

You can also use the last_version_run property to help clear bad data.

@cseder
Copy link

cseder commented Dec 21, 2018

Being able to create this kind of workflow was my sole intention for buying the Alfred Power Pack, and I've written some lines of Python myself, so maybe I'll get time to create something nifty using the Alfred-Workflow library myself!
Thanks for providing a much-needed solution, you just made my life a little bit easier!
Kudos!

The BearNotes team at @shinyfrog should have implemented search functionality in Spotlight already, but it doesn't seem to happen anytime soon...

@brandonpittman
Copy link

You can delete the existing data by entering bs workflow:reset in Alfred.

Messed around with this problem for a while, but it was this command that fixed it! Thank you!

@cseder
Copy link

cseder commented Dec 29, 2018

You can delete the existing data by entering bs workflow:reset in Alfred.

Messed around with this problem for a while, but it was this command that fixed it! Thank you!

Yup. The bs workflow:reset command saved my a## as well.

I got a message from one of the Bear devs yesterday, and they plan on implementing native Spotlight indexing in the next release, also encrypted notes. Looking forward to that.

@deanishe
Copy link

FWIW, the workflow:reset command should work with most workflows based on Alfred-Workflow.

There are a bunch of other commands, too, mostly to save you from having to dig around in ~/Library.

@mrmartineau
Copy link

I can confirm that running bs workflow:reset fixed this issue for me. thanks @deanishe

@chuck1in
Copy link

I'm personally running Bear 1.6.3 and Alfred 3.7.

Here's how I solved this issue. First, I noticed that the released alfred-bear workflow links do not aways point to up to date releases depending on where you find them.

For instance, on Packal, the link points to version 0.2.0.

https://github.com/chrisbro/alfred-bear/releases/download/0.2.0/alfred-bear.alfredworkflow

When you run older versions such as 0.2.0, a wrong database path db_path is stored in the Alfred Workflow Data which explains the issue.

Please try deleting the Bear workflow (right-click delete in workflows).

Then, open a terminal and run the following command:

rm -fr ~/Library/Application\ Support/Alfred\ 3/Workflow\ Data/com.chrisbro.bear/

Then reinstall the Bear workflow via the released alfred-bear workflow link on https://github.com/chrisbro/alfred-bear.

Hope this helps!

it's work!
thank u very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants