calendarview icon indicating copy to clipboard operation
calendarview copied to clipboard

unable to load an ICS file form google calendar private link

Open ludovicperrier opened this issue 7 years ago • 2 comments

Hello, i try to use your small code to create simple wall calendar screen view. I want load an ics file serve at this url : https://calendar.google.com/calendar/ical/diotasoft.com_5j6s4tui29e6atghcul1gsqqt8%40group.calendar.google.com/private-211973e9d9a1d4f7652615da0142b384/basic.ics

I have an error in browser console: Failed to load https://calendar.google.com/calendar/ical/diotasoft.com_5j6s4tui29e6atghcul1gsqqt8%40group.calendar.google.com/private-211973e9d9a1d4f7652615da0142b384/basic.ics: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. index.html:1 Uncaught (in promise) Error, HTTP 0

So I put your website on xampp instance and serve it at localhost, I put also the file ics at url http://localhost/basic.ics finally, I create a file .htaccess with this content Header set Access-Control-Allow-Origin "*"

Now I have no error but nothing is diplay on calendar view. Can you help me?

Regards

ludovicperrier avatar Jul 11 '18 06:07 ludovicperrier

That's unfortunate. If you're trying to fetch a calendar from a different domain you'll definitely need access-control headers for CORS to work. If you look at the network panel in the developer console, do you see it fetching the ics file?

luser avatar Jul 11 '18 17:07 luser

If you're just using a Google calendar, you can click "Add Google Calendars" from the settings dialog and it will ask you to grant permissions to your Google account. That's the way I use it locally. I have a full-screen browser loaded on an old Android tablet attached to my refrigerator.

luser avatar Jul 11 '18 17:07 luser