Closed yunnant closed 5 years ago
Is this a new install / setup, or was this working on Sierra and stopped working on an upgrade to Mojave?
My first guess is that you haven't used the macOS Reminders app or Calendar and so the Calendar Cache doesn't exist yet. But it may also be a security issue. Can you confirm the file is there by:
cd /Users/yunnantao/Library/Calendars/
ls -al
Calendar Cache
is in that directoryYes, it is a new install. And I have used it, I guess this is the cache.
I had similar issues under issue #3 but I think this is a problem with permission. Can you please run the following in the terminal. Please let me know if you get a security prompt and what, if any, results come back:
sqlite3 "file:$HOME/Library/Calendars/Calendar Cache?mode=ro" "SELECT ztitle FROM znode WHERE z_ent=42 AND zistaskcontainer=1"
Yes, there is a prompt. And I have added the permission to ubersicht and it works. Thank you and Happy New Year!
You're welcome! Happy New Year to you, too!
I am having the same issue on Mojave 10.14.2 Error: unable to open database "file:..."
How can add permissions to uberischt?
I believe this is corrected by granting Ubersicht access to your Calendars under "Security & Privacy" in "System Preferences":
Go to "System Preferences" -> "Security & Privacy" and select "Calendar" on the left. Then in Finder got to "Applications", select the Ubersicht app, and drag it onto the right side of the "Security & Privacy" panel to add it.
Let me know if this works or not.
Ubersicht doesn't request access to Calendars by itself and I can't add it myself. I've granted Ubersicht a Full Disk Access and the error disappeared, but the widget is not showing up. Tried deleting caches and reinstalling the widget to no avail.
Hmmm - you should be able to find Ubersicht in your "Applications" folder and just drag it into the "Allow the apps below to access your calendars." But, I haven't tested this out. I don't think Ubersicht will request access because it's one of my underlying scripts that needs access. When I experienced this, I was testing the underlying script in the Terminal, received a pop up, and granted the script access.
I should have time in the next day or so to reset permissions on Ubersicht and see if I can recreate the situation. You might try what I suggested above and run the following in a Terminal:
sqlite3 "file:$HOME/Library/Calendars/Calendar Cache?mode=ro" "SELECT ztitle FROM znode WHERE z_ent=42 AND zistaskcontainer=1"
You'll probably get a pop up, as yunnant did above. It might be that Terminal also requires access, which you can see from my screenshot I did as well.
I'll reopen this until we have you working.
When I ran the sqlite command, it was the Terminal app that asked for permission, not Ubersicht. Dragging and dropping Ubersicht app to Calendars permissions window in System Preferences is not working. I was looking for a solution on how to grant permissions to a specific app without it explicitly requesting it, and it looks like the only thing you can do is to grant it Full Disk Access. Which I did. And as I said - it solved the issue with the error about DB access.
Now it just not showing any tasks, like in the issue#3.
When I run
cd "$HOME/Library/Application Support/Übersicht/widgets/reminders.widget"
./pending.sh
I get the list of my tasks
Running
sqlite3 "file:$HOME/Library/Calendars/Calendar Cache?mode=ro" "SELECT ztitle FROM znode WHERE z_ent=42 AND zistaskcontainer=1"
returns nothing
I've tried running Reminders widget using both the lates release on GitHub and the reminders.widget.hotfix.zip from here
None of them worked. Debug console doesn't return anything.
My system:
I gave Ubersicht the whole access to the disk, maybe you can try it.
The only place I have Ubersicht is in the Calendars setting, and I verified if I disable there, my widget breaks. When I re-enable it, my widget works. I do not have Ubersicht in "Full Disk Access".
@oc777 I hate to ask, but do you have any items in your Reminders lists? And can you please run this SQL in Terminal:
sqlite3 "file:$HOME/Library/Calendars/Calendar Cache?mode=ro" "SELECT zduedate, zpriority, rem.ztitle AS title, cal.ztitle AS list, rem.znotes AS notes FROM zcalendaritem rem LEFT JOIN znode cal ON rem.zcalendar=cal.z_pk WHERE rem.z_ent=6 AND zcompleteddate IS NULL ORDER BY CASE WHEN zduedate IS NULL THEN 1 ELSE 0 END, zduedate, zpriority;"
This should give a list of all reminders you have. Please post the output (or at least a portion if you have private tasks on there).
Yes :) I have a whole bunch of tasks. And the query you provided returns them all. The output:
570106800||Test reminders.widget|TODO|let's go!
570621600||Web Based #3|uni|
||Buy Credits iPhrame|SD|
...
|0|Server_side|TODO|hhkhkkk
As mentioned previously:
When I run
cd "$HOME/Library/Application Support/Übersicht/widgets/reminders.widget"
./pending.sh
I get the list of my tasks
Running
sqlite3 "file:$HOME/Library/Calendars/Calendar Cache?mode=ro" "SELECT ztitle FROM znode WHERE z_ent=42 AND zistaskcontainer=1"
returns nothing
Okay - so this may be broken after all since that last query is returning nothing. Unfortunately, I'm going to be away from my Mac for most of the week, and this will have to wait until probably next Friday. I'll think it over and let you know if I have any other suggestions you can try in the mean time.
The problem seems to happen because pending.sh
is returning an empty array of lists "lists": []
Removing z_ent=$CALDAVCALENDAR AND
and leaving only WHERE zistaskcontainer=1;
in "get all list names" query lists
solves the issue
Sorry for the delay. I was out of town for a week. I'll poke around today and tomorrow and see if I can verify and fix.
@oc777 - looks like you're right. I've removed the z_ent=$CALDAVCALENDAR
qualifier and it still appears to work as expected. I've packaged up the changes and attached the new zip. Please test it out, and if it works for you as well I'll commit the changes. Thank you!
@oc777 - way late, but is this still a problem? I had to make significant changes for Catalina and want to make sure the problems you were having are addressed as well.
Closing this out as stale. Please reopen if there's still an issue.
Hi, can you help me with this issue, it says "Error: unable to open database "/Users/yunnantao/Library/Calendars/Calendar Cache?mode=ro": unable to open database file"