Erreur rencontrée dans le hook Accounts.onlogin à la connexion
Problème rencontré sur eole3.dev (laboite v13) à la connexion d'un nouvel utilisateur (utilisateur avec structure sélectionnée automatiquement par rapport à son email)
2024-06-03 09:00:33.995 [info] [SYSTEM] USERS - METHOD - UPDATE (meteor user) - Accounts.onLogin - user id: gJmMXKREd3SJswSNM
/ info: {"createdAt":"2024-06-03T09:00:33.932Z","structure":"pqFsQXsSoEavCDs53","isActive":true,"emails":[{"address":"ben@ac-dijon.fr","verified":true}],"lastGlobalInfoReadDate":null,"isRequest":true,"favServices":[],"favGroups":[],"favUserBookmarks":[],"advancedPersonalPage":false,"betaServices":false,"articlesCount":0,"groupCount":0,"groupQuota":10,"nclocator":"https://nuage03.pp.appseducation.org","authToken":"9q0gsy-gCT024Ve2K81TsicSSMX14G-uwFKcW89Dp-YKAdw89d4U1rkLkA_EwXSphJMh02MRFOtlGjxIinIb_fWu3vx60FjFRhgbIiLKSyLZ3ZJ4H7Sx6ncOSnmGTmg0yU9ZW4J8C6RzRccyg9_dPH","lastLogin":"2024-06-03T09:00:33.992Z","primaryEmail":"ben@ac-dijon.fr","username":"ben","lastName":"Ben","firstName":"Ben"} {}
Exception in onLogin callback Error [MinimongoError]: The positional operator did not find the match needed from the query
at MinimongoError (packages/minimongo/common.js:1085:17)
at findModTarget (packages/minimongo/local_collection.js:1973:17)
at packages/minimongo/local_collection.js:1168:24
at Array.forEach (<anonymous>)
at packages/minimongo/local_collection.js:1152:28
at Array.forEach (<anonymous>)
at Function.LocalCollection._modify (packages/minimongo/local_collection.js:1142:27)
at Function.LocalCollection._createUpsertDocument (packages/minimongo/local_collection.js:945:19)
at MongoConnection._update (packages/mongo/mongo_driver.js:553:38)
at MongoConnection.<anonymous> (packages/meteor.js:350:21)
at MongoConnection.<computed> [as update] (packages/mongo/mongo_driver.js:782:49)
at Object.<anonymous> (packages/matb33:collection-hooks/update.js:104:29)
at Object.collection.<computed> [as update] (packages/matb33:collection-hooks/collection-hooks.js:116:21)
at ns.Collection.update (packages/mongo/collection.js:701:31)
at ns.Collection.Mongo.Collection.<computed> [as update] (packages/aldeed:collection2/collection2.js:217:19)
at MethodInvocation.run (imports/api/personalspaces/methods.js:499:27)
at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:141:43)
at MethodInvocation.personalspaces.generateDefaultPersonalSpace (packages/mdg:validated-method/validated-method.js:62:23)
at MethodInvocation.wrappedMethodHandler (packages/eoleteam:method-hooks/server.js:14:17)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1938:12)
at packages/ddp-server/livedata_server.js:1856:15
at packages/meteor.js:365:18
=> awaited here:
at Promise.await (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
at Server.apply (packages/ddp-server/livedata_server.js:1805:22)
at ValidatedMethod.call (packages/mdg:validated-method/validated-method.js:75:30)
at imports/api/users/AccountUserHook.js:84:38
at packages/callback-hook/hook.js:177:18
at packages/meteor.js:365:18
at packages/accounts-base/accounts_server.js:250:7
at Hook.forEach (packages/callback-hook/hook.js:124:15)
at Hook.each (packages/callback-hook/hook.js:158:17)
at AccountsServer._successfulLogin (packages/accounts-base/accounts_server.js:249:23)
at packages/accounts-base/accounts_server.js:485:12
at /opt/bundle/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Le hook semble échouer sur l'application de l'espace personnel par défaut et ne va donc pas au bout de la procédure (entre autres, l'utilisateur n'est pas inscrit au groupe de sa structure)