YunoHost-Apps/wekan_ynh

Import board from previous version of wekan failing

arthurzenika opened this issue · 3 comments

We're trying to migrate from a wekan installed from source to a wekan managed by yunohost. New boards work great, thanks for that !

For the "Import board from previous export" we have two problems :

  • When previous users are not mapped in the mapping process (no UX seems to indicate this is mandatory) we get a 400 error in the web interface, checking the logs the error is pretty explicit :
Exception while invoking method 'importBoard' { stack: 'Error: User id is required
    at getErrorObject (packages/aldeed_collection2-core.js:480:15)
    at ns.Collection.doValidate (packages/aldeed_collection2-core.js:462:13)
    at ns.Collection.Mongo.Collection.(anonymous function) [as insert] (packages/aldeed_collection2-core.js:214:25)
    at packages/matb33_collection-hooks.js:127:46
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Object.directOp (packages/matb33_collection-hooks.js:47:27)
    at Object.self.direct.(anonymous function) [as insert] (packages/matb33_collection-hooks.js:126:30)
    at WekanCreator.createBoardAndLabels (models/wekanCreator.js:226:35)
    at WekanCreator.create (models/wekanCreator.js:792:26)
    at DDPCommon.MethodInvocation.importBoard (models/import.js:27:20)
    at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/mdg_meteor-apm-agent.js:2729:30)
    at packages/check.js:128:16
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Object._failIfArgumentsAreNotAllChecked (packages/check.js:127:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)',

Thats OK, we can bypass that problem, create the users that we're there and map all the users. Then we get the following error :

Exception while invoking method 'importBoard' { stack: 'TypeError: Cannot read property 'forEach' of undefined
    at WekanCreator.createSwimlanes (models/wekanCreator.js:479:20)
    at WekanCreator.create (models/wekanCreator.js:794:10)
    at DDPCommon.MethodInvocation.importBoard (models/import.js:27:20)
    at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/mdg_meteor-apm-agent.js:2729:30)
    at packages/check.js:128:16
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Object._failIfArgumentsAreNotAllChecked (packages/check.js:127:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1765:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Promise (packages/ddp-server/livedata_server.js:715:46)
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/mdg_meteor-apm-agent.js:2617:38',

I can report this upstream if this totally unrelated to the wekan in yunohost.

Oh, and the board is created, with some attributes (list names, members, color, labels), but no cards.

Did you report this upstream @arthurlogilab?

It feels like an upstream issue from a quick glance.

@decentral1se yes there is a link to the report upstream wekan/wekan#2543 their solution is a bit convoluted but I need to take time to try it out, let's close this issue. Thanks for your response.