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

Cannot subscribe to birthday calendar from Facebook #26558

Closed
schachtnerth-zz opened this issue Nov 6, 2016 · 6 comments · Fixed by owncloud/calendar#764
Closed

Cannot subscribe to birthday calendar from Facebook #26558

schachtnerth-zz opened this issue Nov 6, 2016 · 6 comments · Fixed by owncloud/calendar#764
Assignees
Milestone

Comments

@schachtnerth-zz
Copy link

schachtnerth-zz commented Nov 6, 2016

#I want to have my Facebook friends' birthdays available in my OwnCloud calendar. I saw that there's such a convenient function like "subscribe". This is working pretty fine (so far) for my Facebook events, but when trying to subscribe to the birthdays calendar, an exclamation mark is shown next to the subscribed calendar and no birthday events are shown.

I'm not sure about the issue, but some ics verifiers reported an issue with the downloaded ics file from Facebook. For example, the verifier at http://severinghaus.org/projects/icv/ reports the ics to be invalid due to a wrong date in DTSTART. It probably expects yyyymmddThhmmssX, but Facebook only provides yyyymmdd. I checked that in RFC 2445 and according to that, the DTSTART parameter is correct here, so the verifier is wrong. Could this be a similar issue here?
Is there any way to debug that further? (I would even try to help fix this issue, but I'm a beginner and it might take long until I can be productive here...)

By the way, when using the ICS file and import it into a new calendar, this also doesn't work.
Here is a sample ICS file where this issue is appearing:

#############################
BEGIN:VCALENDAR
PRODID:-//Facebook//NONSGML Facebook Events V1.0//EN
X-WR-CALNAME:Geburtstage von Freunden
X-PUBLISHED-TTL:PT12H
X-ORIGINAL-URL:https://www.facebook.com/events/birthdays/
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20161108
SUMMARY:Michael Meier's birthday
RRULE:FREQ=YEARLY
DURATION:P1D
UID:b100002077399056@facebook.com
END:VEVENT
END:VCALENDAR
#############################

Steps to reproduce (original issue)

  1. Get the URL for the birthday calendar from Facebook:
    (Navigate to https://www.facebook.com/events/upcoming, right-click "birthdays" on the right and copy the link into the clipboard)
  2. open OwnCloud Calendar and create a new subscription
  3. paste the URL from the clipboard as webcal URL and click "create"

As I do not get any logs using this procedure, I tried another approach which also did not work correctly and might have the same root cause:

Steps to reproduce (modified)

  1. Get the URL for the birthday calendar from Facebook:
    (Navigate to https://www.facebook.com/events/upcoming, right-click "birthdays" on the right and copy the link into the clipboard)
  2. Download the corresponding ICS file and optionally modify (truncate) it so that it only contains one birthday
  3. open OwnCloud Calendar and import the ICS file into an existing calendar.

Expected behaviour

All the birthdays of my Facebook friends should now appear in the Calendar

Actual behaviour

None of the birthdays is shown, instead there's an exclamation mark next to the subscribed calendar.

Server configuration

Operating system:
Ubuntu 16.04.1 LTS Server version

Web server:
Apache/2.4.18 (Ubuntu)

Database:
mysqld Ver 5.7.16-0ubuntu0.16.04.1 for Linux on x86_64 ((Ubuntu))

PHP version:
PHP 7.0.8-0ubuntu0.16.04.3

ownCloud version: (see ownCloud admin page)
ownCloud 9.1.1 (stable)

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
apt-get install

Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:

Enabled:

  • activity: 2.3.2
  • calendar: 1.4.0
  • comments: 0.3.0
  • dav: 0.2.6
  • federatedfilesharing: 0.3.0
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.6.0
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.10.0
  • files_texteditor: 2.1
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.0
  • notifications: 0.3.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1
    Disabled:
  • encryption
  • external
  • files_antivirus
  • user_external
  • user_ldap

The content of config/config.php:

{
"system": {
"updatechecker": false,
"instanceid": "ocnrxoiauxnh",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"192.168.178.7",
"toms.ddns.net"
],
"datadirectory": "/var/lib/owncloud",
"overwrite.cli.url": "http://192.168.178.7/owncloud",
"dbtype": "mysql",
"version": "9.1.1.3",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"memcache.local": "\OC\Memcache\APCu",
"mail_from_address": "owncloud",
"mail_smtpmode": "php",
"mail_domain": "testinstance.sampledom.de",
"loglevel": 0
}
}

Are you using external storage, if yes which one:
Google Drive
Dropbox
FTP

Are you using encryption:
no

Are you using an external user-backend, if yes which one:
no

Client configuration

Browser:
Mozilla Firefox 50.0

Operating system:
Microsoft Windows 10 Professional German Version 10.0.14393

Logs

Web server access log

192.168.178.76 - - [07/Nov/2016:09:01:51 +0100] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 2950 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"

Web server error log

none

ownCloud log (data/owncloud.log)

{
	"reqId":"bLjGGWiOTLfRyRZF1IGU",
	"remoteAddr":"192.168.178.76",
	"app":"webdav",
	"message":"Exception: {
		\"Message\":\"The supplied iCalendar datetime value is incorrect: 2016-11-08T::\",
		\"Exception\":\"LogicException\",
		\"Code\":0,
		\"Trace\":\"
			#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/DateTimeParser.php(188): Sabre\\\\VObject\\\\DateTimeParser::parseDateTime('2016-11-08T::', NULL)\\n
			#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Property\\\/ICalendar\\\/DateTime.php(172): Sabre\\\\VObject\\\\DateTimeParser::parse('2016-11-08T::', NULL)\\n
			#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Property\\\/ICalendar\\\/DateTime.php(144): Sabre\\\\VObject\\\\Property\\\\ICalendar\\\\DateTime->getDateTimes(NULL)\\n
			#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/ITip\\\/Broker.php(883): Sabre\\\\VObject\\\\Property\\\\ICalendar\\\\DateTime->getDateTime()\\n
			#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/ITip\\\/Broker.php(198): Sabre\\\\VObject\\\\ITip\\\\Broker->parseEventInfo(Object(Sabre\\\\VObject\\\\Component\\\\VCalendar))\\n
			#5 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Schedule\\\/Plugin.php(518): Sabre\\\\VObject\\\\ITip\\\\Broker->parseEvent(Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), Array, NULL)\\n
			#6 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Schedule\\\/Plugin.php(294): Sabre\\\\CalDAV\\\\Schedule\\\\Plugin->processICalendarChange(NULL, Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), Array, Array, false)\\n
			#7 [internal function]: Sabre\\\\CalDAV\\\\Schedule\\\\Plugin->calendarObjectChange(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), Object(Sabre\\\\VObject\\\\Component\\\\VCalendar), 'calendars\\\/schac...', false, true)\\n
			#8 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n
			#9 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(889): Sabre\\\\Event\\\\EventEmitter->emit('calendarObjectC...', Array)\\n
			#10 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(771): Sabre\\\\CalDAV\\\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars\\\/schac...', false, Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), true)\\n
			#11 [internal function]: Sabre\\\\CalDAV\\\\Plugin->beforeCreateFile('calendars\\\/schac...', 'BEGIN:VCALENDAR...', Object(OCA\\\\DAV\\\\CalDAV\\\\Calendar), false)\\n
			#12 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n
			#13 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1034): Sabre\\\\Event\\\\EventEmitter->emit('beforeCreateFil...', Array)\\n
			#14 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(523): Sabre\\\\DAV\\\\Server->createFile('calendars\\\/schac...', 'BEGIN:VCALENDAR...', NULL)\\n
			#15 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n
			#16 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n
			#17 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n
			#18 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n
			#19 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(172): Sabre\\\\DAV\\\\Server->exec()\\n
			#20 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(29): OCA\\\\DAV\\\\Server->exec()\\n
			#21 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n
			#22 {main}\",
			\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/DateTimeParser.php\",
			\"Line\":40,\"User\":\"schachtnerth\"
	}",
	"level":4,
	"time":"2016-11-07T07:54:08+00:00",
	"method":"PUT",
	"url":"\/remote.php\/dav\/calendars\/schachtnerth\/test\/ownCloud-ck2lxypj0vgx2norrcrjkp.ics",
	"user":"schachtnerth"
}



#### Browser log
Firefox network log:
- Request address: https://[my host name]/remote.php/dav/calendars/schachtnerth/test/ownCloud-b0jewa7kjx55a3ctzc79k.ics
- Request method: PUT
- External address: 192.168.178.7:443
- Status Code: 500 - Internal Server Error
- Version: HTTP/1.1
- Answer document:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>LogicException</s:exception>
  <s:message>The supplied iCalendar datetime value is incorrect: 2016-11-08T::</s:message>
</d:error>

@ghost
Copy link

ghost commented Nov 6, 2016

Looks like the following is causing the issue here:

[message] fopen(http:\/\/webcals\/\/www.facebook.com\/ical\/u.php?uid=1287291945&key=AQBj4F_xWHD9Th8E): failed to open stream: php_network_getaddresses: getaddrinfo failed: No address associated with hostname

To make sure that this is indeed your issue i would suggest to clear your logfiles (the current posted looks quite large and seems to contain als unrelated and old stuff). Then try to just add that webcal address to only get the relevant log entries to that problem.

Furthermore i suggest to remove the logfiles in your initial post at it looks like these are containing quite personal data like names etc. I wouldn't post stuff like this publicly.

@ghost
Copy link

ghost commented Nov 6, 2016

And just did a short research and stumbled over:

https://digibites.zendesk.com/hc/en-us/articles/200299683-How-do-I-get-Facebook-Birthdays-or-Facebook-Upcoming-events-in-Google-Calendar-

It seems you have put in:

webcals://www.facebook.com/ical/u.php?...

into the input field of ownCloud. However the calendar app is not using such webcals:// urls and you need to use:

https://www.facebook.com/ical/u.php?...

instead. Not a bug in oC from my PoV but a wrong usage due to the lack of documentation for the calendar app.

@schachtnerth-zz
Copy link
Author

Ok, I'll update that tomorrow.
I will also check the webcal:// URL, but I think I already tried that.

In the meantime, I found out some additional information.
When downloading the calendar to a file, saving it to disk and import it to an already existing calendar, I get many HTTP 500 answers.
The error messages are like so: "Invalid datetime value 2017-03-17T::"
This seems to me as if the underlying iCal framework does not know about dtstart values which are date-only.

@DeepDiver1975 DeepDiver1975 added this to the 9.2 milestone Nov 7, 2016
@DeepDiver1975 DeepDiver1975 self-assigned this Nov 7, 2016
@schachtnerth-zz
Copy link
Author

schachtnerth-zz commented Nov 7, 2016

Thanks for your support.
I've now updated my original post.

Regarding your assumption that using webcal:// instead of http(s):// could be the cause of the behaviour: I tried both and no difference. In the browser network log (I cannot export it) there are two entries:

  • MKCOL /remote.php/dav/calendars/testuser/geburtstage-von-freunden-6/ HTTP/1.1
  • PROPFIND /remote.php/dav/calendars/testuser/geburtstage-von-freunden-6/ HTTP/1.1

For the first packet, I do not have an answer document, but for the second packet, the answer document is:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
 <d:response>
  <d:href>/remote.php/dav/calendars/testuser/geburtstage-von-freunden-6/</d:href>
  <d:propstat>
   <d:prop>
    <d:displayname>Geburtstage von Freunden</d:displayname>
    <d:resourcetype>
     <d:collection/>
     <cs:subscribed/>
    </d:resourcetype>
    <x1:calendar-order xmlns:x1="http://apple.com/ns/ical/">0</x1:calendar-order>
    <x1:calendar-color xmlns:x1="http://apple.com/ns/ical/">#74a2e7</x1:calendar-color>
    <cal:supported-calendar-component-set>
     <cal:comp name="VTODO"/>
     <cal:comp name="VEVENT"/>
    </cal:supported-calendar-component-set>
    <d:acl>
     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/testuser/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:read/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>
     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/testuser/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:write/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>
     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/testuser/calendar-proxy-write/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:read/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>
     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/testuser/calendar-proxy-write/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:write/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>
     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/testuser/calendar-proxy-read/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:read/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>
    </d:acl>
    <d:owner>
     <d:href>/remote.php/dav/principals/users/testuser/</d:href>
    </d:owner>
    <cs:source>
     <d:href>http://www.facebook.com/ical/b.php?uid=xxxxxxx&amp;key=yyyyyyy</d:href>
    </cs:source>
   </d:prop>
   <d:status>HTTP/1.1 200 OK</d:status>
  </d:propstat>
  <d:propstat>
   <d:prop>
    <cal:calendar-description/>
    <cal:calendar-timezone/>
    <oc:calendar-enabled/>
    <oc:invite/>
   </d:prop>
   <d:status>HTTP/1.1 404 Not Found</d:status>
  </d:propstat>
 </d:response>
</d:multistatus>

@DeepDiver1975
Copy link
Member

I see following error in the js error console:

Error: invalid date-time value: "2016--1-1-T9T::::"

@felixheidecke mind taking a look? There is something broken in the ical processing in the calendar app - THX

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants