cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-571] When scheduling a meeting: `unexpected character at line 1 column 1 of the JSON data`

Open victorpaleologue opened this issue 2 years ago • 29 comments

Issue Summary

I have setup the CalDAV app, and an event of 1 hour of call via cal.com. People can schedule appointments here: https://cal.com/victor-paleologue/1h. They receive an e-mail notification, but not me, and the form displays an error (sorry for my French):

La réunion n'a pas pu être réservée. unexpected character at line 1 column 1 of the JSON data

image

Steps to Reproduce

  1. Schedule an appointment here: https://cal.com/victor-paleologue/1h
  2. Be very clear that this is a test, please.
  3. See for yourself =)

Technical details

  • Firefox 107.0.1
  • Mac OS Ventura 13.0.1
  • arm64 processor

CAL-571

victorpaleologue avatar Dec 09 '22 13:12 victorpaleologue

@alishaz-polymath can you investigate this?

@victorpaleologue can you confirm that this is only happening with CalDav?

PeerRich avatar Dec 09 '22 16:12 PeerRich

@PeerRich could you detail a little bit how to check with something else than CalDAV without uninstalling the CalDAV integration ? I did not see a way to specify which calendar to work with for an event type.

victorpaleologue avatar Dec 09 '22 16:12 victorpaleologue

if possible uninstall it and add another calendar. do you have a Gmail by any chance?

PeerRich avatar Dec 09 '22 16:12 PeerRich

Actually I can tell cal.com to schedule the meeting on the Google Agenda without uninstalling the CalDAV one.

Here is the setup :

image

It still behaves badly.

If I disable checking the CalDAV, it works fine.

victorpaleologue avatar Dec 13 '22 11:12 victorpaleologue

Note that it takes a loooong time before it fails. The error says the JSON could not be parsed, as if it was replaced with an error message or simply nothing. So I suspect a timeout error.

victorpaleologue avatar Dec 13 '22 11:12 victorpaleologue

I can't seem to reproduce this error by scheduling an appointment from your webpage https://cal.com/victor-paleologue/1h

sashajenner avatar Dec 17 '22 07:12 sashajenner

Sorry, I had switched back to using Google Calendar. It's back to not working with CalDAV now =)

victorpaleologue avatar Dec 17 '22 13:12 victorpaleologue

@bopearce, following your update, I have created a new event type called test, and I did not touch any parameter: https://cal.com/victor-paleologue/test It still fails.

victorpaleologue avatar Dec 20 '22 14:12 victorpaleologue

Sounds good. Let me know when you have tried. Thanks!


From: Victor Paléologue @.> Sent: Tuesday, December 20, 2022 7:33 AM To: calcom/cal.com @.> Cc: Bo Pearce @.>; Mention @.> Subject: Re: [calcom/cal.com] [CAL-571] When scheduling a meeting: unexpected character at line 1 column 1 of the JSON data (Issue #5955)

@bopearcehttps://github.com/bopearce, following your updatehttps://app.bountysource.com/issues/114483666-cal-571-when-scheduling-a-meeting-unexpected-character-at-line-1-column-1-of-the-json-data, I can create a new event and see if the error occurs there too.

— Reply to this email directly, view it on GitHubhttps://github.com/calcom/cal.com/issues/5955#issuecomment-1359455767, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAI76BI455JSK5WT4SSNGFTWOG7VDANCNFSM6AAAAAASZLOM3Q. You are receiving this because you were mentioned.Message ID: @.***>

bopearce avatar Dec 20 '22 19:12 bopearce

I have tried, it fails.

victorpaleologue avatar Dec 20 '22 20:12 victorpaleologue

What is the link to the new cal invite? Can you send me a screenshot of the cal invite settings? Do you have any advanced settings set or are they basic settings? Does this happen on every calendar event?

A SS similar to this: [cid:cf3caa32-84b1-4b79-b6f8-2079e246b78e]


From: Victor Paléologue @.> Sent: Tuesday, December 20, 2022 1:56 PM To: calcom/cal.com @.> Cc: Bo Pearce @.>; Mention @.> Subject: Re: [calcom/cal.com] [CAL-571] When scheduling a meeting: unexpected character at line 1 column 1 of the JSON data (Issue #5955)

I have tried, it fails.

— Reply to this email directly, view it on GitHubhttps://github.com/calcom/cal.com/issues/5955#issuecomment-1360227336, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAI76BMIZOC6ZS3E5S65JXLWOIMPXANCNFSM6AAAAAASZLOM3Q. You are receiving this because you were mentioned.Message ID: @.***>

bopearce avatar Dec 20 '22 20:12 bopearce

https://cal.com/victor-paleologue/test It's using the default settings. It happens on every calendar event. What is the SS?

victorpaleologue avatar Dec 20 '22 21:12 victorpaleologue

A screenshot


From: Victor Paléologue @.> Sent: Tuesday, December 20, 2022 2:03 PM To: calcom/cal.com @.> Cc: Bo Pearce @.>; Mention @.> Subject: Re: [calcom/cal.com] [CAL-571] When scheduling a meeting: unexpected character at line 1 column 1 of the JSON data (Issue #5955)

https://cal.com/victor-paleologue/test It's using the default settings. It happens on every calendar event. What is the SS?

— Reply to this email directly, view it on GitHubhttps://github.com/calcom/cal.com/issues/5955#issuecomment-1360240040, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAI76BLNTWXC5AUHFZUTWJDWOINLJANCNFSM6AAAAAASZLOM3Q. You are receiving this because you were mentioned.Message ID: @.***>

bopearce avatar Dec 20 '22 21:12 bopearce

I see the problem, but it is very bizarre. I'm not sure what exactly is causing it. The issue is apparent here when the request is made to create the calendar invite:

https://user-images.githubusercontent.com/1179397/208777739-658b0c50-601b-4529-b4a9-6a1c5f8ad1d9.png

The Response in the above screenshot returns 502 bad gateway. The request should return a JSON blob, it isn't returned and then the javascript on the site fails with the error "Could not book the meeting. unexpected character at line 1 column 1 of the JSON data" because it is expecting a response with JSON not some random HTML content.

This led me to think that it was maybe an issue with the Event, but obviously not. Which makes me think it must be an error with your account.

Can you please create a new test account and see if you encounter the same issue? Thanks.

edit - sorry, did not realize the screenshots were not showing up.

bopearce avatar Dec 20 '22 21:12 bopearce

@alishaz-polymath can you investigate this?

PeerRich avatar Dec 20 '22 21:12 PeerRich

With a test account, using a test account on the nextcloud instance, it works : https://cal.com/testvictorpaleologue/15min

victorpaleologue avatar Dec 20 '22 21:12 victorpaleologue

With the same cal.com test account, if I try to tie it to my actual nextcloud instance, it failed. I tried again twice, and then it worked. It seems related to that specific nextcloud account. I hardly can configure the cal.com account now. Anyways, there is an issue when reporting the error. The HTTP code is clearly not a 200, so it should not be blindly parsing the JSON, and it should report what really happened : the nextcloud account has an issue.

victorpaleologue avatar Dec 20 '22 21:12 victorpaleologue

I mean, more precisely : please let this error message be transparent of the error code of the remote calendar.

victorpaleologue avatar Dec 20 '22 21:12 victorpaleologue

Can you re-open the issue, or should I write another issue to get the error message fixed?

victorpaleologue avatar Dec 20 '22 21:12 victorpaleologue

@victorpaleologue Probably closed on accident, no need to be rude about it 👎

emrysal avatar Dec 20 '22 21:12 emrysal

Sorry, I did not take well seeing the issue closed so fast, but indeed it's no excuse for being rude.

victorpaleologue avatar Dec 20 '22 22:12 victorpaleologue

wops, yea by accident

PeerRich avatar Dec 20 '22 22:12 PeerRich

Good morning, it appears the error message changed today. It is now: La réunion n'a pas pu être réservée. No available users found.

victorpaleologue avatar Dec 21 '22 13:12 victorpaleologue

Good Morning @victorpaleologue That's strange. From the initial assessment it appeared as though the server was timing out, but this response suggests there's a failure of availability for the user in contention. I still wonder if server timeout is actually throwing this error (which is inaccurate, obviously) 🤔

alishaz-polymath avatar Dec 21 '22 14:12 alishaz-polymath

I have just updated my Nextcloud instance just in case, I get the same issues.

victorpaleologue avatar Dec 21 '22 15:12 victorpaleologue

But you do confirm that this doesn't happen when attempted with the test account on the same nextcloud instance?

alishaz-polymath avatar Dec 21 '22 16:12 alishaz-polymath

Yes, with the Nextcloud test account on the same Nextcloud instance, it works. The biggest difference I can think of between the two Nextcloud accounts is the size of the agenda and tasks. Seen from cal.com, is it still giving a 502 error?

victorpaleologue avatar Dec 21 '22 21:12 victorpaleologue

After figuring out ways to optimize the nextcloud instance, scheduling an event works. However if the event is in an extended slot from a "date override", I get the No available users found. error. That one is therefore another issue. Shall I open it?

victorpaleologue avatar Dec 21 '22 22:12 victorpaleologue

I can confirm that if I extend the schedule instead of using a date override, I can schedule the meeting.

victorpaleologue avatar Dec 21 '22 22:12 victorpaleologue

Well in the end, I had it working again. So let's say @bopearce has solved it and get on with it. I'll write another issue about the poor error message, and another one about "No available users found.".

victorpaleologue avatar Jan 06 '23 13:01 victorpaleologue