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

GoogleDrive & OneDrive - Error Incorrect ics/ical URL #412

Closed
kurgompro opened this issue Feb 13, 2024 · 5 comments
Closed

GoogleDrive & OneDrive - Error Incorrect ics/ical URL #412

kurgompro opened this issue Feb 13, 2024 · 5 comments

Comments

@kurgompro
Copy link

The problem

Since a couple of days, the GAS-ICS-Sync Script in my account stopped working for ICS files stored on Google Drive AND OneDrive. I get following error: [ERROR] Incorrect ics/ical URL

(a) I have updated the GAS-ICS-Sync Script to the latest version (5.8) on this page;
(b) I tried following URL formats:

https://1drv.ms/u/s![FILE-ID]
https://onedrive.live.com/embed?resid=[FILE-ID]&authkey=[AUTH-KEY]
https://drive.google.com/uc?&id=[FILE-ID]
https://drive.google.com/uc?export=view&id=[FILE-ID]
https://drive.google.com/uc?export=download&id=[FILE-ID]
https://drive.google.com/thumbnail?id=[FILE-ID]
https://drive.google.com/thumbnail?id=[FILE-ID]&sz=w1000

These URL types have worked until a couple of days ago, but they have stopped working. Is this a known issue?

Version of GAS-ICS-Sync

5.8

Additional information & file uploads

No response

@kurgompro
Copy link
Author

Addition: The issue is not related to the Outlook365 issue where 'END:VCALENDAR' and/or 'END:VEVENT' are missing (#388).

This issue seems to be related to the URL definition, given it's a working ICS of which the import works fine when putting on an FTP with absolute URL.

@jonas0b1011001
Copy link
Collaborator

This does not sound like a script issue. If the URLs are not serving the expected ical data there's nothing we can do.

However, for GDrive you could get the files directly via the Drive Integration.

Adding something like

    const IDregex = /https:\/\/drive\.google\.com\/.*id=([^&]+).*/;
    if (IDregex.test(url)) {
      let id = IDregex.exec(url)[1];
      let icsString = DriveApp.getFileById(id).getBlob().getDataAsString();
      result.push([icsString, colorId]);
      continue;
    }

to

should work just fine.

@kurgompro
Copy link
Author

@jonas0b1011001,
Adding these lines of code actually helped perfectly, the ICS is now fetching again - Thanks a lot!

@derekantrican,
Maybe good to add these few lines in the next version of GAS-ICS-Sync.

@derekantrican
Copy link
Owner

@kurgompro glad Jonas got you up & working. I don't think we'll incorporate these Google Drive lines into the main code as it's not an explicitly supported scenario. But you're welcome to post as a "show & tell" here: https://github.com/derekantrican/GAS-ICS-Sync/discussions/categories/show-and-tell

@derekantrican
Copy link
Owner

Closing as the problem seems to be solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants