ksainc / integration_ews

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

Cron doesn't seem to Work in passive mode #34

Open Freshou opened 8 months ago

Freshou commented 8 months ago

Since one of the lasts update (can't tell which one), the update by cron (in passive mode) doesn't seem to work...

I ca go in the preference of the user and click on the sync button and it work... But it doesn't sync automatically anymore !

ksainc commented 8 months ago

Hi @Freshou,

Is there any error messages in your NC log?

Freshou commented 8 months ago

The only thing that might look about a calendar error ic this :

{"reqId":"vqQxuyGlJry9ECYA3Ikx","level":3,"time":"2024-01-22T18:10:07+00:00","remoteAddr":"96.20.114.84","user":"coordo-theatrophone","app":"PHP","method":"POST","url":"/remote.php/dav/bulk","message":"Unknown: POST Content-Length of 135104682 bytes exceeds the limit of 8388608 bytes at Unknown#0","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.11.0git (build 19195) (Nextcloud, osx-22.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"26.0.10.1","data":{"app":"PHP"}}

Has there's a lot of stuff in the nc log, maybe you can give me a hint of what I'm looking for...

ksainc commented 8 months ago

That is not the correct error, thats for the DAV app.

Search the log for anything containing 'integration_ews'

Freshou commented 8 months ago

As requested ! Here some for today... But there's many more... if you need more, just ask !

integration_ews.log

ksainc commented 8 months ago

Perfect.

Looks like you have two different errors happeing,

"ErrorInvalidPropertySet - Set action is invalid for property." while the app is trying to get a calendar.

"ErrorItemNotFound - The specified object was not found in the store., Default folder Calendar not found." also while the app is trying to get a calendar.

Is this a MS Exchange server? And what is the version of this server?

Freshou commented 8 months ago

It’s directly with O365 servers…

what is weird, it’s if i go to the user profile and hit the sync button, it work! New stuff come in…

But not with the cron job …

ksainc commented 8 months ago

I agree, that is odd. As the sync process is the same function for both and there is no different when pressing sync manually or letting it run in the background.

But since I have a 0365 account also, I can test this out.

ksainc commented 8 months ago

Actually, can you turn on Transport logging, and send me the log for one of the background sync jobs. You will need to match the log timestamp to the time stamp in the NC log. As the app creates a new log every time it creates a new connection.

ksainc commented 8 months ago

NVM! I figured out what the issue was and it was not a update (sort of).

What I think happened, is, you must have at one point created a link to a Exchange calendar, then deleted the calendar in Exchange.

This would not have been a issue in the past as I was just treating error responses from Exchange for non existent items as a null response and then handling the null appropriately. But at some point I decided to actually make the app throw errors when Exchange returned an error, which includes error messages for non existent items.

Anyway, long story short, your issue should now be fixed.

Patched, packaged and released. v1.0.35

Freshou commented 8 months ago

I did the update this morning...

Still nothing coming from the cron...

I joined The Error from NC log ... Still no transport log for that user when done by the cron (But I have for other users) ...

integration_ews.log

ksainc commented 8 months ago

Okay,

That is odd, because the last patch should have addressed this, but it is still the same error "Remote Error: ErrorItemNotFound - The specified object was not found in the store., Default folder Calendar not found." when its trying to retrieve a folder.

Also from what i see in the error "#1 EventsService.php(152): RemoteEventsService->fetchCollection()", it seems this is still running the old code. This command is now on line 153 but it was on line 152 before the patch.

So did you install the patch? and if so maybe it did not install properly. Can you check if your EventsService.php file, looks like this:

https://github.com/ksainc/integration_ews/blob/27459b4ac18652b30256e5a134da34ffa7416195/lib/Service/EventsService.php#L153

Freshou commented 8 months ago

My current installed version is 1.0.35

My line 153 is : $rcollection = $this->RemoteEventsService->fetchCollection($rcid);

ksainc commented 8 months ago

Okay, not sure then. Some how it seems to be executing the old code.

One thing you can try is rebooting you NC system.

The other solution to this is just disconnecting the account. This will wipe all correlation/associations for the calendars and events. Then reconnecting the account and calendars/contacts.

Freshou commented 8 months ago

i have restart apache, php-fpm i have unlink the account of the user and recreate it...

Still no transport log with the cron ! But manual Sync seem to continue to work...

ksainc commented 8 months ago

Restarting apache and php-fpm will not work.

The NC cron job does NOT use these services, it runs directly from the command line and bypasses these services. Unless you are using the Ajax or External cron setting. So you would need to restart the system to clear the php compiler cache.

If the restart fails does not solve the issue, we can try doing a remote session with screen sharing to solve this. If you are up for that email me at krupinski01@gmail.com

Freshou commented 8 months ago

i have rebooted the whole server, still no change !

ksainc commented 8 months ago

Okay, can you pull the error for the last time that the background job ran? I want to see if the line number has changed.

Freshou commented 8 months ago

I completely remove and re-install the application... And still same error

{"reqId":"ZJkqdkvG1Rkhti61agw7","level":3,"time":"2024-01-23T14:40:58+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1045): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"4YrajkbllhEIBKO41j6L","level":3,"time":"2024-01-23T15:51:48+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1045): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"pC6vODwGPHdfSZbgDrQO","level":3,"time":"2024-01-23T16:55:27+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1045): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"u1kQgqOgtTjudRVCF2jD","level":3,"time":"2024-01-23T18:05:39+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1045): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}}

ksainc commented 8 months ago

Different error this time... "Remote Error: ErrorInvalidPropertySet - Set action is invalid for property." line 439

To fix this error I would need the transport log. It will tell me what property it does not like and what the value was set to.

Freshou commented 8 months ago

here it is !

dev-theatrophone_2024-01-23_19-06-40_EWS.log

ksainc commented 8 months ago

Perfect. Looks like its trying to update the calendar:StartTimeZone property on the 'réunion test' event on '2024-01-15T21:30:00Z' and O365 is rejecting it.

The problem is that I can't seem to reproduce this error on my O365 account.

Is there anything special with this calendar? Is this Calendar shared with you? Or is it a public calendar?

Freshou commented 8 months ago

It’s the main calendar of the user in O365… I have activated the sync because the user schedule a lot of team’s meeting but her main calendar is in nextcloud …

that way, she can have her availability in teams and her teams meeting into nextcloud!

the current particularity appear after i remove the plugin and re-activate it !

all her events are now doubled !

Freshou commented 7 months ago

Forget about the doubled event... Bad move from me !

But sync is still stuck...

ksainc commented 7 months ago

Okay, are you still seeing the same error in the transport log?

Freshou commented 7 months ago

From NextCloud Log :

{"reqId":"uBzbFNPV4RTag1a3l8Fv","level":3,"time":"2024-01-25T11:40:58+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1061): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"vWdgGOtFjXjHXsj2zSwF","level":3,"time":"2024-01-25T12:45:09+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1061): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"7mJgzn2VQi8MV5GqFHiP","level":3,"time":"2024-01-25T13:51:27+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1061): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"PnUCDKOMeTp3yVKAGWr7","level":3,"time":"2024-01-25T14:55:56+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1061): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}} {"reqId":"5VZhibzkqUiDKa0cerOS","level":3,"time":"2024-01-25T16:04:38+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","userAgent":"--","version":"26.0.10.1","exception":{"Exception":"Exception","Message":"Exception: Remote Error: ErrorInvalidPropertySet - Set action is invalid for property. in /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteCommonService.php:1006\nStack trace:\n#0 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/Remote/RemoteEventsService.php(1061): OCA\\EWS\\Service\\Remote\\RemoteCommonService->updateItem()\n#1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(439): OCA\\EWS\\Service\\Remote\\RemoteEventsService->updateCollectionItem()\n#2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(195): OCA\\EWS\\Service\\EventsService->harmonizeLocalAltered()\n#3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\\EWS\\Service\\EventsService->performHarmonization()\n#4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php(102): OCA\\EWS\\Service\\HarmonizationService->performHarmonization()\n#5 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php(78): OCA\\EWS\\Tasks\\HarmonizationLauncher->run()\n#6 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(103): OCP\\BackgroundJob\\Job->start()\n#7 /var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php(93): OCP\\BackgroundJob\\TimedJob->start()\n#8 /var/www/nextcloud.arrierescene.qc.ca/cron.php(152): OCP\\BackgroundJob\\TimedJob->execute()\n#9 {main}","Code":1,"Trace":[{"file":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\\EWS\\Service\\HarmonizationService","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\EWS\\Tasks\\HarmonizationLauncher","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud.arrierescene.qc.ca/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php","Line":227,"message":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone","exception":{},"CustomMessage":"Harmonization launcher encountered an error while harmonizing for dev-theatrophone"}}

And Bellow, the transport log from a Manuel Sync

coordo-theatrophone_2024-01-25_17-02-22_EWS.log coordo-theatrophone_2024-01-25_17-03-02_EWS.log

Freshou commented 7 months ago

coordo-theatrophone_2024-01-25_17-03-09_EWS.log

This one was missing

ksainc commented 7 months ago

Had a look at your logs and error.

So the error is "ErrorInvalidPropertySet - Set action is invalid for property." when it is trying to update a calendar item in O365.

But the error is not present in any of the logs you sent.

Search the log for "ErrorInvalidPropertySet" that's the request and response I need to see.

Freshou commented 7 months ago

In the Transport log, I do a grep and I get nothing ...

as I told, I only get transport log when I use manual sync ..

With cron sync, I got error into nextcloud log but I got no transport log generate at all...

Freshou commented 7 months ago

Oh ... i was looking for a transport log about that specific user, but the doing a grep on all file in /tmp, I got error from transport log of another user ....

Here it is : dev-theatrophone_2024-01-25_06-20-06_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_07-25-07_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_08-31-10_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_09-37-41_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_10-40-16_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_11-40-57_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_12-45-09_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_13-51-26_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_14-55-56_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_16-04-37_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_17-10-09_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope> dev-theatrophone_2024-01-25_18-14-44_EWS.log:<?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:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope>

ksainc commented 7 months ago

Okay, so the issue was happening with a different user

Freshou commented 7 months ago

From the cron, it block after the error happen from another user... and at some point, it do not continue to the next user...

ksainc commented 7 months ago

Yes, the cronjob will do that if there are too many errors. Thats an NC feature.

Can i see this entire file please: dev-theatrophone_2024-01-25_18-14-44_EWS.log

Freshou commented 7 months ago

Here it is !

dev-theatrophone_2024-01-25_18-14-44_EWS.log

ksainc commented 7 months ago

I had a look at the log,

The request to update the 'réunion test' event looks proper and the same as what I am getting on my end but for you O365 is saying that the property update of 'calendar:StartTimeZone' for this event is not permitted.

Can you just delete this one event? There is something odd about this event. Because I have created and updated multiple events and time zones and I do not get this error with O365.

Freshou commented 7 months ago

I think I know why it can't update... It's a team invitation she received... So she's not the creator of the event... In Outlook I cannot change date and hour as it's an invitation from teams... But in the NextCloud calendar, I can do it...

Freshou commented 7 months ago

So yes I can delete the event as it's a test... But You need a work around for those kind of event... it's sure that it will happen... If it's a received Teams invitation from someone else, O365 will not allow to modify the date/time...

ksainc commented 7 months ago

Ah!!! That would be why!

Yes, that will need a work around. I will need to see if there is a way to lock an event in NC.

At the moment, I don't see a way to do this. Due to the fact that the app just replicates events between the two systems and has no knowledge of what type of event it is, or the permissions on it.

I will in the near future convert this app to a calendar provider setup in NC, where the app will generate its own calendars inside of NC, which gives more control over the events. So unfortunately, I'll have to wait for v2 of the app.

Freshou commented 7 months ago

If you can add a check to see if in outlook the Event is a Teams invitation and NC try to modify the date, just refuse and set back original date into NC...

Freshou commented 7 months ago

The Event is deleted... But the sync seem to continue to stop at the first user and don't get to the next one ...

Here's the transport log of the user before the other

dev-theatrophone_2024-01-25_19-15-28_EWS.log

ksainc commented 7 months ago

If you can add a check to see if in outlook the Event is a Teams invitation and NC try to modify the date, just refuse and set back original date into NC...

True, And the check part is easy. The problem is I would also need to revert the changes the user made to the event, so that the events match in NC and Outlook.

The problem with the current design is that my app runs after the changes are made. User makes change -> app runs -> asks NC if anything has changed -> then replicates the changes in Exchange. And as far as I know NC does NOT keep track of what was changed.

The new design will work differently, when a user makes changes and presses save, the action will instantly trigger the app, so things like permissions can be checked BEFORE the event is saved.

ksainc commented 7 months ago

The Event is deleted... But the sync seem to continue to stop at the first user and don't get to the next one ...

Here's the transport log of the user before the other

dev-theatrophone_2024-01-25_19-15-28_EWS.log

Perfect. I can see the issue. I'll fix it later today.

ksainc commented 7 months ago

The Event is deleted... But the sync seem to continue to stop at the first user and don't get to the next one ...

Here's the transport log of the user before the other

dev-theatrophone_2024-01-25_19-15-28_EWS.log

The error in the log was "Remote Error: ErrorItemNotFound".

This error was being caused by the app trying to replicate a delete from NC to O365. But the item was already deleted in O365, causing an error. Added some code to ignore these errors.

Patched, Packaged and Released. v1.0.37

Freshou commented 7 months ago

Just did the update ... at first sight, it now seem to generate a transport log for the second user with cron, so it might be good !

I'll keep you posted ! :)

Thanx !

Freshou commented 7 months ago

Still got a problem... For that specific user, cron sync stil doesn't work... No transport log and this time, nothing into the NextCloud Log...

But if I run occ ews:harmonize coordo-theatrophone i obtain this error :

OCP\AppFramework\Db\MultipleObjectsReturnedException: Did not expect more than one result when executing: query "SELECT * FROMPREFIXews_integration_crlsWHERE (uid= :dcValue1) AND (type= :dcValue2) AND (roid= :dcValue3) AND (rcid` = :dcValue4)"; in /var/www/nextcloud.arrierescene.qc.ca/lib/public/AppFramework/Db/QBMapper.php:293
Stack trace:

0 /var/www/nextcloud.arrierescene.qc.ca/lib/public/AppFramework/Db/QBMapper.php(362): OCP\AppFramework\Db\QBMapper->findOneQuery()

1 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Db/CorrelationMapper.php(150): OCP\AppFramework\Db\QBMapper->findEntity()

2 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/CorrelationsService.php(94): OCA\EWS\Db\CorrelationMapper->findByRemoteId()

3 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(562): OCA\EWS\Service\CorrelationsService->findByRemoteId()

4 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/EventsService.php(241): OCA\EWS\Service\EventsService->harmonizeRemoteAltered()

5 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Service/HarmonizationService.php(210): OCA\EWS\Service\EventsService->performHarmonization()

6 /var/www/nextcloud.arrierescene.qc.ca/apps/integration_ews/lib/Commands/Harmonize.php(68): OCA\EWS\Service\HarmonizationService->performHarmonization()

7 /var/www/nextcloud.arrierescene.qc.ca/3rdparty/symfony/console/Command/Command.php(255): OCA\EWS\Commands\Harmonize->execute()

8 /var/www/nextcloud.arrierescene.qc.ca/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()

9 /var/www/nextcloud.arrierescene.qc.ca/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()

10 /var/www/nextcloud.arrierescene.qc.ca/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()

11 /var/www/nextcloud.arrierescene.qc.ca/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()

12 /var/www/nextcloud.arrierescene.qc.ca/console.php(100): OC\Console\Application->run()

13 /var/www/nextcloud.arrierescene.qc.ca/occ(11): require_once('...')

14 {main} `

As there was many test with that user, I disconnect it from exchange, I went to the database and delete in oc_ews_integration_crls all line of that account (uid) , relink with the microsoft account and redo the same occ command...

Same Error... With the Harmonize I got a transport log... I join it !

coordo-theatrophone_2024-01-26_20-12-53_EWS.log

ksainc commented 7 months ago

Hey @Freshou,

It seems there is a duplicate id in one of the correlation entries. I would like to figure out how this happened but this would be easier in real time, can you email me krupinski01@gmail.com and we can setup a remote session.

Sebastian

Freshou commented 7 months ago

For different reasons, no actually I cannot give you remote access to my Computer...

Is there anything I can do to give you information you need ? A way to activate a debug mode with the onc command ?

ksainc commented 7 months ago

Morning @Freshou

I never asked for remote access to your computer system. What I asked for is a remote session, over team/zoom/etc, where you can share your screen and execute commands while I see what is happening in real time, because the commands might change depending on what I see.

The reason I asked, is because the duplicate correlation entries where cause in a previous sync. The error is a result of that sync. And we need to look at the entries in the database to see how many and which ones to determain what could have got wrong to cause duplicate entries, and I can not do that by spending hours and days typing up instructions and analyzing your results.

So the best I can do is, there are two things you can try.

a) Do a sync on a fresh calendar for this user. (delete the current one from NC and reconnect a new one, make sure you remove the calendar from trash also)

b) Alternatively you can try to search the 'ews_integration_crls' table for duplicates, the 'roid' (Remote Object ID) and 'loid' (Local Object ID) fields are what you can looking for. There should never be more that ONE entry for each 'loid' and 'roid', for the user. According to the error there is a duplicate 'roid' which should never happen.

Sebastian