serverless-domain-manager: TypeError: Cannot read property 'ACM' of undefined

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave “+1” or “me too” comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Bug Report

Error Description Serverless Deploy fails on GitHub Actions with error: TypeError: Cannot read property 'ACM' of undefined

Command Run The command run was the automatic Servlerless Deploy action through GitHub marketplace. This issue has only become apparent in the evening. Several deployments were made earlier in the day to no issue.

Console Output

  Type Error ----------------------------------------------
 
  TypeError: Cannot read property 'ACM' of undefined
      at new DomainConfig (/github/workspace/node_modules/serverless-domain-manager/dist/src/DomainConfig.js:52:71)
      at /github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:107:35
      at Array.forEach (<anonymous>)
      at ServerlessCustomDomain.initializeVariables (/github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:89:23)
      at ServerlessCustomDomain.<anonymous> (/github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:59:18)
      at Generator.next (<anonymous>)
      at /github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:8:71
      at new Promise (<anonymous>)
      at __awaiter (/github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:4:12)
      at ServerlessCustomDomain.hookWrapper (/github/workspace/node_modules/serverless-domain-manager/dist/src/index.js:55:16)
      at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:541:20)

Domain Manager Configuration Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.

custom:
  serverless-offline:
    httpPort: 9000
    stageVariables:
      env: 'local'
  bundle:
    linting: false
  stage: ${opt:stage}
  domains:
    prod: api.foo.com
    dev: dev-api.foo.com
    demo: demo-api.foo.com
  customDomain:
    basePath: ''
    domainName: ${self:custom.domains.${self:custom.stage}, 'local'}
    stage: '${self:custom.stage}'
    createRoute53Record: true

Versions

  • Domain Manager version(s): 5
  • Node/npm version: node v12.21.0 npm 6.14.11
  • Serverless Version: 2.3.0
  • Lambda Code Express JS

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 23
  • Comments: 18

Most upvoted comments

Seems like it’s fixed with https://github.com/serverless/serverless/pull/9127 in version 2.30.2

@matthieudesprez reverting to 2.29.0 worked for us. Looking at their build history at https://github.com/serverless/serverless/actions it seems they’re aware of the issue (misconfigured AWS creds looks like) and are frantically trying to fix it. Until then we’re reverting to the older version in our scripts.

Hey, I have the exact same issue. It worked yesterday but stopped today.

Same here, it seems to come from

this.acm = new Globals_1.default.serverless.providers.aws.sdk.ACM(acmCredentials);

and linked to serverless latest release https://github.com/serverless/serverless/releases/tag/v2.30.0

Revert and fix to serverless 2.29.0 should resolve the issue temporarily

still not fixed my current information

Framework Core: 2.30.2
Plugin: 4.5.1
SDK: 4.2.0
Components: 3.7.3
     Operating System:          darwin
     Node Version:              14.16.0
     Framework Version:         2.30.2
     Plugin Version:            4.5.1
     SDK Version:               4.2.0
     Components Version:        3.7.3

TypeError: Cannot read property ‘domainName’ of undefined Then I tried with latest latest version of serverless, still an issue

Framework Core: 2.30.3
Plugin: 4.5.1
SDK: 4.2.0
Components: 3.7.4
plugins:
  - serverless-domain-manager

custom:
  customDomain:
    domainName: iluvturtles.flappyjeffy.fun
    stage: ${self:provider.stage}
    basePath: ''

For me it is

 TypeError: Cannot read property 'config' of undefined
      at ServerlessCustomDomain.initializeVariables (/opt/atlassian/pipelines/agent/build/node_modules/serverless-domain-manager/dist/index.js:176:47)

I had this issue also. Just confirmation that downgrading to version 2.29.0 did the trick for me.

@jchambliss sls v2.30.1 - issue still exist.

Not surprised. I would stick with 2.29.0 for the foreseeable future.