2-Way Google Calendar Sync Not Working

SupportCategory: Questions2-Way Google Calendar Sync Not Working
RI Staff asked 2 months ago
I'm not able to sync created appointments back to EA, and deleting appointments from Google Calendar do not result in cancelled appointments in EA.
  • Set default values for sync new Appointments created on Google Calendar has a default location and default service selected.
  • All fields for Advanced Calendars Sync are selected (Calendar, Location, Service, Worker). 
  • Delete from GCal is set to Cancel Appointment in EA.
Are there any updates for the Connect extension?  I've updated the main EA plugin to the latest version, and the Connect extension plugin is at v1.2.0.
There are no errors in the sync log, and the sync is running every 5 minutes with the following log data: [2024-10-31 20:20:18.975929] [info] Syncing events for Calendar: XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com
[2024-10-31 20:25:15.361360] [info] Sync started
[2024-10-31 20:25:15.361438] [debug] Calendars for sync
XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com: array(
'location' => '1',
'service' => '1',
'worker' => '1',
)
[2024-10-31 20:25:15.361541] [info] Syncing events for Calendar: XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com
[2024-10-31 20:31:30.123004] [info] Sync started
[2024-10-31 20:31:30.123071] [debug] Calendars for sync
XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com: array(
'location' => '1',
'service' => '1',
'worker' => '1',
)
[2024-10-31 20:31:30.123162] [info] Syncing events for Calendar: XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com
[2024-10-31 20:35:17.641496] [info] Sync started
[2024-10-31 20:35:17.641567] [debug] Calendars for sync
XXXXXXXXXXXXXXXXXXXXXX@group.calendar.google.com: array(
'location' => '1',
'service' => '1',
'worker' => '1',
8 Answers
Nikola Loncar Staff answered 2 months ago

Hi, this is not good. It is running sync but not finishing it. There are couple of log records missing in each cycle. Can you please tell me is the WP Cron connected to the host scheduler?

Best regards,
Nikola

RI Staff answered 2 months ago
I have a cron job running every minute at the server level (NGINX).  
Nikola Loncar Staff replied 2 months ago

Can you please increase PHP execution time. Looks like it is interrupted.

RI Staff answered 2 months ago
PHP execution time was changed to 600 seconds (previously 300 seconds).  Nothing has changed. Events booked in EA are sent to Google Calendar, but no changes from Google Calendar are syncing back to EA.  Deleted appointments in Google Calendar do not reflect in EA.
RI Staff replied 2 months ago

Let me know if there is anything else you suggest to try and resolve this issue.

RI Staff replied 2 months ago

Let me know if there is anything else you suggest to try and resolve this issue.

RI Staff answered 1 month ago
Hi Nikola, Any updates on this issue?
Nikola Loncar Staff answered 1 month ago

Hi, sorry for late reply. Can you please create a temp account for me to check EA Settings. I am not sure why it is stopping cron execution in the middle of the process. Do you have anything inside error_log file on your hosting?

Best regards,
Nikola

RI Staff replied 1 month ago

Hi Nikola,

There are no server errors or PHP errors, and the sync runs but never logs as completed. Appointment sync one-way to Google Calendar, but if I delete on Google Calendar nothing syncs back to the site.

I’ve created a staging site and credentials for you.

RI Staff answered 1 month ago
Ok, I just re-authorized.  However, it seems that something must be wrong, because I made sure that the token was working correctly and that it was authorized right before I sent you the credentials. I was able to add a calendar to the sync so the token was working.  Not sure why it has disconnected so quickly.  I checked the Google application and that also is set up as instructed in your video, and even created a new one just to be sure. Is there any way to check the Google API to see why the token is not working?   That seems to be happening with the live site as well, as that token was also authorized yesterday and now I get the "Please check your token" error.  
RI Staff answered 1 month ago
Sending you an invite to the Google API project so you can check those settings if you'd like!  
Nikola Loncar Staff replied 1 month ago

Can you please send me the log file from Extension settings? I am not sure why it is working the way it is in your case. Could be also the hosting settings.

Nikola Loncar Staff replied 1 month ago

I don’t need it, I was able to access it via File Editor inside plugin section.

Nikola Loncar Staff replied 1 month ago

Can you please try the following, change mappings to pull event from some other calendar. Maybe there is something in that primary calendar that is blocking cron execution.

Best regards,
Nikola

RI Staff replied 1 month ago

Hi Nikola. I created a new calendar just for EA testing (which is what the plugin is connected to, and it’s having the same issue. It looks like everything was working fine on the existing server until some time in mid-October, so I’m not sure why there would be an issue suddenly.

Any other suggestions on what the issue could be?

RI Staff answered 1 month ago
Hi Nikola, Were you able to find any additional information about the issue we're experiencing with the Google tokens and 2-way sync?
Nikola Loncar Staff replied 1 month ago

I am not sure what can be tested. For some reason it is not completing the import script. Maybe there were some changes on hosting settings. Could be that the time execution is limited now. Is there anyone that can be asked for such thing on your hosting?

RI Staff replied 3 weeks ago

I manage the server, and haven’t changed the execution times. But could you let me know what you recommend those to be set at?