Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

[bug] Unable to sync CalDAV calendar from Yetiforce to Outlook #12532

Closed
2techcomputing opened this issue Feb 5, 2020 · 41 comments
Closed

[bug] Unable to sync CalDAV calendar from Yetiforce to Outlook #12532

2techcomputing opened this issue Feb 5, 2020 · 41 comments
Assignees
Labels
❔ question This is a question about the YetiForce system.
Milestone

Comments

@2techcomputing
Copy link

I am trying setup a synced calendar with yetiforce and outlook, i have enabled the required features in the API file and have created my API key. I added the API key to Outlook and can get Outlook to sync its calendar events to yetiforce but when i add an event to the calendar in yetiforce i get the error message " Object reference not set to an instance of an object." Any idea what might need to be configured to get it working. I am also unable to add the CalDAV account on my IOS device and believe the settings i am using are wrong. currently i am using:
server: http://yetiforce.2techcomputing.ca:443/dav.php/principals/(__dav_login__)/
username: api login
password: api key

Any help would be appreciated.

@2techcomputing
Copy link
Author

caldav issue

@acsinsurancegroup
Copy link

@2techcomputing I've always used the DavDroid link but no matter what I seem to get the same issues you are experiencing. I was sent this once before, hopefully you can figure it out from there.

https://public.yetiforce.com/img/CalDav_and_DavDroid.gif

Good luck!

@2techcomputing
Copy link
Author

I followed the above videos to setup the calendar on my iphone but i am still receiving the same error message as before, i have attached a screen shot of the current configuration for DavCal in yetiforce and also the error message i am receiving on my phone.

DavCal Settings

image0

@mariuszkrzaczkowski
Copy link
Member

  1. screenshot of the server configuration verification screen
  2. you have the wrong address, it cannot start with https
  3. check the dav logs in CRM
  4. check if the htaccess rules work

@2techcomputing
Copy link
Author

these are the server address that i have attempted on IOS
https://yetiforce.2techcomputing.ca/dav.php
https://yetiforce.2techcomputing.ca/dav.php/principals/mbasic/
http://yetiforce.2techcomputing.ca:443/dav.php
http://yetiforce.2techcomputing.ca:443/dav.php/principals/mbasic/
used mbasic as the login and the key as the password, none of the above has worked, it did however connect on Outlook with CalDav Synchronizer but if i input an entry into yetiforce it is unable to sync it to outlook but outlook can sync to the yetiforce calendar. so the htaccess rules should be working in that regard. not sure where i should go to get the log for dav but i do see the file error_log in the server. I have also attached a screenshot of the settings configured in outlook that currently work for send calendar updates to yetiforce.

error_log.log

DavCal Settings

@mariuszkrzaczkowski
Copy link
Member

screenshot of the server configuration verification screen??

@mariuszkrzaczkowski
Copy link
Member

github

@2techcomputing
Copy link
Author

here is the server configuration screenshot.

yetiforce_settings

@mariuszkrzaczkowski
Copy link
Member

Start by improving the server configuration and then CRM will work properly.
You have a lot of strange errors in the logs

@bpabiszczak bpabiszczak self-assigned this Feb 10, 2020
@bpabiszczak bpabiszczak added the ❔ question This is a question about the YetiForce system. label Feb 10, 2020
@bpabiszczak bpabiszczak added this to the YetiForce 5.3 milestone Feb 10, 2020
@acsinsurancegroup
Copy link

@mariuszkrzaczkowski What causes the CalDav Integration to do this? My cron obviously works fine because everything else works. So why does this one stop? All of my URL connections are good on Outlook, IOS and Droid and I have successfully synced previously but right now I keep getting the hazard icon and NOTHING has changed.

caldav_cron

cal_dav2

cal_dav3

@2techcomputing
Copy link
Author

I have contacted my hosting provider and made most of the changes but a few still could not be changed because they do not have access to the CLI portion as it is shared web hosting, either way the features that show as red should not effect the use of CalDav with an IOS device or create issues syncing yetiforce calendar items back to Outlook.

@acsinsurancegroup
Copy link

Good luck @2techcomputing the CalSync has hardly ever worked for me even when it authenticates as you can see above.

@mariuszkrzaczkowski Any thoughts on my screenshots?

@mariuszkrzaczkowski
Copy link
Member

show logs :),
activate integration with CalDav and then turn off the logs, because we will not see anything because you have suspended the task in CRON

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski I have the integration active but where do I turn the logs off? Also, the logs you mean the server seetings?

@mariuszkrzaczkowski
Copy link
Member

attach current screenshot of configuration verification,
on some servers, integration will not work due to server restrictions

https://yetiforce.com/en/knowledge-base/documentation/developer-documentation/item/debugging#quick_start

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski This is really all I need to mess with and post the server settings correct?

DAV DEBUGGING
In the config/debug.php configuration file you can also enable debugging of DAV library.

'DAV_DEBUG_EXCEPTIONS' => true, 'DAV_DEBUG_PLUGIN' => false, - this parameter enables an additional plugin that is used for loging/saving all data that is received and sent by the server to cache/logs/davDebug.log file.

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski

attach current screenshot of configuration verification,
on some servers, integration will not work due to server restrictions

https://yetiforce.com/en/knowledge-base/documentation/developer-documentation/item/debugging#quick_start

Dav1

Dav2

Dav3

yetiforce_settings

My CalDav only seems to work once I delete my key. However, when I add a new key for my main user, I end up with the issues as before. My CalDav section in Cron just says Running and spins for what seems like forever and nothing. I end up with the Hazard looking icon and that's it. So frustrating! Help, please!!!!

@mariuszkrzaczkowski
Copy link
Member

if the cron task does not end, it means that some fatal error has occurred and the task has been interrupted.

set the path to error_log logs and enable full logs according to our documentation and not just Dav. the error is in some logs depends on some kind. send everything to us by e-mail, attach the correct server configuration and there may be nothing in red

if you have logs you will see the error yourself and this is needed to fix the problem. if you don't know, buy a support package a few hours is enough for that

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 18, 2020

@mariuszkrzaczkowski The System Headers information area that is mostly Red has absolutely nothing to do with my Calendar issue I can assure you. Also, I don' have any System Errors or Warnings as noted in screenshots below.

As I've stated previously, it has worked before but randomly stops after so long for whatever reason. I am pretty convinced that it's an internal issue on your end no disrespect.

Dav4

Dav5

Dav6

@mariuszkrzaczkowski
Copy link
Member

attach the required information and make changes if you want help

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 18, 2020

@mariuszkrzaczkowski Will email the logs but the System Headers are NOT the issue and I bet a million dollars on that ;)

@bpabiszczak
Copy link
Contributor

@acsinsurancegroup just in case, send them to [email protected] ;)

@acsinsurancegroup
Copy link

@bpabiszczak If I had it, I honestly would. You guys offer a world class product that I fully believe in and standby. Documentation could be a little better but I realize that takes a crap ton of time that none of us have lol.

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 18, 2020

@mariuszkrzaczkowski I wanted to include the CRON Task report as well so you could seet what I am getting in response to every task:

Task "/usr/bin/wget -O - -q -t 1 https://mysystemdomain.com/cron.php?app_key=mysystemsecretkey" successfully completed in 1 seconds, output:

--------------- 2020-02-18 15:56:11 | Start CRON ----------
2020-02-18 15:56:11 | LBL_WORKFLOW - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SCHEDULED_IMPORT - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_MAIL_SCANNER_ACTION - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_MAIL_SCANNER_VERIFICATION - Start task
2020-02-18 15:56:11 | LBL_MAIL_SCANNER_VERIFICATION - End task (0.04 s)
2020-02-18 15:56:11 | LBL_MAIL_SCANNER_BIND - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_MAILER - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_CARD_DAV - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_CAL_DAV - Task omitted, it has not been finished during the last scanning
2020-02-18 15:56:11 | LBL_ACTIVITY_STATE - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SEND_REMINDER - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SEND_NOTIFICATIONS - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_MULTI_REFERENCE_VALUE - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_CRMACTIVITY_DAYS - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_ASSETS_RENEWAL - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SOLD_SERVICES_RENEWAL - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_RECORD_LABEL_UPDATER - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_PRIVILEGES_UPDATER - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_UPDATER_COORDINATES - Start task
2020-02-18 15:56:11 | LBL_UPDATER_COORDINATES - End task (0.01 s)
2020-02-18 15:56:11 | LBL_UPDATER_RECORDS_COORDINATES - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_ADDRESS_BOOK - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_MARK_RECORDS_AS_REVIEWED - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_CACHE - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_NEVER_ENDING_RECURRING_EVENTS - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_CLEAR_FILE_UPLOAD_TEMP - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SMSNOTIFIER - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_BROWSING_HISTORY - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBK_SYSTEM_WARNINGS - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_BATCH_PROCESSES - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_BATCH_METHODS - Not ready to run as the time to run again is not completed
2020-02-18 15:56:11 | LBL_SESSION_CLEANER - Start task
2020-02-18 15:56:11 | LBL_SESSION_CLEANER - End task (0.01 s)
2020-02-18 15:56:11 | LBL_CURRENCY_UPDATE - Not ready to run as the time to run again is not completed
=============== 2020-02-18 15:56:11 (0.08) | End CRON ==========

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 18, 2020

@mariuszkrzaczkowski Finall it stopped spinning like it typically does and presented the Hazard Icon and said Not Completed like usual. I then manually triggered another CRON tasks run successfully and the only change in the CAL_DAV now it simply says Start task and that will spin forever and ever again. I'll email the logs later this evening.

--------------- 2020-02-18 16:36:19 | Start CRON ----------
2020-02-18 16:36:19 | LBL_WORKFLOW - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SCHEDULED_IMPORT - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_ACTION - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_VERIFICATION - Start task
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_VERIFICATION - End task (0.05 s)
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_BIND - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAILER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CARD_DAV - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CAL_DAV - Start task
2020-02-18 16:36:19 | ERROR: LBL_CAL_DAV - Cron task execution throwed exception.
ParseError: syntax error, unexpected 'Private' (T_PRIVATE) in /var/www/mysystemdomain.com/config/Components/Dav.php:24
Stack trace:
#0 /var/www/mysystemdomain.com/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/vhosts...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Config\Componen...')
#2 [internal function]: spl_autoload_call('Config\Componen...')
#3 /var/www/mysystemdomain.com/app/Config.php(275): class_exists('\Config\Compone...')
#4 /var/www/mysystemdomain.com/app/Config.php(98): App\Config::get('\Config\Compone...', 'CALDAV_EXCLUSIO...', NULL)
#5 /var/www/mysystemdomain.com/modules/API/models/CalDAV.php(106): App\Config::component('Dav', 'CALDAV_EXCLUSIO...')
#6 /var/www/mysystemdomain.com/modules/API/models/CalDAV.php(89): API_CalDAV_Model->davSync()
#7 /var/www/mysystemdomain.com/modules/API/models/DAV.php(54): API_CalDAV_Model->calDavCrm2Dav()
#8 /var/www/mysystemdomain.com/cron/CalDav.php(10): API_DAV_Model::runCronCalDav()
#9 /var/www/mysystemdomain.com/cron.php(86): require_once('/var/www/vhosts...')
#10 {main}
--------------- 2020-02-18 16:36:19 | Start CRON ----------
2020-02-18 16:36:19 | LBL_WORKFLOW - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SCHEDULED_IMPORT - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_ACTION - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_VERIFICATION - Start task
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_VERIFICATION - End task (0.05 s)
2020-02-18 16:36:19 | LBL_MAIL_SCANNER_BIND - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MAILER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CARD_DAV - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CAL_DAV - Start task
2020-02-18 16:36:19 | LBL_ACTIVITY_STATE - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SEND_REMINDER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SEND_NOTIFICATIONS - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MULTI_REFERENCE_VALUE - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CRMACTIVITY_DAYS - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_ASSETS_RENEWAL - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SOLD_SERVICES_RENEWAL - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_RECORD_LABEL_UPDATER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_PRIVILEGES_UPDATER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_UPDATER_COORDINATES - Start task
2020-02-18 16:36:19 | LBL_UPDATER_COORDINATES - End task (0.02 s)
2020-02-18 16:36:19 | LBL_UPDATER_RECORDS_COORDINATES - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_ADDRESS_BOOK - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_MARK_RECORDS_AS_REVIEWED - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CACHE - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_NEVER_ENDING_RECURRING_EVENTS - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_CLEAR_FILE_UPLOAD_TEMP - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SMSNOTIFIER - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_BROWSING_HISTORY - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBK_SYSTEM_WARNINGS - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_BATCH_PROCESSES - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_BATCH_METHODS - Not ready to run as the time to run again is not completed
2020-02-18 16:36:19 | LBL_SESSION_CLEANER - Start task
2020-02-18 16:36:19 | LBL_SESSION_CLEANER - End task (0.02 s)
2020-02-18 16:36:19 | LBL_CURRENCY_UPDATE - Not ready to run as the time to run again is not completed
=============== 2020-02-18 16:36:19 (0.13) | End CRON ==========

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski I believe the error is displayed above in the CRON report. It clearly says parse & syntax error:

2020-02-18 16:36:19 | LBL_CAL_DAV - Start task
2020-02-18 16:36:19 | ERROR: LBL_CAL_DAV - Cron task execution throwed exception.
ParseError: syntax error, unexpected 'Private' (T_PRIVATE) in /var/www/mysystemdomain.com/config/Components/Dav.php:24

@mariuszkrzaczkowski
Copy link
Member

show file contents
/var/www/mysystemdomain.com/config/Components/Dav.php

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 19, 2020

@mariuszkrzaczkowski @bpabiszczak

UPDATE - I FIXED IT (TEMPORARILY IT SEEMS)

What I did:

I simply replaced my /www/mysystemdomain.com/app/Config.php with the actual content of the same file in the Developer code section from your Repository. I rebooted my server and BOOM, it works again.

I replaced the file by renaming my file in the system and then copying and pasting the content from the updated file in the Developer version and pasting it over my original file and that was it. So it was something on your end again probably something that got messed up in one of the update files.

See screenshots below, CalDav Integration finally worked again as Date and time updated without hazard icon or Not Completed message. However, it messed up again apparently because now it's stuck in circling mode again and hasn't updated since 3:10 AM and it's now 3:45 AM

DavWORKED

DavWORKED2

Dav_WORKED3

DAV_Fuckedagain

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski Here you go:

Dav_PHP

@mariuszkrzaczkowski
Copy link
Member

app/Config.php - has been protected against errors.

/var/www/mysystemdomain.com/config/Components/Dav.
you have an error in line 24 value should be in quotation marks

@acsinsurancegroup
Copy link

acsinsurancegroup commented Feb 19, 2020

@mariuszkrzaczkowski So line 24 should look like this:

24 public static $CALDAV_DEFAULT_VISIBILITY_FROM_DAV = "Private";

Is that right? Also, should Lines 30 & 33 be in quotes as well?

You know that's the original file after install and not something that I had changed just fyi.

I went ahead and changed Lines 30 & 33 like above in 24 and after reviewing Sequence 8 in CRON in the System Settings area and refreshing, it works again. It's no longer spinning since 3:10 AM and I have an updated time of 11:50AM as seen below.

Won't know again for sure until the next auto CRON run at 12 PM will let you know :)

DAV1

@mariuszkrzaczkowski
Copy link
Member

Originally is False You had to change this
https://github.com/YetiForceCompany/YetiForceCRM/blob/5.2.0/config/Components/ConfigTemplates.php#L106

30 i 33 is correctly

@acsinsurancegroup
Copy link

@mariuszkrzaczkowski That was it Mariusz, you're the best man thank you so much!!!!!!!!!!! Finally, it's working properly again :) The time changed manually at 12 and 12:15PM

DAV2

DAV3

@2techcomputing
Copy link
Author

@acsinsurancegroup @mariuszkrzaczkowski I noticed that if i create an entry in the yetiforce calendar that is an all day event that the event will then properly sync to Outlook but if i create an event in yetiforce that has a specified time during the day then the cal dav synchronizer through's an error when it tries to grab that entry, looks like it is related to time, any ideas?
caldaverror

@acsinsurancegroup
Copy link

@2techcomputing Try creating the event in Outlook or pushing it via your mobile and syncing it that way. I have never had much success with CalDav Synchronizer myself. It would always show errors, yet it would still sync what I needed to. Really a strange script lol.

@mariuszkrzaczkowski
Copy link
Member

mariuszkrzaczkowski commented Feb 20, 2020

I noticed that various integrations have different sensitivity to the data.
Check other synchronization program.
Attack the ICAL file that is synchronized then we will check the invited

@2techcomputing
Copy link
Author

@acsinsurancegroup I guess i will have to create events that way then, I have still been unable to add the CalDav account to my IOS phone. What is the server you are using to make it work? Also is having the username and password set with the login and key from yetiforce correct for IOS?

@2techcomputing
Copy link
Author

@mariuszkrzaczkowski It looks like Outlook does not like the way time is created in yetiforce, what do you want me to do with the ICAL file?

@mariuszkrzaczkowski
Copy link
Member

mariuszkrzaczkowski commented Feb 21, 2020

@acsinsurancegroup I guess i will have to create events that way then, I have still been unable to add the CalDav account to my IOS phone. What is the server you are using to make it work? Also is having the username and password set with the login and key from yetiforce correct for IOS?

Yes
used on various ios devices, I remember some time zone problem

@mariuszkrzaczkowski
Copy link
Member

@mariuszkrzaczkowski It looks like Outlook does not like the way time is created in yetiforce, what do you want me to do with the ICAL file?

send to us we will check the correctness
[email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❔ question This is a question about the YetiForce system.
Projects
None yet
Development

No branches or pull requests

4 participants