Open Kabouik opened 4 years ago
It would help if you provide an exact description of your setup. What is it that works manually? Which hooks are you using? How do you run calcurse?
Sorry if some details were missing. Synchronization with the cloud calendar works with calcurse-caldav
(see above what it aliases to), but this doesn't open Calcurse so I have to run calcurse
too. Of course I could just include && calcurse
in the alias too, but that wouldn't solve the issue because then in Calcurse, if I add or delete some appointments and save them, they won't be synchronized until I run calcurse-caldav
manually again. What I would like is a synchronization with calcurse-caldav
to occur either at regular intervals in the background or when I press S
or R
in the Calcurse UI.
I have tried the hooks that are in this repository at contrib/hooks
and contrib/hooks/caldav
, made them executable, and renamed indicated in the Readme, but I still couldn't see any automatic synchronization when saving/reloading/launching Calcurse alone. It's possible that I just didn't understand how to make hooks work.
I am using version 4.6.0 on Solus.
Hooks should solve your problem. Can you add something else to them (e.g. an entry being appended to some log file) to check whether they are executed at all? If they're not executed, can you try running them manually?
I can try that!
Just to make sure I understand correctly: in my situation, the scripts in contrib/hooks/
would be appropriate, right? My data folder is not a git folder, but I see that post-save
and pre-load
mention synchronizing with caldav
too. This is a bit confusing to me because it seems that the script in contrib/caldav/hooks
is either redundant or more specific (just for git folders), so I'm not sure what combination of scripts I need. Maybe the script in contrib/caldav/hooks
was made before those in contrib/hooks/
added support for caldav
too?
I added notify-send -u low 'Calcurse synchronized with server'
in the if
loop at the end of both hooks, and can confirm the notification appears when running Calcurse or saving after an appointment.
However this seems to be instantaneous, which is surprising because running calcurse-caldav
manually takes about 10 seconds. Manually running calcurse-caldav
also prompts for a password to unlock my pass
vault and connect to the server, while the hooks don't do that, so maybe that's what is failing?
The hooks are examples, as mentioned in the comment in the top of the file. You need to customize them to your needs. You can remove the Git part if you do not use Git for your config or data files. $data_dir
and $config_dir
likely need to be changed too (if you use the new XDG directories).
Yes, I actually just checked pre-load
which seemed to take care of both possible directory locations, but I edited post-save
to reflect my actual directories too. I believe the issue was that the scripts call calcurse-caldav
, which I aliased in my ~/.bashrc
to fetch the password from the pass
vault. I thought scripts would use the alias but in fact scripts probably ignore aliases, so calcurse-caldav
ran from the hooks was just failing to authenticate quietly.
I replaced calcurse-caldav
in the hooks with the same command as in my alias, and now I'm prompted to type my pass
master password. :+1:
However, I can't confirm it's working because I was trying to solve another issue with calcurse-caldav
failing to import appointments with multi-line descriptions. I used vdirsyncer
](https://github.com/pimutils/vdirsyncer) to fetch all .ics locally and manually fix those few appointments with \n
in them, then synchronized again. It seemed to work as expected, the synchronization went well. However now calcurse-caldav
is failing with this error:
/.config/calcurse/hooks $ calcurse-caldav
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general/a19adb800cda553bb3aaa55cd43754
error: 5bee579bc4.ics.
This is not related to the original issue, but I'll need to fix it before confirming synchronization now works. I'll investigate #94, seems related.
@Kabouik:
... I was trying to solve another issue with
calcurse-caldav
failing to import appointments with multi-line descriptions.
??? What makes you think that?
I no longer have the log files in /tmp/calcurse.xxx.log
, but on a few events, there was a clear warning saying that those events failed to synchronize (from remote to Calcurse) do to "multi-line" or "line breaks", not sure what was the keyword. It was just about 10 events so I wanted to fix that manually, using vdirsyncer
to fetch the remote ics files causing the issue. Then I removed the occurrences of \n
in those files, and pushed to remote again.
However, at a later point, I started to have this "Unsupported Media Type" failure with caldav-calurse
. I'm currently trying with a new blank calendar to iron out any issues with the content of my particular calendar, and it seems to work.
There is still one issue that is related to this one and to #78: when using the post-save
hook and adding appointments, it seems the hook will make Calcurse hang (not responsive, clocked frozen as well). I didn't fully comprehend how to reproduce yet, but I think it is related to:
post-save
hook (content),s
right after adding an appointment seems to make it hang more often),pass
vault password in the gnome-polkit recently (i.e., is it still remembered or not).I'll need to use Calcurse a bit more with this blank calendar to progress on understanding how to reproduce reliably.
There are far too many things going on at the same time, and you omit too many details. That makes it difficult to sort your problems out.
A case in point:
I no longer have the log files in
/tmp/calcurse.xxx.log
, but on a few events, there was a clear warning saying that those events failed to synchronize (from remote to Calcurse) do to "multi-line" or "line breaks", not sure what was the keyword. It was just about 10 events so I wanted to fix that manually, usingvdirsyncer
to fetch the remote ics files causing the issue. Then I removed the occurrences of\n
in those files, and pushed to remote again.
This is of no use. We need the exact output from calcurse
.
And another:
There is still one issue that is related to this one and to #78: when using the
post-save
hook and adding appointments, it seems the hook will make Calcurse hang (not responsive, clocked frozen as well).
I guess from your talk of "autosave" that you have configured calcurse
with general.periodicsave
set to something positive?
Please provide a description of the complete setup of calcurse
/calcurse-caldav
including configuration files and hooks. Always provide log file output if available.
I totally understand and I'm sorry that there are details I can no longer provide. For instance:
This is of no use. We need the exact output from
calcurse
.
I know my comment could not accurately answer your question, but I described to the best of my recollection. I modified my remote calendar using vdirsyncer
to remove any \n
pointed out by the output and temporary log files of calcurse-caldav
, so I can not reproduce it now. I could try manually adding new \n
using the same procedure, but I'm not sure exactly in which sections they were. If you want me to try that, perhaps I should open a different issue?
Note that I am now using a different calendar file, newly made from the Nextcloud interface, with just some test events to better debug and avoid issues that may be independent from Calcurse.
I guess from your talk of "autosave" that you have configured calcurse with general.periodicsave set to something positive?
Please provide a description of the complete setup of calcurse/calcurse-caldav including configuration files and hooks. Always provide log file output if available.
general.periodicsave
is enabled, yes, see:
~/.config/calcurse/conf
appearance.calendarview=monthly
appearance.compactpanels=yes
appearance.defaultpanel=appointments
appearance.layout=3
appearance.headerline=no
appearance.eventseparator=yes
appearance.dayseparator=yes
appearance.emptyline=yes
appearance.emptyday=--
appearance.notifybar=yes
appearance.sidebarwidth=0
appearance.theme=blue on default
appearance.todoview=show-completed
appearance.headingpos=left-justified
daemon.enable=yes
daemon.log=no
format.inputdate=4
format.notifydate=%a %F
format.notifytime=%T
format.outputdate=%y-%m-%d
format.dayheading=○ %a, %e %B %Y
general.autogc=no
general.autosave=yes
general.confirmdelete=yes
general.confirmquit=yes
general.firstdayofweek=monday
general.multipledays=yes
general.periodicsave=2
general.systemevents=yes
general.systemdialogs=yes
notification.command=calcurse -n | tail -n 1 | while read SPAM_OUT; do notify-send -u normal "$SPAM_OUT"; done
notification.notifyall=flagged-only
notification.warning=3600
~/.config/calcurse/caldav/config
# If you want to synchronize calcurse with a CalDAV server using
# calcurse-caldav, create a new directory at $XDG_CONFIG_HOME/calcurse/caldav/
# (~/.config/calcurse/caldav/) and $XDG_DATA_HOME/calcurse/caldav/
# (~/.local/share/calcurse/caldav/) and copy this file to
# $XDG_CONFIG_HOME/calcurse/caldav/config and adjust the configuration below.
# Alternatively, if using ~/.calcurse, create a new directory at
# ~/.calcurse/caldav/ and copy this file to ~/.calcurse/caldav/config and adjust
# the configuration file below.
[General]
# Path to the calcurse binary that is used for importing/exporting items.
Binary = calcurse
# Host name of the server that hosts CalDAV.
Hostname = cloud.disroot.org
# Path to the CalDAV calendar on the host specified above.
Path = remote.php/dav/calendars/kabouik/general-2 # <- this is the new blank calendar I mentioned above
# Type of authentication to use. Must be "basic" or "oauth2"
#AuthMethod = basic
# Enable this if you want to skip SSL certificate checks.
InsecureSSL = No
# Disable this if you want to use HTTP instead of HTTPS.
# Using plain HTTP is highly discouraged.
HTTPS = Yes
# This option allows you to filter the types of tasks synced. To this end, the
# value of this option should be a comma-separated list of item types, where
# each item type is either "event", "apt", "recur-event", "recur-apt", "todo",
# "recur" or "cal". Note that the comma-separated list must not contain any
# spaces. Refer to the documentation of the --filter-type command line argument
# of calcurse for more details. Set this option to "cal" if the configured
# CalDAV server doesn't support tasks, such as is the case with Google
# Calendar.
SyncFilter = cal,todo
# Disable this option to actually enable synchronization. If it is enabled,
# nothing is actually written to the server or to the local data files. If you
# combine DryRun = Yes with Verbose = Yes, you get a log of what would have
# happened with this option disabled.
DryRun = No
# Enable this if you want detailed logs written to stdout.
Verbose = Yes
# Credentials for HTTP Basic Authentication. Leave this commented out if you do
# not want to use authentication.
[Auth]
Username = kabouik
# Password =
# Alternatively, to avoid storing the password in plain text,
# use pass to send it securely to calcurse before launching calcurse:
# CALCURSE_CALDAV_PASSWORD=$(pass show calcurse) calcurse-caldav
# Optionally specify additional HTTP headers here.
#[CustomHeaders]
#User-Agent = Mac_OS_X/10.9.2 (13C64) CalendarAgent/176
# Use the following to synchronize with an OAuth2-based service
# such as Google Calendar.
#[OAuth2]
#ClientID = your_client_id
#ClientSecret = your_client_secret
# Scope of access for API calls. Synchronization requires read/write.
#Scope = https://example.com/resource/scope
# Change the redirect URI if you receive errors, but ensure that it is identical
# to the redirect URI you specified in the API settings.
#RedirectURI = http://127.0.0.1
~/.bashrc
…
alias calcurse-caldav='CALCURSE_CALDAV_PASSWORD=$(pass show Cloud/calcurse) calcurse-caldav'
…
~/.config/calcurse/hooks/pre-load
#!/bin/sh
#
# This is an example hook. It synchronizes calcurse with a CalDAV server before
# loading the data files.
#
# In order to install this hook, copy this file to
# $XDG_CONFIG_HOME/calcurse/hooks/ (~/.config/calcurse/hooks/) or
# ~/.calcurse/hooks/ if using ~/.calcurse.
[ -d "$HOME/.config/calcurse" ] && data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse"
cd "$data_dir" || exit
# Do not do anything when synchronizing with a CalDAV server.
[ -f caldav/lock ] && exit
# Run the CalDAV synchronization script in the background.
if [ -d caldav ] && command -v CALCURSE_CALDAV_PASSWORD=$(pass show Cloud/calcurse) calcurse-caldav >/dev/null; then
(
date="$(date +'%b %d %H:%M:%S')"
echo "$date Running calcurse-caldav from the pre-load hook..."
calcuse-caldav ### <- There was an issue here, found it!
) >>caldav/log 2>&1 &
notify-send -u low 'Calcurse synchronized with server'
fi
~/.config/calcurse/hooks/post-save
#!/bin/sh
#
# This is an example hook. It does two things whenever you save the data files:
#
# 1. Make a commit if the calcurse directories contain a Git repository.
# 2. Synchronize with a CalDAV server if calcurse-caldav is configured.
#
# In order to install this hook, copy this file to
# $XDG_CONFIG_HOME/calcurse/hooks/ (~/.config/calcurse/hooks/) or
# ~/.calcurse/hooks/ if using ~/.calcurse.
data_dir="$HOME/.local/share/calcurse"
config_dir="$HOME/.config/calcurse"
if [ ! -d "$data_dir" ]; then
data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse"
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/calcurse"
fi
# Do not do anything when synchronizing with a CalDAV server.
[ -f "$data_dir/caldav/lock" ] && exit
# If the directory is under version control, create a Git commit.
commit_dir() {
cd "$1" >/dev/null 2>&1 || return
shift
if [ -d .git ] && command -v git >/dev/null; then
git add "$@"
if ! git diff-index --quiet --cached HEAD; then
git commit -m "Automatic commit by the post-save hook"
fi
fi
}
commit_dir "$data_dir" apts todo
commit_dir "$config_dir" conf keys
# Optionally run the CalDAV synchronization script in the background.
cd "$data_dir" || exit
if [ -d caldav ] && command -v CALCURSE_CALDAV_PASSWORD=$(pass show Cloud/calcurse) calcurse-caldav >/dev/null; then
(
date="$(date +'%b %d %H:%M:%S')"
echo "$date Running calcurse-caldav from the post-save hook..."
calcurse-caldav ### <- There was an issue here, found it!
echo
) >>caldav/log 2>&1 &
notify-send -u low 'Calcurse synchronized with server'
fi
~/.local/share/calcurse/caldav/log
Jun 27 01:25:04 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: Sync database not found or empty. Please initialize the database first.
error: Supported initialization modes are:
error: --init=keep-remote Remove all local calcurse items
error: --init=keep-local Remove all remote objects
error: --init=two-way Copy local items to the server and vice versa
Jun 27 01:43:32 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 01:48:12 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 12:34:54 Running calcurse-caldav from the post-save hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 12:48:08 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 12:51:54 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 13:18:36 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 13:21:28 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 13:23:27 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
error: The server at cloud.disroot.org replied with HTTP status code 401
error: (Unauthorized) while trying to access
error: https://cloud.disroot.org/remote.php/dav/calendars/kabouik/general-2/.
Jun 27 17:48:49 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Pushing new object 22e8983b9f3ea3a61da9559b636273feca3ee714 to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/22e8983b9f3ea3a61da9559b6362
error: 73feca3ee714.ics.
Jun 27 17:50:03 Running calcurse-caldav from the post-save hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Pushing new object b4983549dad69ef88b6be63a8cf39dddf7cb284f to the server.
Pushing new object 22e8983b9f3ea3a61da9559b636273feca3ee714 to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/22e8983b9f3ea3a61da9559b6362
error: 73feca3ee714.ics.
Jun 27 17:56:08 Running calcurse-caldav from the post-save hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Importing new object 899de0e5aa31ba43d7b80b118c6bca7d.
Pushing new object 0f820b4d0545056443d09284223c73a6f68b9abc to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/0f820b4d0545056443d09284223c
error: 73a6f68b9abc.ics.
Jun 27 17:57:32 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Importing new object 899de0e5aa31ba43d7b80b118c6bca7d.
Pushing new object 0f820b4d0545056443d09284223c73a6f68b9abc to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/0f820b4d0545056443d09284223c
error: 73a6f68b9abc.ics.
Jun 27 17:57:42 Running calcurse-caldav from the post-save hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Importing new object 899de0e5aa31ba43d7b80b118c6bca7d.
Pushing new object 22e8983b9f3ea3a61da9559b636273feca3ee714 to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/22e8983b9f3ea3a61da9559b6362
error: 73feca3ee714.ics.
Jun 27 18:00:44 Running calcurse-caldav from the pre-load hook...
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Importing new object 899de0e5aa31ba43d7b80b118c6bca7d.
Pushing new object b4983549dad69ef88b6be63a8cf39dddf7cb284f to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/b4983549dad69ef88b6be63a8cf3
error: 9dddf7cb284f.ics.
Jun 27 18:01:21 Running calcurse-caldav from the post-save hook...
Jun 27 18:01:21 Running calcurse-caldav from the pre-load hook...
error: Leftover lock file detected. If there is no other synchronization
error: instance running, please remove the lock file manually and try again.
Connecting to cloud.disroot.org...
Loading synchronization database from /home/kabouik/.local/share/calcurse/caldav/sync.db...
Importing new object 899de0e5aa31ba43d7b80b118c6bca7d.
Pushing new object 22e8983b9f3ea3a61da9559b636273feca3ee714 to the server.
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
error: /remote.php/dav/calendars/kabouik/general-2/22e8983b9f3ea3a61da9559b6362
error: 73feca3ee714.ics.
You can see here that the hooks initially failed to authenticate, this was due to a mistake in my hooks: see above, at the bottom there is still a line that uses calcurse-caldav
instead of the command that gets my password from pass
. I changed those lines in the hooks and it then successfully authenticated according to the logs. But this "Unsupported Media Type" issue is back even with this new calendar, plus the occasional freezes.
Please do not read my message from the email notification, I edited it and updated the logs.
This helps a lot, thank you.
I suggest that you set general.periodicsave
to 0 (zero), i.e. turn it off (autosave
means save on exit from calcurse
and is OK). There are known problems that should be eliminated for now.
As to events with line breaks. In 4.6.0 the only possibility is this message from calcurse
when refusing to import from an iCalendar file:
line break in summary.
This is in accordance with the iCalendar standard (RFC 5545). Now I wonder, how are your iCalendar (*.ics) files created in the first place?
Thanks, I'll set general.periodicsave=0
if there are issues with it, and just take an habit in saving my changes every time I add events.
That's it, that was the message I got. I fixed it by removing those \n
though, but then faced this "Unsupported Media Type" so I started fresh with a new calendar, and quickly encountered the same issue (as you can see in the logs). The calendar file was created from the Nextcloud web interface, and all events were added using Calcurse 4.6.0, yet somehow they become unsupported in later synchronizations.
I tried from another device with nothing in the Calcurse data directory, still with this new calendar with just about 10 events in it. At first calcurse-caldav
seemed to work well: I didn't try hooks on this machine, but manual runs of calcurse-caldav
succesfully imported from cloud, or synchronized events added from Calcurse to the cloud. I didn't have the time to test if deletions would synchronize too, as I quickly started to get this "HTTP error 415 Unsupported Media Type" error. I didn't add anything special in the calendar before the issue appeared.
[nemo@Sailfish ~]$ calcurse-caldav
0 items imported, 0 items removed locally.
1 items exported, 1 items removed from the server.
[nemo@Sailfish ~]$ calcurse
[nemo@Sailfish ~]$ calcurse-caldav
1 items imported, 0 items removed locally.
0 items exported, 0 items removed from the server.
[nemo@Sailfish ~]$ calcurse
[nemo@Sailfish ~]$ calcurse-caldav
error: The server at cloud.disroot.org replied with HTTP status code 500
error: (Internal Server Error) while trying to access https://cloud.disroot.org/error: remote.php/dav/calendars/kabouik/general-2/741bf1ff39b55814db0e89c227091error: ff9e528a2e8.ics.
[nemo@Sailfish ~]$ calcurse-caldav
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.orgerror: /remote.php/dav/calendars/kabouik/general-2/741bf1ff39b55814db0e89c22709error: 1ff9e528a2e8.ics.
[nemo@Sailfish ~]$ calcurse-caldav
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.orgerror: /remote.php/dav/calendars/kabouik/general-2/741bf1ff39b55814db0e89c22709error: 1ff9e528a2e8.ics.
[nemo@Sailfish ~]$ calcurse-caldav
error: The server at cloud.disroot.org replied with HTTP status code 415
error: (Unsupported Media Type) while trying to access https://cloud.disroot.orgerror: /remote.php/dav/calendars/kabouik/general-2/741bf1ff39b55814db0e89c22709error: 1ff9e528a2e8.ics.
I noticed that after the issue, one of my appointments started to get replicated several times on Calcurse. This event is just "TRAIN" with a reminder and a time (not a full day event). I don't think, however, that it was the cause for HTTP error 415, but still am curious as tho why only this event gets replicated now (just locally).
I found someone else having a similar issue with Calcurse, but can't exclude that it's a Nextcloud issue.
Have a look at #281. Try running calcurse-caldav --debug -v
. There is also a fix: #282.
Thanks. I did see this issue and associated PR already but I didn't realize until now that the PR was merged into the pu
branch. I installed calcurse
from my distribution package, which was probably compiled off master
. I'll give the pu
branch a go as soon as possible. What is this branch exactly?
Proposed updates, to be merged to master soon.
I see, thanks. Unfortunately, I still have the issue with Calcurse 4.6.0.32-g5198 from pu
branch after clearing my ~/.local/share/calcurse/caldav
folder and running calcurse-caldav --init=two-way
again:
108 │ Connecting to cloud.disroot.org...
109 │ Loading synchronization database from /home/mathieu/.local/share/calcurse/caldav/sync.db...
110 │ Importing new object cd70f9c69bb294ed7a1db5b1d0ee7875.
111 │ Pushing new object 794b31a92c587bdcb6570b6807e0661c2db251ae to the server.
112 │ error: The server at cloud.disroot.org replied with HTTP status code 415
113 │ error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
114 │ error: /remote.php/dav/calendars/kabouik/general-2/794b31a92c587bdcb6570b6807e0
115 │ error: 661c2db251ae.ics.
116 │
117 │ Jul 07 14:47:27 Running calcurse-caldav from the pre-load hook...
118 │ Connecting to cloud.disroot.org...
119 │ Loading synchronization database from /home/mathieu/.local/share/calcurse/caldav/sync.db...
120 │ Importing new object cd70f9c69bb294ed7a1db5b1d0ee7875.
121 │ Pushing new object 794b31a92c587bdcb6570b6807e0661c2db251ae to the server.
122 │ error: The server at cloud.disroot.org replied with HTTP status code 415
123 │ error: (Unsupported Media Type) while trying to access https://cloud.disroot.org
124 │ error: /remote.php/dav/calendars/kabouik/general-2/794b31a92c587bdcb6570b6807e0
125 │ error: 661c2db251ae.ics.
I also observe many duplicates being created (just locally). Perhaps this second issue lies in my config files posted above, I'm still investigating, but so far have not identified what could be the cause. The "Unsupported Media Type" is most likely not related to the configuration files though, since some events are properly imported.
Please replace template text and remove irrelevant lines (including this one).
Before filing a new bug report, make sure you use the search function to check whether the bug has already been reported.
Version information. 4.6.0.-7-1-x86_64
Bug description. It might not be a bug, but rather me just failing to understand how to use hooks. I set up
calcurse
andcaldav-calcurse
(config files are in~/.config/calcurse
in my case) and now I can manually synchronize when I runcaldav-calcurse
¹.However, I haven't managed to make
calcurse
automatically fetch from server before running, nor automatically send to server when I save (s
) or write and quit (wq
).I have tried using hooks from
contrib/hooks
in this repository (since those incontrib/hooks/caldav
seem to be designed only if the data folder is a git repository, this is not my case). I tried placing them in~/.config/calcurse/hooks/
or~/.config/calcurse/caldav/hooks/
, with names of eitherpre-sync
orpre-save
forms, made them executable, but still no luck. Unfortunately I know nothing about Python so I really don't know how to make this work.¹ I set an alias to use
pass
: