Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWS resource fails to retrieve folder tree #2

Closed
KrissN opened this issue May 2, 2016 · 36 comments
Closed

EWS resource fails to retrieve folder tree #2

KrissN opened this issue May 2, 2016 · 36 comments
Labels
Milestone

Comments

@KrissN
Copy link
Owner

KrissN commented May 2, 2016

Imported from KDE bug 78629.

Vincent Fortier says:

In this case I manually entered the EWS URL and hit Try connect. Which i found simpler to evolution as the user don't really care about the underlying UUID type OAB URL. Although a connection successful may be appropriate? It ended up not adding any folder within kmail for the new account (maybie a bug related to kmail and totally unrelated to your new feature, will further investigate?). Although from the subscription tab I can select my various folders and as well, it says "ready" under it in the reception tab.

@KrissN KrissN self-assigned this May 2, 2016
@Kiaros
Copy link

Kiaros commented May 3, 2016

Same problem here. I tried it with 3 computers (Gentoo at home desktop and laptop, Arch Linux at office). The target is an Exchange 2013 server. I can see the folders in the subscription tab, and the entry in Akonadi is also showing the green dot. But I cannot see any account in Kmail, calendar or addressbook. Also the browser in Akonadi-Console isn't showing any entry for the Exchange account. But I can see an akonadi_ews_resource process running.

@th0ma7
Copy link

th0ma7 commented May 3, 2016

As mentioned on KDE bug moving discussion here. As of this morning kontact crashes (may be totally unrelated?).

$ ulimit -c unlimited
$ kontact 
"KMail Kernel ETM"
()
""
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_AQkjKk"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_wFZWtL"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_zdGTQu"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_ZBUz3p"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_4qlSXx"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_lhLTRf"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_DLslrm"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_4oPKIn"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kontact_9133_Epxjp0"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
Erreur de segmentation (core dumped)

$ ls -la core
-rw------- 1 fortierv fortierv 214585344 mai  3 07:31 core

Note that I've installed the akonadi-ews-dbg_0.8.0-1_amd64.deb package as otherwise backtrace showed nothing.

$ echo -e "set logging on gdb-akonadi-kontact.txt\nbacktrace\nq" > gdbCommands.txt
$ gdb -x gdbCommands.txt -c core /usr/bin/kontact

While posting the other comment below related to the crash specific to akonadi_ews_resource I also noticed a kontact*.crash file. Now attached.

gdbCommands.txt
gdb-akonadi-kontact.txt
core.zip
_usr_bin_kontact.11063.crash.zip

@th0ma7
Copy link

th0ma7 commented May 3, 2016

BTW, just noticed that starting kmail in standalone mode (instead of kontact) does not segfault. Although the folder issue remains..

Here is the shell output for kmail:

$ kmail
"KMail Kernel ETM"
()
""
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_sgrPlb"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_IHmSGG"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_hOs6ON"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_oxhLYX"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_hOs6ON"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_oxhLYX"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_XR6vxV"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
"/subscriber/kmail2_6585_c9U8b0"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
this does not work on a KActionCollection containing actions!
done
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false false
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: 
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
"/subscriber/kmail2_6585_FFqoy2"
connectToServer "/tmp/akonadi-fortierv.tz7Ovn/akonadiserver.socket"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Could not resolve property : linearGradient4538
Could not resolve property : linearGradient4588
Could not resolve property : linearGradient4554
...
Could not resolve property : linearGradient4566
Could not resolve property : linearGradient4548
Read defaultResourceId "akonadi_maildir_resource_0" from config.
Found resource "akonadi_maildir_resource_0"
org.kde.akonadi.ETM: Subtree:  9 QSet(9, 11, 10, 13, 12, 15, 14)
org.kde.akonadi.ETM: collection: "Dossiers locaux"
org.kde.akonadi.ETM: Fetch job took  234 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 7
org.kde.akonadi.ETM: first fetched collection: "Dossiers locaux"
Fetched 7 collections.
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: Fetch job took  261 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 2
org.kde.akonadi.ETM: first fetched collection: "Search"
Fetched root collection 9 and 7 local folders (total 7 collections).
resourceId "akonadi_maildir_resource_0"
All done! Comitting.
Emitting changed for "akonadi_maildir_resource_0"
Emitting defaultFoldersChanged.
org.kde.akonadi.ETM: Fetch job took  92 msec
org.kde.akonadi.ETM: was item fetch job: items: 0
org.kde.akonadi.ETM: Fetch job took  19 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: Fetch job took  273 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: Fetch job took  274 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
org.kde.akonadi.ETM: Fetch job took  275 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
Error loading plugin: "La bibliothèque partagée est introuvable."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "La bibliothèque partagée est introuvable."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "La bibliothèque partagée est introuvable."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "La bibliothèque partagée est introuvable."
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
HSpellDict::HSpellDict: Init failed
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "La bibliothèque partagée est introuvable."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "La bibliothèque partagée est introuvable."
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!
User of KWidgetItemDelegate should not delete widgets created by createItemWidgets!

This message may be interesting:
Error loading plugin: "La bibliothèque partagée est introuvable."
as it states that a shared library is unavailable so I've checked if a library was missing for both akonadi_ews* binary using ldd but no.

While trying to find that I noticed the following file:

$ ls -la /var/crash/_usr_bin_akonadi_ews_resource.11063.crash
-rw-r----- 1 fortierv whoopsie 2926405 mai  2 15:36 /var/crash/_usr_bin_akonadi_ews_resource.11063.crash

_usr_bin_akonadi_ews_resource.11063.crash.zip

@KrissN
Copy link
Owner Author

KrissN commented May 3, 2016

I'm going to check that crash to see where it failed. In the meantime can you try this for me:

  1. Open a terminal
  2. Execute: ps -u | grep akonadi_ews_resource. This will show you the process running your Exchange resource. Note the resource identifier - it should be akonadi_ews_resource_0, but the number at the end may be greater if you have several of them.
  3. Execute: while [ $(killall akonadi_ews_resource) ]; do sleep 1; done
  4. You should see a popup telling that your Exchange resource is broken. No big deal.
  5. Execute the resource process with some logging enabled: QT_LOGGING_RULE=log_ews_resource_request.debug=true /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_0. Change the identifier at the end to match the one obtained in step 2. You can also pipe the log into a file (append > /tmp/ews.log to the above command). If it tells you that this service is already running repeat step 3 and retry.
  6. Start KMail and hit "Check Mail".
  7. Observe the log. Look for two requests:

log_ews_resource_request: Starting SyncFolderHierarchy request (folder: EwsId(Distinguished: msgfolderroot) , state: none
log_ews_resource_request: Got SyncFolderHierarchy response (26 changes, state: 91ifqj)

and:

log_ews_resource_request: Starting SyncFolderItems request (folder: EwsId(Top of Information Store, changeKey: AQAAABYAAAAini7dhz4fS7QJJHsOH0oKAABTrE0F) , state: none

You can send me the whole log if you want, but before doing that make sure there is nothing confidential in it.

@th0ma7
Copy link

th0ma7 commented May 3, 2016

ok, manage to come-up with something that hopefully will make some sense to you.

For others, I used the following:
2. ps -fuwhoami| grep akonadi_ews_resource otherwise it wasn't showing all the processes...
3. worked as expected...
4. popup never showed up...
5. worked. I had to specify akonadi_ews_resource_2 as for some unknown reason it always increment it's number every time I removed the previous account and re-created the configuration. redirected also 2>&1 just in case QT_LOGGING_RULE=log_ews_resource_request.debug=true /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_2 > akonadi_ews_resource_2.out 2>&1
6. Started kmail, hit "check mail"... went further down the road and opened the configuration item and hit reload on the folder subscription tab.

SyncFolder msg never occurred. See attached log file: akonadi_ews_resource_2.out.zip

@KrissN
Copy link
Owner Author

KrissN commented May 3, 2016

Strange. I don't see any messages that should be activated by the QT_LOGGING_RULE environment variable. Could you double-check?

@th0ma7
Copy link

th0ma7 commented May 3, 2016

I'm not much used to QT_LOGGING_RULE so you'll have to point me into the right direction... I ran the daemon once more and notice this message:
ERROR "a:ErrorInternalServerError: An internal server error occurred. The operation failed."

And it also pointed to temporary files located in /tmp/ews_xmlreqdump_* and /tmp/ews_xmlresdump_*.

Clearly it did not cleaned-up it's temporary files afterwards ;)

@KrissN
Copy link
Owner Author

KrissN commented May 3, 2016

ERROR "a:ErrorInternalServerError: An internal server error occurred. The operation failed."

Smells like your Exchange server has had enough ;)

You can try to add env at the beginning of the line:
env QT_LOGGING_RULE=log_ews_resource_request.debug=true /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_2 > akonadi_ews_resource_2.out 2>&1

I am never actually sure what is the correct syntax in different shells.

@th0ma7
Copy link

th0ma7 commented May 3, 2016

Using env seems to have provided more info. Here is the output along with the /tmp xmldumps it refers to: akonadi_ews_resource_2_with_xmldump.zip

@KrissN
Copy link
Owner Author

KrissN commented May 3, 2016

That Internal Server Error is strange - the request that was sent seems perfectly in order.

Let's take out a larger cannon...

Can you create (or edit if exists) the file ~/.config/QtProject/qtlogging.ini and inside add this:

[Rules]
log_ews_resource_request.debug=true
log_ews_resource_proto.debug=true

This will dump some XML into the log and create more files in /tmp. I'm not really interested in those as everything will be printed to the log anyway.

@KrissN
Copy link
Owner Author

KrissN commented May 4, 2016

I got your logs with the full request dumps.

It looks like for some reason it can easily retrieve the list of folders using a FindFolder request (for the subscription window), but trying the same using SyncFolderHierarchy (for the main folder tree) fails with an internal server error. I'll dig into the documentation to see if there are any gotchas.

BTW, you have a lot of folders (>400) - this might be an important factor here.

@th0ma7
Copy link

th0ma7 commented May 4, 2016

Well, long-term enterprise level usage usually mean larger scale sizes :)

@KrissN
Copy link
Owner Author

KrissN commented May 4, 2016

The fun part is that it's probably a Microsoft bug, that I'll end up working around.

You see, some requests that handle large amounts of data (like retrieving the list of e-mails from a folder) are prepared for pagination. You specify that you want to receive say the first 100 items and you'll get up to a 100 with a flag telling you if there's more. If yes, you fetch another 100 and so on.

The SyncFolderHierarchy request, which was added exactly to synchronize folder trees lacks this feature (the sibling request for folder items - SyncFolderItems - does have it).

It would be nice to find out at the server side what the details of the ISE error are, but I guess that would require a word with the admins, who are not always happy.

I'll keep digging/working around.

@SasakiSadako
Copy link

SasakiSadako commented May 17, 2016

like above i have now the same issue.
i can connect to my Exchange Server and it says okay.
i can checkout the different Folders to subscribe, but dont get any folderlist inside of kmail
here is a link to my html logfile with colors
http://www.sayumi.de/akonadi_log_ews.html

here is my kmail output:
`adako@Yukie:~$ kmail
"KMail Kernel ETM"
()
""
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_FQKv8W"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
Pass a valid window to KWallet::Wallet::openWallet().
"/subscriber/kmail2_12034_qfEz55"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_F8OmUT"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_Ov24hj"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_UpHAIy"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_a55NAU"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_ws3pxI"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
"/subscriber/kmail2_12034_SZZbRp"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
this does not work on a KActionCollection containing actions!
done
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false false
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM:
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
org.kde.akonadi.ETM: GEN true false true
org.kde.akonadi.ETM: collection: QVector()
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
"/subscriber/kmail2_12034_VIuvGk"
connectToServer "/tmp/akonadi-sadako.VGDIvC/akonadiserver.socket"
Connected to "Akonadi" , using protocol version 52
Server says: "Not Really IMAP server"
Read defaultResourceId "akonadi_maildir_resource_3" from config.
Found resource "akonadi_maildir_resource_3"
org.kde.akonadi.ETM: Subtree: 4 QSet(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 591, 590, 589, 588, 587, 586, 585, 584, 18, 583, 17, 582, 16, 581, 580, 579, 578, 577, 576, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592)
org.kde.akonadi.ETM: Fetch job took 85 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 44
org.kde.akonadi.ETM: first fetched collection: "Lokale Ordner"
Fetched 44 collections.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Entwürfe" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Papierkorb" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Postausgang" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Posteingang" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Versendete Nachrichten" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "Vorlagen" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "IMAP_Backup" -- not recovering.
Searching for names: ("drafts", "outbox", "Local Folders", "sent-mail", "inbox", "templates", "trash")
Unknown collection name "test" -- not recovering.
org.kde.akonadi.ETM: collection: QVector()
org.kde.akonadi.ETM: Fetch job took 114 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 10
org.kde.akonadi.ETM: first fetched collection: "Search"
org.kde.akonadi.ETM: Fetch job took 6 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 0
Fetched root collection 4 and 7 local folders (total 44 collections).
resourceId "akonadi_maildir_resource_3"
All done! Comitting.
Emitting changed for "akonadi_maildir_resource_3"
Emitting defaultFoldersChanged.
org.kde.akonadi.ETM: Subtree: 180 QSet(180)
org.kde.akonadi.ETM: Subtree: 2 QSet(3, 2)
org.kde.akonadi.ETM: Fetch job took 135 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 3
org.kde.akonadi.ETM: first fetched collection: "Lokale Notizen"
org.kde.akonadi.ETM: Subtree: 574 QSet(574)
org.kde.akonadi.ETM: Subtree: 570 QSet(571, 570)
org.kde.akonadi.ETM: Subtree: 1 QSet(470, 1, 469)
org.kde.akonadi.ETM: Fetch job took 137 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 6
org.kde.akonadi.ETM: first fetched collection: "Search"
org.kde.akonadi.ETM: Subtree: 574 QSet(574)
org.kde.akonadi.ETM: Subtree: 570 QSet(571, 570)
org.kde.akonadi.ETM: Subtree: 1 QSet(470, 1, 469)
org.kde.akonadi.ETM: Fetch job took 137 msec
org.kde.akonadi.ETM: was collection fetch job: collections: 6
org.kde.akonadi.ETM: first fetched collection: "Search"
Error loading plugin: "The shared library was not found."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "The shared library was not found."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "The shared library was not found."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "The shared library was not found."
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
HSpellDict::HSpellDict: Init failed
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "The shared library was not found."
Expected a KPluginFactory, got a Grantlee::ScriptableTagLibrary
Error loading plugin: "The shared library was not found."

`

@epikt
Copy link

epikt commented Jun 9, 2016

I had the same issue. I gave a try to the workaround on the 'syncfolderhierarchy-workaround' branch and it worked for me. Thanks!

@AugisM
Copy link

AugisM commented Jun 10, 2016

Thanks for Your work! At last 'syncfolderhierarchy-workaround' branch is working on Manjaro linux. Contacts and calendar also working.

@cardonator
Copy link

I'm having this exact problem seemingly. I'm not compiled from source, though. Maybe I'm crazy 👍 but can release a 0.8.1?

@AugisM
Copy link

AugisM commented Jun 15, 2016

Yes, it will be nice with syncfolderhierarchy-workaround branch. Stable enough.

@KrissN
Copy link
Owner Author

KrissN commented Jun 16, 2016

Thanks for letting me know. I was working on more improvements in that area as during investigations I have found some more minor issues. The code is almost there, but unfortunately for the last weeks I don't have much spare time to work on this so please bare with me.

My original intention was for the next release to include a more feature-complete calendar but I'm leaning towards doing a bugfix release once I close most of the issues found in the initial version, so please stay tuned.

@kakra
Copy link

kakra commented Jul 9, 2016

This was fixed for me after putting https://github.com/KrissN/akonadi-ews/compare/syncfolderhierarchy-workaround.patch into /etc/portage/patches/kde-misc/akonadi-ews-0.8.0.

I hope you can release a bugfix release soon. Thanks for this great piece of work.

@cardonator
Copy link

cardonator commented Jul 26, 2016

Do you have instructions for building from source (n00b at KDE packaging) or can we get an updated build package to try out?

@kakra
Copy link

kakra commented Jul 29, 2016

@cardonator For Gentoo it's as easy as putting the patch in /etc/portage/patches/kde-misc/akonadi-ews-0.8.0:

sudo mkdir -p /etc/portage/patches/kde-misc/akonadi-ews-0.8.0
cd /etc/portage/patches/kde-misc/akonadi-ews-0.8.0
sudo wget https://github.com/KrissN/akonadi-ews/compare/syncfolderhierarchy-workaround.patch

@KrissN
Copy link
Owner Author

KrissN commented Aug 5, 2016

I have just committed a revised folder tree synchronisation logic to master. This code also includes the SyncFolderHierarchy problem workaround. I have done some testing myself and it looks like it handles all the problematic cases. I'd be grateful if someone experiencing this problem could test the latest master and let me know how it performs.

@KrissN KrissN added the bug label Aug 5, 2016
@KrissN KrissN added this to the Release 0.8.1 milestone Aug 5, 2016
@kakra
Copy link

kakra commented Aug 6, 2016

I've downloaded the following patch and put it in portage's patch directory as outlined above (and removed the other):
https://github.com/KrissN/akonadi-ews/compare/v0.8.0...master.patch

It compiled fine but so far I'm having timeout problems connecting to EWS (OWA also doesn't work). I'll report back as soon as it works again.

@kakra
Copy link

kakra commented Aug 6, 2016

In the journal, I'm seeing the following messages repeated a few times per minute:

Aug 06 20:44:11 jupiter.sol.local akonadi_ews_resource[3887]: log_ews_resource: Expected at least one local folder to fetch.
Aug 06 20:44:11 jupiter.sol.local akonadi_ews_resource[3887]: log_ews_resource: ERROR Expected at least one local folder to fetch.
Aug 06 20:44:11 jupiter.sol.local akonadi_ews_resource[3887]: log_ews_resource: Retrying with a full sync.
Aug 06 20:44:11 jupiter.sol.local akonadi_ews_resource[3887]: log_ews_resource: a:ErrorInternalServerError: Interner Serverfehler. Fehler bei diesem Vorgang.

What does it tell me?

@KrissN
Copy link
Owner Author

KrissN commented Aug 6, 2016

This tells me, that my latest incremental folder tree sync changes need some more love...

However the full sync that happens afterwards should still work. Do you see the folder tree?

@kakra
Copy link

kakra commented Aug 6, 2016

Yes, in KMail I see the folder tree and all current mails. However, in Akonadi Console, I see the folder tree but no items. Strange but I think this is unrelated: It doesn't work for any folder there. If you need more logging, tell me how I can provide it. I'm connecting to EWS 2013.

@KrissN
Copy link
Owner Author

KrissN commented Aug 7, 2016

@kakra, just follow the "Debugging" secion in the README.

@kakra
Copy link

kakra commented Aug 7, 2016

It shows something like this with these debug settings:

[Rules]
log_ews_resource_request.debug=true
#log_ews_resource_proto.debug=true

https://gist.github.com/kakra/5c831d1a6fb0c009ac375c77dcb25a6f

@KrissN
Copy link
Owner Author

KrissN commented Aug 7, 2016

@kakra actually I have just now read your comment once again and noticed that you're reporting that you can see e-mail in KMail, but no items in Akonadi Console. This seems to be a problem in Akonadi Console itself (my guess is that it hasn't been implemented). I can't see any items in it either.

The log you have posted is correct. I can see the Internal Server Error at the first attempt to retrieve the folder tree followed by a fallback to the backup method, which succeeded.

If you can see the folder tree now then this means the latest code works fine now and I can finally close the issue.

@KrissN KrissN closed this as completed Aug 7, 2016
@KrissN KrissN removed their assignment Aug 8, 2016
@cardonator
Copy link

@kakra Is there any way to do something similar in Kubuntu? I'm afraid I've never compiled a KDE plugin like this before so I'm not sure how to compile the latest source.

@kakra
Copy link

kakra commented Sep 14, 2016

@cardonator If you have a src-deb package, it should be pretty straight forward. Install the source package (you'll find it in /usr/src) and build-essentials. Then add the patch to the package build instructions and let the packaging tools build a new deb package which you can then install with dpkg.

Apparently, I cannot give you more detailed instructions here as I usually admin Gentoo systems only. Just very rarely I'm using Ubuntu systems and need to integrate patches there. But it is not that difficult and there are good instruction online that you can find. If you already installed akonadi ews as a deb package, I'm sure you'll find a deb-src package at the same location that you can build upon.

@cardonator
Copy link

That makes sense. Unfortunately, I am using the compiled release from this repo and it doesn't appear that there is a src package for deb.

@kakra
Copy link

kakra commented Sep 19, 2016

@cardonator Did you add the corresponding deb-src line to the apt sources before trying to install the src package? Usually you just duplicate the deb line and put deb-src in front (replacing deb).

@cardonator
Copy link

The package here is just installable. It's not in a PPA/package repo. Can you add a git repo as a package source or something?

@kakra
Copy link

kakra commented Sep 21, 2016

@cardonator If it is in the original apt sources, then enable the corresponding deb-src line in /etc/apt/sources.list or sources.list.d/*. Then run "apt-get update", and then "apt-get {build-dep,source} packagename". You'll find the source in /usr/src then. You can place the patch there, update the build rules/manifest, then rebuild a deb package which you can install with dpkg.

Here's a few pointers in the right direction: http://askubuntu.com/questions/246690/how-to-use-apt-to-get-source-code-and-then-do-separate-compile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants