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

[CAL-3834] Unable to delete a broken CalDAV integration #15187

Open
LucaDiba opened this issue May 23, 2024 · 1 comment
Open

[CAL-3834] Unable to delete a broken CalDAV integration #15187

LucaDiba opened this issue May 23, 2024 · 1 comment
Labels
🐛 bug Something isn't working caldav area: caldav, fastmail, Baïkal, Kerio, mailbox, nextcloud Medium priority Created by Linear-GitHub Sync
Milestone

Comments

@LucaDiba
Copy link

LucaDiba commented May 23, 2024

Issue Summary

A while ago I added a CalDAV to Cal.com. Then, I deleted the CalDAV server, so all the requests made to that URL fail.
Unfortunately, Cal.com doesn't handle this error and this leads to a 504 timeout error to be thrown when /calendars calls connectedCalendars,integrations. Also, even after the error is thrown, the /calendars page still shows a loading interface even though the call to the API returned an error.

I'm currently unable to even delete the CalDAV since the calendars page doesn't work at all, and Cloudflare blocks the API calls to DELETE /v1/selected-calendars/... due to the externalId being an URL.

Steps to Reproduce

  1. Create a CalDAV calendar
  2. Add it to Cal.com
  3. Stop the CalDAV server
  4. Try to load the calendars page in Cal.com

Actual Results

  • The calendars page shows an infinite loading interface.

Expected Results

  • The calendars page shows the CalDAV even if the server doesn't respond, so that I'm able to delete the broken integration.

Technical details

  • Using Cal.com.

Evidence

Screenshot 2024-05-23 133837

CAL-3834

@dosubot dosubot bot added caldav area: caldav, fastmail, Baïkal, Kerio, mailbox, nextcloud 🐛 bug Something isn't working labels May 23, 2024
Copy link

dosubot bot commented May 23, 2024

Ciao @LucaDiba! Sono Dosu, un bot qui per aiutarti a risolvere bug, rispondere alle tue domande e diventare un contributore mentre aspettiamo un manutentore umano. Sono qui per aiutarti con il tuo problema!

To resolve the issue of deleting a broken CalDAV integration in Cal.com when the calendars page shows an infinite loading interface and Cloudflare blocks the API calls, you can use the provided API endpoint directly. Here is a step-by-step guide on how to do it:

Steps to Delete the Broken CalDAV Integration

  1. Identify the externalId: Ensure you have the externalId of the CalDAV integration. This is typically the URL of the CalDAV server.

  2. URL Encode the externalId: Since Cloudflare blocks the API calls due to the externalId being a URL, you need to URL encode the externalId to safely include it in the API request.

    const externalId = "your-external-id";
    const safeExternalId = encodeURIComponent(externalId);
  3. Construct the API URL: Use the endpoint /v1/selected-calendars/{userId}_{integration}_{externalId} with the appropriate values for userId, integration, and the URL-encoded externalId.

  4. Make a DELETE Request: Use a tool like curl or Postman to make a DELETE request to the constructed URL. Ensure you include your API key in the query parameters.

Here is an example using curl:

curl -X DELETE "https://your-calcom-instance.com/v1/selected-calendars/{userId}_{integration}_{safeExternalId}?apiKey=your_api_key"

Replace {userId}, {integration}, {safeExternalId}, and your_api_key with the actual values.

Example Code Snippet

Here is an example of how you can construct and execute the DELETE request programmatically:

const axios = require('axios');

const userId = 'your_user_id';
const integration = 'caldav';
const externalId = 'your-external-id';
const safeExternalId = encodeURIComponent(externalId);
const apiKey = 'your_api_key';

const url = `https://your-calcom-instance.com/v1/selected-calendars/${userId}_${integration}_${safeExternalId}?apiKey=${apiKey}`;

axios.delete(url)
  .then(response => {
    console.log('Integration deleted successfully:', response.data);
  })
  .catch(error => {
    console.error('Error deleting integration:', error.response ? error.response.data : error.message);
  });

By following these steps, you should be able to delete the broken CalDAV integration and resolve the issue with the infinite loading interface on the calendars page.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@PeerRich PeerRich added the Medium priority Created by Linear-GitHub Sync label May 30, 2024
@PeerRich PeerRich added this to the v4.3 milestone May 30, 2024
@PeerRich PeerRich changed the title Unable to delete a broken CalDAV integration [CAL-3834] Unable to delete a broken CalDAV integration May 30, 2024
@PeerRich PeerRich modified the milestones: v4.3, v4.4 Jun 3, 2024
@emrysal emrysal modified the milestones: v4.4, v4.2 Jun 14, 2024
@keithwillcode keithwillcode modified the milestones: v4.2, v4.4 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working caldav area: caldav, fastmail, Baïkal, Kerio, mailbox, nextcloud Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

4 participants