Synchronisation ActiveSync avec SOGo ne fonctionne pas
#1
Bonjour,

J'utilise depuis plusieurs années SOGo, un outil collaboratif avec synchronisation dans les deux sens PC<->SMARTPHONE pour les emails/agendas/contacts/tâches/notes.

Ce logiciel supporte ActiveSync via leur propre implémentation du protocole dans leur code.

J'ai configuré CrèmeCRM pour communiquer avec mon serveur SOGo, je le vois parfaitement exécuter les requêtes sans erreur d'authentification donc ça se présente déjà pas mal, mais CrèmeCRM m'indique : Mauvaise configuration (URL du serveur erronée ?)

la vue du journal de SOGo :
Feb 04 01:56:56 sogod [26457]: <0x0x55abacc9f5c0[SOGoActiveSyncDispatcher]> Sleeping 10 seconds while detecting changes in Sync...
Feb 04 01:56:57 sogod [28404]: 123.123.123.123 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=FolderSync&DeviceType=SmartPhone&DeviceId=E8C395B56FF444E24740B6 HTTP/1.1" 200 5775/13 0.734 - - 4K
Feb 04 01:56:57 sogod [28404]: <0x0x55abac682fe0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Feb 04 01:56:57 sogod [28404]: 123.123.123.123 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&DeviceType=SmartPhone&DeviceId=E8C395B56FF444E24740B6 HTTP/1.1" 200 55/64 0.008 - - 0
Feb 04 01:56:57 sogod [28404]: <0x0x55abac66a3e0[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
Feb 04 01:56:57 sogod [28404]: 123.123.123.123 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&DeviceType=SmartPhone&DeviceId=E8C395B56FF444E24740B6 HTTP/1.1" 200 52141/58 0.220 - - 1M

Si vous avez une idée, des questions, je suis partant pour donner un coup de main afin que CrèmeCRM fonctionne avec SOGo.
  Répondre
#2
Bonsoir,

la situation de la synchronisation activesync dans Creme est délicate:
  • Le gros du code a été écrit il y a plusieurs années déjà, et en raison des besoins de nos clients, nos efforts se sont concentrés sur les implémentations de Google et de Microsoft (exchange et hotmail.com). Par exemple, quand cela a été écrit, Zpush (un serveur libre) ne marchait pas avec notre code, mais comme cela n'a jamais été demandé par aucun de nos utilisateurs, nous n'avons pas dépensé nos ressources pour investiguer de ce côté (et nous avons fait des fonctionnalités plus utiles du coup). De la même manière, nous n'avons même jamais testé avec Sogo (nous aimerions que nos clients utilisent plus de logiciels libres, mais c'est comme ça).
  • Pour diverses raisons, nous n'avons plus d'utilisateur de la synchronisation activesync depuis quelques temps. Aussi il nous est impossible de garantir son bon fonctionnement (nous n'avons pas l'intention de payer régulièrement des licences exchanges afin de tester que les nouvelles versions fonctionnent, sachant que ça n'a pas l'air d'intéresser grand monde).

Pour ces raisons, l'app est marquée comme obsolète dans la version de développement (et donc la future version1.7 de Creme) ; et si la situation ne change pas, elle sera supprimée de Creme 1.8.

Ça serait formidable si vous arriviez à faire fonctionner Creme avec Sogo ; on pourrait imaginer ne plus marquer l'app comme obsolète, et mettre en avant Sogo par rapport à google et Microsoft (puisque ne pouvant garantir leur bon fonctionnement).

En revanche, il m'est difficile de dire quel travail cela peut représenter.

Des pistes :
L'erreur qui vous est présentée est crée dans le fichier creme/activesync/commands/base.py avec les 2 "raise CremeActiveSyncError(SYNC_ERR_NOT_FOUND)" dans _send() et dans _decode(). Dans cette dernière méthode l'erreur n'est pas loggée (et c'est un souci), mais l'erreur est probablement soulevée dans la première, et se retrouve dans les données de debug. Pour les afficher, il faut mettre dans vos settings (votre local_settings.py par exemple) "ACTIVE_SYNC_DEBUG = True".

En espérant avoir été utile.
  Répondre
#3
Je vais vous aider pour que SOGo fonctionne car c'est un vrais atout :

- on se déplace en clientèle, on ajoute des tâches/notes via un mobile qui est synchro vers SOGo et donc importe également vers CrèmeCRM.
- on rajoute des contacts et des entrées dans l'agenda, CrèmeCRM devrait pouvoir les synchroniser afin d'organiser le suivi clientèle etc...
- les contacts/agendas partagés entre plusieurs collaborateur devrait permettre à CrèmeCRM de faire les liaisons entre les évènements et le suivi clientèle etc...

je pense que tout est coté CrèmeCRM car j'ai fait quelques tests un peu concluant, ce que je sais :
- la connexion avec SOGo ActiveSync fonctionne, il y a bien des requêtes, aucune erreur sur l'authentification.
- CremeCRM indique que l'URL n'est pas bonne, mais à mon avis il y a autre chose : je vais m'aider grâce à votre message au dessus.
*précision* : CrèmeCRM indique URL pas bonne dans le cas ou je veux synchroniser l'agenda et les contacts (paramétré sur OUI)

Lorsque je désactive la synchronisation de l'agenda et des contacts (paramétré sur NON), j'ai des tâches qui sont importé mais sans titre et avec des dates erroné, peux être que CrèmeCRM ne récupère pas les bonnes infos tout simplement, CrèmeCRM affiche :

Résultats de la synchronisation
3 Informations

Il y a 0 nouveau(x) Activité venant du serveur

0 Activité ont été modifiés par rapport au serveur

0 Activité ont été effacés par rapport au serveur

1 Erreur

Vous n'avez pas le droit de créer des contacts dans Crème

Lorsque j'active la synchronisation de l'agenda uniquement : ERREUR 500, CrèmeCRM plante.

Lorsque j'active la synchronisation des contacts uniquement : ERREUR 500, CrèmeCRM plante.
  Répondre
#4
Voici le debug dans les logs apache concernant ActiveSync, je pense que c'est un problème de relation entre ce qui arrive de SOGo et l'insertion dans la base MySQL, je ne suis pas développeur mais je peux donner un coup de main, est-ce que ce serait possible de m'aiguiller ?

[Mon Feb 06 10:53:01.024649 2017] [wsgi:error] [pid 30233:tid 139867263149824] 2017-02-06 10:53:01 [ERROR] - creme.creme_core.middleware.exceptions : Error (
status=500)
[Mon Feb 06 10:53:01.024671 2017] [wsgi:error] [pid 30233:tid 139867263149824] Traceback (most recent call last):
[Mon Feb 06 10:53:01.024692 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Mon Feb 06 10:53:01.024700 2017] [wsgi:error] [pid 30233:tid 139867263149824] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Mon Feb 06 10:53:01.024707 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Mon Feb 06 10:53:01.024720 2017] [wsgi:error] [pid 30233:tid 139867263149824] return view_func(request, *args, **kwargs)
[Mon Feb 06 10:53:01.024728 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Mon Feb 06 10:53:01.024734 2017] [wsgi:error] [pid 30233:tid 139867263149824] return view_func(request, *args, **kwargs)
[Mon Feb 06 10:53:01.024741 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/views/sync.py", line 47, in main_sync
[Mon Feb 06 10:53:01.024753 2017] [wsgi:error] [pid 30233:tid 139867263149824] sync.synchronize()
[Mon Feb 06 10:53:01.024760 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/sync.py", line 207, in synchronize
[Mon Feb 06 10:53:01.024767 2017] [wsgi:error] [pid 30233:tid 139867263149824] as_ = self._sync(policy_key, folders, sync_key, True)
[Mon Feb 06 10:53:01.024779 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/sync.py", line 224, in _sync
[Mon Feb 06 10:53:01.024787 2017] [wsgi:error] [pid 30233:tid 139867263149824] as_.send(policy_key, as_folder, synckey, fetch)
[Mon Feb 06 10:53:01.024793 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/commands/airsync.py", line 72, in send
[Mon Feb 06 10:53:01.024806 2017] [wsgi:error] [pid 30233:tid 139867263149824] self.send_for_folder(policy_key, folder, synckey, fetch, headers)
[Mon Feb 06 10:53:01.024813 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/commands/airsync.py", line 222, in send_for_folder
[Mon Feb 06 10:53:01.024820 2017] [wsgi:error] [pid 30233:tid 139867263149824] SyncKeyHistory.back_to_previous_key(client)
[Mon Feb 06 10:53:01.024832 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/models/active_sync.py", line 172, in back_to_previous_key
[Mon Feb 06 10:53:01.024839 2017] [wsgi:error] [pid 30233:tid 139867263149824] client.save()
[Mon Feb 06 10:53:01.024846 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 734, in save
[Mon Feb 06 10:53:01.024852 2017] [wsgi:error] [pid 30233:tid 139867263149824] force_update=force_update, update_fields=update_fields)
[Mon Feb 06 10:53:01.024865 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 762, in save_base
[Mon Feb 06 10:53:01.024872 2017] [wsgi:error] [pid 30233:tid 139867263149824] updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
[Mon Feb 06 10:53:01.024878 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 827, in _save_table
[Mon Feb 06 10:53:01.024891 2017] [wsgi:error] [pid 30233:tid 139867263149824] forced_update)
[Mon Feb 06 10:53:01.024898 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 877, in _do_update
[Mon Feb 06 10:53:01.024904 2017] [wsgi:error] [pid 30233:tid 139867263149824] return filtered._update(values) > 0
[Mon Feb 06 10:53:01.024916 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", lin
[Mon Feb 06 10:53:01.024904 2017] [wsgi:error] [pid 30233:tid 139867263149824] return filtered._update(values) > 0
[Mon Feb 06 10:53:01.024916 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 580, in _update
[Mon Feb 06 10:53:01.024924 2017] [wsgi:error] [pid 30233:tid 139867263149824] return query.get_compiler(self.db).execute_sql(CURSOR)
[Mon Feb 06 10:53:01.024930 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
[Mon Feb 06 10:53:01.024937 2017] [wsgi:error] [pid 30233:tid 139867263149824] cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
[Mon Feb 06 10:53:01.024949 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 829, in execute_sql
[Mon Feb 06 10:53:01.024956 2017] [wsgi:error] [pid 30233:tid 139867263149824] sql, params = self.as_sql()
[Mon Feb 06 10:53:01.024963 2017] [wsgi:error] [pid 30233:tid 139867263149824] File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1028, in as_sql
[Mon Feb 06 10:53:01.024975 2017] [wsgi:error] [pid 30233:tid 139867263149824] (field.__class__.__name__, val.__class__.__name__))
[Mon Feb 06 10:53:01.024982 2017] [wsgi:error] [pid 30233:tid 139867263149824] TypeError: Database is trying to update a relational field of type CharField with a value of type SyncKeyHistory. Make sure you are setting the correct relations
[Mon Feb 06 10:53:04.830150 2017] [wsgi:error] [pid 30233:tid 139867254757120] [FolderSync] Doesn't need SYNC_NEED_CURRENT_POLICY
[Mon Feb 06 10:53:04.830225 2017] [wsgi:error] [pid 30233:tid 139867254757120] [FolderSync] self.synckey : sogov3_6327_1e487cbc_0
[Mon Feb 06 10:53:04.830255 2017] [wsgi:error] [pid 30233:tid 139867254757120] [FolderSync] (end) Status : 1
  Répondre
#5
[Mon Feb 06 11:04:37.723531 2017] [wsgi:error] [pid 30415:tid 140384725665536] 2017-02-06 11:04:37 [ERROR] - creme.creme_core.middleware.exceptions : Error (status=500)
[Mon Feb 06 11:04:37.723578 2017] [wsgi:error] [pid 30415:tid 140384725665536] Traceback (most recent call last):
[Mon Feb 06 11:04:37.723586 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Mon Feb 06 11:04:37.723593 2017] [wsgi:error] [pid 30415:tid 140384725665536] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Mon Feb 06 11:04:37.723607 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Mon Feb 06 11:04:37.723614 2017] [wsgi:error] [pid 30415:tid 140384725665536] return view_func(request, *args, **kwargs)
[Mon Feb 06 11:04:37.723621 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Mon Feb 06 11:04:37.723633 2017] [wsgi:error] [pid 30415:tid 140384725665536] return view_func(request, *args, **kwargs)
[Mon Feb 06 11:04:37.723641 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/views/sync.py", line 47, in main_sync
[Mon Feb 06 11:04:37.723647 2017] [wsgi:error] [pid 30415:tid 140384725665536] sync.synchronize()
[Mon Feb 06 11:04:37.723654 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/sync.py", line 181, in synchronize
[Mon Feb 06 11:04:37.723666 2017] [wsgi:error] [pid 30415:tid 140384725665536] _fs = self._folder_sync(policy_key, folder_sync_key)#Try to sync server folders
[Mon Feb 06 11:04:37.723673 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/sync.py", line 237, in _folder_sync
[Mon Feb 06 11:04:37.723680 2017] [wsgi:error] [pid 30415:tid 140384725665536] fs.send(policy_key, sync_key)
[Mon Feb 06 11:04:37.723692 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/commands/foldersync.py", line 48, in send
[Mon Feb 06 11:04:37.723699 2017] [wsgi:error] [pid 30415:tid 140384725665536] xml = super(FolderSync, self).send({'synckey': sync_key}, headers=http_headers)
[Mon Feb 06 11:04:37.723706 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/commands/base.py", line 152, in send
[Mon Feb 06 11:04:37.723718 2017] [wsgi:error] [pid 30415:tid 140384725665536] return self._decode(response)
[Mon Feb 06 11:04:37.723725 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/commands/base.py", line 126, in _decode
[Mon Feb 06 11:04:37.723732 2017] [wsgi:error] [pid 30415:tid 140384725665536] print u"Response: %s" % prettify(self.decoder(content))
[Mon Feb 06 11:04:37.723744 2017] [wsgi:error] [pid 30415:tid 140384725665536] File "/var/www/hybird-creme_crm-1.6-70ec4f47f2ad/creme/activesync/wbxml/codec.py", line 81, in prettify
[Mon Feb 06 11:04:37.723751 2017] [wsgi:error] [pid 30415:tid 140384725665536] rough_string = ElementTree.tostring(elem, 'utf-8')
[Mon Feb 06 11:04:37.723758 2017] [wsgi:error] [pid 30415:tid 140384725665536] AttributeError: type object 'ElementTree' has no attribute 'tostring'
[Mon Feb 06 11:05:04.141714 2017] [wsgi:error] [pid 30415:tid 140384725665536] Request:
[Mon Feb 06 11:05:04.141755 2017] [wsgi:error] [pid 30415:tid 140384725665536] 0

Si vous le voulez, je peux vous créer un accès à mon CrèmeCRM et à SOGo.
  Répondre
#6
Bonsoir.

J'ai réussi à reproduire votre seconde erreur dans les tests unitaires, et l'ai donc corrigée. J'ai aussi grâce à votre stack trace compris l'autre erreur ; elle n'est pas couverte par les tests unitaires (comme je l'ai dit ce code est assez vieux et n'a pas des tests de la qualité du reste ; et puis ce genre de code est en plus plus difficile à tester), mais je pense l'avoir corrigée correctement.

Ces plantages arrivaient dans le traitement d'une erreur de type (je cite le code) "Invalid or mismatched synchronization key. OR Synchronization state corrupted on server.". Du coup, j'imagine que de toutes les façons il faudra du travail supplémentaire pour que la synchronisation se fasse correctement.
  Répondre
#7
Merci pour votre retour :-)

J'ai vu que vos collègues ont essayé de me joindre par téléphone, mais pas beaucoup de temps cette semaine, je prévois dans la semaine qui arrive de vous recontacter:-)

Bon weekend.
  Répondre
#8
Bonjour,

Je reviens vers vous concernant SOGo, j'ai effectué la mise à jour vers CremeCRM 1.6.11, voici le journal apache2 lors de la synchronisation ActiveSync, il y a vraiment du mieux dans la journalisation :-)

J'obtiens le vrai nom du dossier utilisateur SOGO : sogov3_5b42_1eb1fe82_0
Les contacts voulant se synchroniser et qui s'affiche dans le traceback sont bien ceux de mon téléphone (j'ai caché volontairement NOM PRENOM)

[Thu Apr 27 12:24:53.450288 2017] [wsgi:error] [pid 1576] 2017-04-27 12:24:53 [ERROR] - creme.creme_core.middleware.exceptions : Error (status=500)
[Thu Apr 27 12:24:53.450331 2017] [wsgi:error] [pid 1576] Traceback (most recent call last):
[Thu Apr 27 12:24:53.450340 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Thu Apr 27 12:24:53.450346 2017] [wsgi:error] [pid 1576] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu Apr 27 12:24:53.450353 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Thu Apr 27 12:24:53.450365 2017] [wsgi:error] [pid 1576] return view_func(request, *args, **kwargs)
[Thu Apr 27 12:24:53.450372 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Thu Apr 27 12:24:53.450378 2017] [wsgi:error] [pid 1576] return view_func(request, *args, **kwargs)
[Thu Apr 27 12:24:53.450389 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/views/sync.py", line 45, in main_sync
[Thu Apr 27 12:24:53.450396 2017] [wsgi:error] [pid 1576] sync.synchronize()
[Thu Apr 27 12:24:53.450403 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/sync.py", line 207, in synchronize
[Thu Apr 27 12:24:53.450409 2017] [wsgi:error] [pid 1576] as_ = self._sync(policy_key, folders, sync_key, True)
[Thu Apr 27 12:24:53.450420 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/sync.py", line 224, in _sync
[Thu Apr 27 12:24:53.450427 2017] [wsgi:error] [pid 1576] as_.send(policy_key, as_folder, synckey, fetch)
[Thu Apr 27 12:24:53.450434 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/commands/airsync.py", line 72, in send
[Thu Apr 27 12:24:53.450440 2017] [wsgi:error] [pid 1576] self.send_for_folder(policy_key, folder, synckey, fetch, headers)
[Thu Apr 27 12:24:53.450451 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/commands/airsync.py", line 258, in send_for_folder
[Thu Apr 27 12:24:53.450458 2017] [wsgi:error] [pid 1576] entity = save_entity(data, user, folder)
[Thu Apr 27 12:24:53.450464 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/mappings/contact.py", line 295, in save_contact
[Thu Apr 27 12:24:53.450475 2017] [wsgi:error] [pid 1576] c.save() #TODO: are the addresses OK (when they do not have a PK yet) ??
[Thu Apr 27 12:24:53.450482 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/persons/models/contact.py", line 217, in save
[Thu Apr 27 12:24:53.450488 2017] [wsgi:error] [pid 1576] super(AbstractContact, self).save(*args, **kwargs)
[Thu Apr 27 12:24:53.450495 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/creme_core/models/entity.py", line 338, in save
[Thu Apr 27 12:24:53.450506 2017] [wsgi:error] [pid 1576] super(CremeEntity, self).save(*args, **kwargs)
[Thu Apr 27 12:24:53.450513 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 685, in save
[Thu Apr 27 12:24:53.450519 2017] [wsgi:error] [pid 1576] "unsaved related object '%s'." % field.name
[Thu Apr 27 12:24:53.450525 2017] [wsgi:error] [pid 1576] ValueError: save() prohibited to prevent data loss due to unsaved related object 'billing_address'.

[Thu Apr 27 12:25:06.092869 2017] [wsgi:error] [pid 1576] [FolderSync] Doesn't need SYNC_NEED_CURRENT_POLICY
[Thu Apr 27 12:25:06.092940 2017] [wsgi:error] [pid 1576] [FolderSync] self.synckey : sogov3_5b42_1eb1fe82_0
[Thu Apr 27 12:25:06.093784 2017] [wsgi:error] [pid 1576] [FolderSync] (end) Status : 1

[Thu Apr 27 12:25:07.426586 2017] [wsgi:error] [pid 1576] 2017-04-27 12:25:07 [ERROR] - creme.activesync.commands.airsync : Entity : NOM PRENOM\r (pk=167) big error in the mapping
[Thu Apr 27 12:25:08.300601 2017] [wsgi:error] [pid 1576] 2017-04-27 12:25:08 [ERROR] - creme.creme_core.middleware.exceptions : Error (status=500)
[Thu Apr 27 12:25:08.300616 2017] [wsgi:error] [pid 1576] Traceback (most recent call last):
[Thu Apr 27 12:25:08.300623 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Thu Apr 27 12:25:08.300639 2017] [wsgi:error] [pid 1576] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu Apr 27 12:25:08.300646 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Thu Apr 27 12:25:08.300653 2017] [wsgi:error] [pid 1576] return view_func(request, *args, **kwargs)
[Thu Apr 27 12:25:08.300660 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Thu Apr 27 12:25:08.300672 2017] [wsgi:error] [pid 1576] return view_func(request, *args, **kwargs)
[Thu Apr 27 12:25:08.300685 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/views/sync.py", line 45, in main_sync
[Thu Apr 27 12:25:08.300692 2017] [wsgi:error] [pid 1576] sync.synchronize()
[Thu Apr 27 12:25:08.300698 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/sync.py", line 207, in synchronize
[Thu Apr 27 12:25:08.300711 2017] [wsgi:error] [pid 1576] as_ = self._sync(policy_key, folders, sync_key, True)
[Thu Apr 27 12:25:08.300718 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/sync.py", line 224, in _sync
[Thu Apr 27 12:25:08.300725 2017] [wsgi:error] [pid 1576] as_.send(policy_key, as_folder, synckey, fetch)
[Thu Apr 27 12:25:08.300731 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/commands/airsync.py", line 72, in send
[Thu Apr 27 12:25:08.300744 2017] [wsgi:error] [pid 1576] self.send_for_folder(policy_key, folder, synckey, fetch, headers)
[Thu Apr 27 12:25:08.300751 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/commands/airsync.py", line 258, in send_for_folder
[Thu Apr 27 12:25:08.300758 2017] [wsgi:error] [pid 1576] entity = save_entity(data, user, folder)
[Thu Apr 27 12:25:08.300770 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/activesync/mappings/contact.py", line 295, in save_contact
[Thu Apr 27 12:25:08.300777 2017] [wsgi:error] [pid 1576] c.save() #TODO: are the addresses OK (when they do not have a PK yet) ??
[Thu Apr 27 12:25:08.300784 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/persons/models/contact.py", line 217, in save

[Thu Apr 27 12:25:08.300796 2017] [wsgi:error] [pid 1576] super(AbstractContact, self).save(*args, **kwargs)
[Thu Apr 27 12:25:08.300803 2017] [wsgi:error] [pid 1576] File "/var/www/hybird-creme_crm-1.6-f560ac19d8b7/creme/creme_core/models/entity.py", line 338, in save
[Thu Apr 27 12:25:08.300810 2017] [wsgi:error] [pid 1576] super(CremeEntity, self).save(*args, **kwargs)
[Thu Apr 27 12:25:08.300816 2017] [wsgi:error] [pid 1576] File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 685, in save
[Thu Apr 27 12:25:08.300828 2017] [wsgi:error] [pid 1576] "unsaved related object '%s'." % field.name
[Thu Apr 27 12:25:08.300836 2017] [wsgi:error] [pid 1576] ValueError: save() prohibited to prevent data loss due to unsaved related object 'billing_address'.
  Répondre
#9
Bonjour.

Cela aura pris longtemps car j'ai pas mal de chose à faire en parallèle, mais j'ai releasé la 1.6.12 vendredi et elle devrait corriger ce bug.

Merci encore pour vos bug reports.
  Répondre
#10
Bonjour :-)

Je vais tester sous peu et vous tiens informé ;-)

Merci pour la qualité de votre travail.
  Répondre


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)