MitocGroup / deep-package-manager

DEEP = Digital Enterprise End-to-end Platform

Home Page:https://www.deep.mg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to import module ‘bootstrap’ (detected on todo.deep.mg)

eistrati opened this issue · comments

After some research and logs analysis we have discovered the following:

Registration lambdas are returning errors consistently when trying ClientRegister from WP for an existing user Error registering XXXXX identity. UsernameExistsException: User already exists
That’s actually a normal behavior and it is properly handled on WP (showing "confirm your identity" view).
I’ve rechecked the X-Ray and the errors seems not be be there, but the CloudWatch Alarm graphic remains constantly at ~50 errors/period (5min).

I’ve checked literally each lambda with at least one call and here’s the list of lambdas returned an error at least once:

[!] DeepProdTaskCreate122355182282 - Unable to import module ‘bootstrap’ (Preliminary Cause: Not compiled)
[!] DeepDevAsyncConfigDump35f4d89007 - Error at Object.module.exports.a.__esModule.default (Preliminary Cause: Broken module- uncompiled dynamic include)
[!] DeepProdTaskRetrieve122355182282 - Unable to import module ‘bootstrap’ (Preliminary Cause: Not compiled)
[!] DeepProdDdbEventualConsistencyListenQueues012155182282 - Unable to import module ‘bootstrap’ (Preliminary Cause: Not compiled)
[!] DeepDevAsyncConfigDump3575b67f96 - module initialization error: Error at Object.fs.readdirSync (Preliminary Cause: Broken module- uncompiled dynamic include)
[!] DeepDevDdbEventualConsistencyListenQueues35f4d89007 - Cannot read property 'context' of undefined (Preliminary Cause: Deprecated libraries)
[!] DeepDevDdbEventualConsistencyListenQueues3575b67f96 - Cannot read property 'context' of undefined (Preliminary Cause: Deprecated libraries)

Unable to reproduce with latest deepify:

screen shot 2017-07-24 at 11 09 28

Looks like something is still wrong (API returns 500):

screen shot 2017-08-28 at 12 47 52 pm

I'll check this one more time

Well, it seems to be another bug, somehow related to account functionality:

{
    "errorMessage": "{\"errorType\":\"DatabaseOperationException\",\"errorMessage\":\"Database operation failed. ValidationError: AccountId is not allowed\",\"errorStack\":\"DatabaseOperationException: Database operation failed. ValidationError: AccountId is not allowed\\n    at TaskModel.createItem (/var/task/bootstrap.js:230610:15)\\n    at /var/task/bootstrap.js:115549:14\\n    at /var/task/bootstrap.js:24475:16\\n    at Immediate.<anonymous> (/var/task/bootstrap.js:25629:34)\\n    at Immediate.<anonymous> (/var/task/bootstrap.js:80575:31)\\n    at runCallback (timers.js:672:20)\\n    at tryOnImmediate (timers.js:645:5)\\n    at processImmediate [as _immediateCallback] (timers.js:617:5)\",\"_deep_error_code_\":500}"
}

@mgoria do you have any idea what could be caused here?

Fixed in deep-framework@1.12.45. Please make sure to recompile lambda functions before redeploying the app.

Problem fixed. Closing this issue.