ksainc / integration_ews

Nextcloud EWS Connector (Exchange Web Services)
GNU Affero General Public License v3.0
26 stars 2 forks source link

cannot sync event #29

Closed piborgne2 closed 10 months ago

piborgne2 commented 10 months ago

Hello,

Describe the bug Events cannot be sync

To Reproduce Steps to reproduce the behavior:

  1. Go to 'personal > connected account'
  2. Validate account correctly connected : Connected to xxxx at ex3.mail.ovh.net (it's not o365)
  3. Click on 'Personal - Calendar (2430 Events)'
  4. Select a personal nextcloud calendar to sync
  5. Select synchronize to 'manually'
  6. Click on 'save'
  7. Click on 'sync'
  8. See error Synchronization Failed: "OCA\\EWS\\Service\\Remote\\RemoteEventsService::fromUID(): Argument #1 ($value) must be of type string, null given, called in \/var\/www\/html\/apps\/integration_ews\/lib\/Service\/Remote\/RemoteEventsService.php on line 259"

Expected behavior A sync of my events :-)

Desktop (please complete the following information):

Additional context ews version : 1.0.23 Contacts and tasks are correctly synchronizing (but I've only a very few - around 10)

Freshou commented 10 months ago

Got the same exact problem when trying to sync Calendar... Task and Contact seem to work... But not events....

Freshou commented 10 months ago

i think i corrected the problem !

The line 259 is : $uuid = $this->fromUID($entry->ExtendedProperty[0]->Value);

I replace that line with if (!empty($entry->ExtendedProperty[0]) && !empty($entry->ExtendedProperty[0]->Value)) { $uuid = $this->fromUID($entry->ExtendedProperty[0]->Value); }

ksainc commented 10 months ago

Hi @piborgne2 and @Freshou

Looks like the event has an empty UID, which is unexpected, all events should have a UID according to the spec.

I have already made a patch, will release an update later tonight. Just need to finish making a couple of other changes.

Sebastian

ksainc commented 10 months ago

Done.

I've patched your issue and released an update.

Please let me know if that resolves your issue.

Freshou commented 10 months ago

On my side, there's no more error in the GUI, it tell me that there 1147 events in my Microsoft account, i select my local calendar, but when i click on the sync button, nothing change in my local calendar...

Is there any log i can send you that could help ???

ksainc commented 10 months ago

Hey,

First, do this,

Yes, if there are errors the NC log is the best place for this.

Alternatively, there is a transport log that can be turned on in the Administration Section -> EWS Connector.

piborgne2 commented 10 months ago

Hi,

No this error from my side

Many thanks !

Freshou commented 10 months ago

Hey,

First, do this,

  • Clear all correlations, press save.
  • Then select the correlation you want to use, press save.
  • Press Sync. (This takes time, be patient. From my tests it can take up to 30min to sync 512 items, depending on the internet connection at both the NC system and Exchange system side).

Yes, if there are errors the NC log is the best place for this.

Alternatively, there is a transport log that can be turned on in the Administration Section -> EWS Connector.

I did all of this... 12 hours later still nothing from my Outlook calendar that is sync with my NextCloud one...

in the transport log, I can past one item, that I don't know if is was supposed to be sync or not, but its not....

`2024-01-12 12:56:18.106366 - Response <?xml version="1.0" encoding="utf-8"?></s:Header>NoError</m:ResponseCode></m:RootFolder></m:FindItemResponseMessage></m:ResponseMessages></m:FindItemResponse></s:Body></s:Envelope> 2024-01-12 12:56:18.118594 - Request <?xml version="1.0" encoding="UTF-8"?>

Vérifier Backup OUT de Corporation Image42D5FD90-2CC8-4331-90BA-6B229E50181A42D5FD90-2CC8-4331-90BA-6B229E50181A2012-08-07T15:45:00Z2012-08-07T16:15:00ZfalseBusy1Monday2012-08-072014-02-03trule:Microsoft/Registry/Eastern Standard Time/2006-DaylightPT2H4Sunday1trule:Microsoft/Registry/Eastern Standard Time/2006-StandardPT2H10Sunday-1trule:Microsoft/Registry/Eastern Standard Time/2007-DaylightPT2H3Sunday2trule:Microsoft/Registry/Eastern Standard Time/2007-StandardPT2H11Sunday10trule:Microsoft/Registry/Eastern Standard Time/2006-DaylightPT2H4Sunday1trule:Microsoft/Registry/Eastern Standard Time/2006-StandardPT2H10Sunday-1trule:Microsoft/Registry/Eastern Standard Time/2007-DaylightPT2H3Sunday2trule:Microsoft/Registry/Eastern Standard Time/2007-StandardPT2H11Sunday10`
Freshou commented 10 months ago

Here's one of the full transport log if it can you see why nothing get sync on my side ....

Or maybe because I got lot of stuff in my calendars I have to be more patient for the first sync to complete...

davidfredette_2024-01-12_12-56-12_EWS.log

ksainc commented 10 months ago

@Freshou I see the error in the transport log.

Can you create a new ticket for this please.

2024-01-12 12:56:18.165996 - Response <?xml version="1.0" encoding="utf-8"?></s:Header>Set action is invalid for property.</m:MessageText>ErrorInvalidPropertySet</m:ResponseCode>0</m:DescriptiveLinkKey></m:MessageXml></m:CreateItemResponseMessage></m:ResponseMessages></m:CreateItemResponse></s:Body></s:Envelope>

Freshou commented 10 months ago

@Freshou I see the error in the transport log.

Can you create a new ticket for this please.

2024-01-12 12:56:18.165996 - Response

Set action is invalid for property.ErrorInvalidPropertySet0

I open a new ticket here : https://github.com/ksainc/integration_ews/issues/30#issue-2080381411