cloud-atlas-ai / obsidian-ics

Generate Daily Planner from ical feeds
MIT License
142 stars 26 forks source link

Windows / Office365 calendar: failure to import from ICS #20

Closed TSSlade closed 1 year ago

TSSlade commented 2 years ago

When invoking the ICS: Import events command from the command palette from within a Daily Note, no new content appears in the note. The console error is as follows:

image

The structure of the Daily Note (created via the Daily notes: Open today's daily note command) is as follows:

---
tags:
---

[[2022-01-06 | << Yesterday]] | [[2022-01-08| Tomorrow >>]]

## Meetings
(add embeddings once created:)
+ [[2022-01-07_XX]]
+ [[2022-01-07_XX]]

## Tasks
### New
#todo
- [ ] task-for-self 
### Carried forward
- [ ] embedded-backlink-here

I have separately confirmed that the .ics link can be downloaded and imported into Outlook manually (outside of Obsidian).

muness commented 2 years ago

That looks like it might be a different plugin failing. Mind trying with a fresh vault with just the ics plugin in it to rule that out? Thank you for the bug report!

TSSlade commented 2 years ago

I was thinking it would be the ICS one because of that line that says Object.parseICS in the error trace.

Fresh vault with the following structure:

.
|-- .obsidian
|   |-- app.json
|   |-- appearance.json
|   |-- community-plugins.json
|   |-- core-plugins.json
|   |-- daily-notes.json
|   |-- hotkeys.json
|   |-- plugins
|   |   `-- obsidian-ics
|   |       |-- data.json
|   |       |-- main.js
|   |       `-- manifest.json
|   `-- workspace
|-- _templates
|   `-- DayPlanner.md
`-- calendar
    `-- 2022-01-07.md

Outcome:

image
muness commented 2 years ago

Thanks for giving that a try!

Something in my code or. ICS parser must be using a module that isn't declared as a dependency or that I am not correctly packaging in the distribution.

What would really help is if you could give me access to an ICS that causes the problem that you wouldn't mind sharing publicly. That would give me a way to try to reproduce the error.

Barring that, I do use O365 and outlook.com, so I can try to reproduce the error that way. Anything unusual in the calendar that I can try recreating on my end?

TSSlade commented 2 years ago

You can use this link: https://outlook.office365.com/owa/calendar/ef103adb9468497a8af45f70bfda1ff1@rti.org/c9b3df9f2a96470d825f856af0811d8811767849587979984698/calendar.ics I'll nuke it / invalidate it in due course.

There's nothing particularly unusual in the source calendar that's failing for me. It's got your usual mix of recurring, non-recurring, recurring-but-with-exceptions, etc. sorts of entries.

This screenshot shows what happens when I link both the original calendar (whose link I had since invalidated) and the (fresh, largely empty) tester calendar I made for you:

image

Error is in this line:

),e.editor.getCursor())}})}onunload(){console.log("unloading ics plugin")}async loadSettings(){this.data=Object.assign({},Lo,await this.loadData())}async saveSettings(){await this.saveData(this.data)}};0&&(module.exports={});

Now with the original (invalidated) calendar removed:

image

Looks like what we were getting before...?

muness commented 2 years ago

Confirming that I see the same error in Mac OS on parsing that ICS. Which of course reminds me that I should add parse error handling instead of it just blowing up like this.

TSSlade commented 2 years ago

Any chance it's a result of permissions being locked down to "See busy/not busy" rather than "See details"? (That's pretty much the only thing I can think of that's in common between those two calendars I tried it on.)

mruderman commented 2 years ago

Thanks @muness for this fantastic plugin. Any update on this issue? @TSSlade , were you able to resolve with busy/notbusy?

TSSlade commented 2 years ago

@mruderman - no, no dice on my end. @muness - anything we might be able to do to help see about shaking things loose?

PJC-64 commented 2 years ago

I had the same issue , but with an ICloud calendar - my "workaround", was to add it to as Google calendar using the ICloud link, then expose the Google link, and connect to that one, which sounds clunky, but works transparently in practice - for me, at least.

I still only make changes to the iCloud Calendar, and everything else just works. I can only assume that Google expose a differently-formatted file, which works.

TSSlade commented 2 years ago

@PJC-64 - can you clarify the workaround?

Are you saying that you connected this plugin to a Google Calendar, but the Google Calendar link was actually pulling data from an iCloud calendar that had been shared with that Google account?

Or...?

PJC-64 commented 2 years ago

@TSSlade - no problem. There are effectively 3 main steps:

  1. On your iCloud calendar website:
    • Open Calendar sharing for the specific calendar you want to (eventually) use in Obsidian.
    • Select Public, and copy the WebCal link that's generated.
  2. On your Google calendar website:
    • Add a new calendar, using From URL, and paste in your iCloud WebCal link.
    • Check the Make calendar publicly accessible box, and apply.
    • Click on the newly-created calendar, select Calendar settings
    • Scroll until you find the Public address in iCal format link and copy the link that's there.
  3. In Obsidian:
    • Open this plug-ins settings, and add new.
    • Paste in your Google iCal link.

This then works (for me) in a Daily note :)

lvarming commented 2 years ago

I just testet the work-around with my O365 calendar in Google but I don't get anything into my Daily Note (which is from Periodic Notes, but anyway.

I would LOVE to be able to pull my O365 work calendar into a daily not so I really hope the issue will get resolved.

.. and thanks for the great work - I can't really use it before the O365 works too but would be happy to donate when I actually can use the plugin.

muness commented 1 year ago

I just tried calendars from outlook.com and O365 and both worked. When I tried last year, they both failed. Closing this for now.

If you happen to try again and this fails, please reopen. Please include a publicly accessible ICS that has the issue that you can share with me.

purierca commented 7 months ago

Hi! Adding to this I have this issue now, where my personal Outlook (Live) calendar works great, whereas my professional Outlook (Office) calendar doesn't load. Here's the console: image