apptension/saas-boilerplate

Web app not running on clean install

DerekCrosson opened this issue · 0 comments

Describe the bug

I have followed the instructions in the documentation (not a manual setup, I used pnpm). When I run pnpm saas up the container is created but I get the following error when looking at the logs of the webapp (it also does not load in the browser):

2024-03-08 13:50:29 Local trigger server listening at http://0.0.0.0:3005
2024-03-08 13:50:45 stdout: 
2024-03-08 13:50:45 > workers@2.6.0 sls /app/packages/workers
2024-03-08 13:50:45 > sls "invoke" "local" "-f" "SynchronizeContentfulContent" "-d" "{\"source\":\"backend.contentfulSync\",\"detail-type\":\"complete\",\"detail\":{\"id\":\"9e7f2b749b8d422f9f0f4e205fe2d986\",\"type\":\"complete\"}}"
2024-03-08 13:50:45 
2024-03-08 13:50:45 
2024-03-08 13:50:50 stderr: 
2024-03-08 13:50:50 
2024-03-08 13:50:50 stderr: Warning: Invalid configuration encountered
2024-03-08 13:50:50   at 'functions.ExportUsers.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50   at 'functions.ExportUsers.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50   at 'functions.SynchronizeContentfulContent.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50   at 'functions.SynchronizeContentfulContent.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50   at 'functions.WebSocketsConnectHandler.environment': must be object
2024-03-08 13:50:50   at 'functions.WebSocketsConnectHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50   at 'functions.WebSocketsConnectHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50   at 'functions.WebSocketsMessageHandler.environment': must be object
2024-03-08 13:50:50   at 'functions.WebSocketsMessageHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50   at 'functions.WebSocketsMessageHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50   at 'functions.WebSocketsDisconnectHandler.environment': must be object
2024-03-08 13:50:50   at 'functions.WebSocketsDisconnectHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50   at 'functions.WebSocketsDisconnectHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50 
2024-03-08 13:50:50 Learn more about configuration validation here: http://slss.io/configuration-validation
2024-03-08 13:50:50 Using serverless-localstack
2024-03-08 13:50:50 serverless-localstack: Reconfigured endpoints
2024-03-08 13:50:50 
2024-03-08 13:50:52 stdout: INFO:root:{
2024-03-08 13:50:52   "source": "backend.contentfulSync",
2024-03-08 13:50:52   "detail-type": "complete",
2024-03-08 13:50:52   "detail": {
2024-03-08 13:50:52     "id": "9e7f2b749b8d422f9f0f4e205fe2d986",
2024-03-08 13:50:52     "type": "complete"
2024-03-08 13:50:52   }
2024-03-08 13:50:52 }
2024-03-08 13:50:52 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stdout: Traceback (most recent call last):
2024-03-08 13:50:52   File "/app/node_modules/.pnpm/serverless@3.38.0/node_modules/serverless/lib/plugins/aws/invoke-local/runtime-wrappers/invoke.py", line 94, in <module>
2024-03-08 13:50:52 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stdout:     result = handler(input['event'], context)
2024-03-08 13:50:52              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52   File "/app/packages/workers/content/handlers.py", line 18, in synchronize_content
2024-03-08 13:50:52     synchronizer = services.ContentfulSync(client=client.get_client(), session=session)
2024-03-08 13:50:52                                                   ^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52   File "/app/packages/workers/content/client.py", line 7, in get_client
2024-03-08 13:50:52 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stdout:     return contentful.Client(
2024-03-08 13:50:52            ^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52   File "/pkgs/__pypackages__/3.11/lib/contentful/client.py", line 138, in __init__
2024-03-08 13:50:52     self._cache_content_types()
2024-03-08 13:50:52   File "/pkgs/__pypackages__/3.11/lib/contentful/client.py", line 433, in _cache_content_types
2024-03-08 13:50:52 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stdout:     ContentTypeCache.update_cache(self)
2024-03-08 13:50:52   File "/pkgs/__pypackages__/3.11/lib/contentful/content_type_cache.py", line 38, in update_cache
2024-03-08 13:50:52     cls.__CACHE__ = client.content_types()
2024-03-08 13:50:52                     ^^^^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52   File "/pkgs/__pypackages__/3.11/lib/contentful/client.py", line 196, in content_types
2024-03-08 13:50:52     return self._get(
2024-03-08 13:50:52            ^^^^^^^^^^
2024-03-08 13:50:52   File "/pkgs/__pypackages__/3.11/lib/contentful/client.py", line 575, in _get
2024-03-08 13:50:52     raise error
2024-03-08 13:50:52 contentful.errors.NotFoundError: HTTP status code: 404
2024-03-08 13:50:52 Message: The resource could not be found.
2024-03-08 13:50:52 Request ID: 5dc133df-9f22-4c9c-add4-1a3099279a2e
2024-03-08 13:50:52 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stderr: Environment: linux, node 18.17.1, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
2024-03-08 13:50:52 Credentials: Local, environment variables
2024-03-08 13:50:52 Docs:        docs.serverless.com
2024-03-08 13:50:52 Support:     forum.serverless.com
2024-03-08 13:50:52 Bugs:        github.com/serverless/serverless/issues
2024-03-08 13:50:52 
2024-03-08 13:50:52 stderr: 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stdout: Error:
2024-03-08 13:50:52 Error: `python3 -u /app/node_modules/.pnpm/serverless@3.38.0/node_modules/serverless/lib/plugins/aws/invoke-local/runtime-wrappers/invoke.py content.handlers synchronize_content` Exited with code 1
2024-03-08 13:50:52     at ChildProcess.<anonymous> (/app/node_modules/.pnpm/child-process-ext@2.1.1/node_modules/child-process-ext/spawn.js:38:8)
2024-03-08 13:50:52     at ChildProcess.emit (node:events:514:28)
2024-03-08 13:50:52     at ChildProcess.emit (node:domain:489:12)
2024-03-08 13:50:52     at maybeClose (node:internal/child_process:1091:16)
2024-03-08 13:50:52     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
2024-03-08 13:50:52 
2024-03-08 13:50:52 stderr: 
2024-03-08 13:50:52 
2024-03-08 13:50:52 stderr: 1 deprecation found: run 'serverless doctor' for more details
2024-03-08 13:50:52 
2024-03-08 13:50:54 stdout:  ELIFECYCLE  Command failed with exit code 1.
2024-03-08 13:50:54 
2024-03-08 13:50:54 child process exited with code 1

Any idea how I can solve this? The config looks correct

Steps to reproduce

Follow the installation instructions and load the web app in the browser

System Info

System:
    OS: macOS 14.3
    CPU: (8) x64 Apple M1
    Memory: 22.20 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.15.4 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 122.0.6261.112
    Safari: 17.3

Logs

2024-03-08 13:50:29 Local trigger server listening at http://0.0.0.0:3005
2024-03-08 13:50:45 stdout:
2024-03-08 13:50:45 > workers@2.6.0 sls /app/packages/workers
2024-03-08 13:50:45 > sls "invoke" "local" "-f" "SynchronizeContentfulContent" "-d" "{"source":"backend.contentfulSync","detail-type":"complete","detail":{"id":"9e7f2b749b8d422f9f0f4e205fe2d986","type":"complete"}}"
2024-03-08 13:50:45
2024-03-08 13:50:45
2024-03-08 13:50:50 stderr:
2024-03-08 13:50:50
2024-03-08 13:50:50 stderr: Warning: Invalid configuration encountered
2024-03-08 13:50:50 at 'functions.ExportUsers.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50 at 'functions.ExportUsers.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50 at 'functions.SynchronizeContentfulContent.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50 at 'functions.SynchronizeContentfulContent.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50 at 'functions.WebSocketsConnectHandler.environment': must be object
2024-03-08 13:50:50 at 'functions.WebSocketsConnectHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50 at 'functions.WebSocketsConnectHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50 at 'functions.WebSocketsMessageHandler.environment': must be object
2024-03-08 13:50:50 at 'functions.WebSocketsMessageHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50 at 'functions.WebSocketsMessageHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50 at 'functions.WebSocketsDisconnectHandler.environment': must be object
2024-03-08 13:50:50 at 'functions.WebSocketsDisconnectHandler.vpc': must have required property 'securityGroupIds'
2024-03-08 13:50:50 at 'functions.WebSocketsDisconnectHandler.vpc': must have required property 'subnetIds'
2024-03-08 13:50:50
2024-03-08 13:50:50 Learn more about configuration validation here: http://slss.io/configuration-validation
2024-03-08 13:50:50 Using serverless-localstack
2024-03-08 13:50:50 serverless-localstack: Reconfigured endpoints
2024-03-08 13:50:50
2024-03-08 13:50:52 stdout: INFO:root:{
2024-03-08 13:50:52 "source": "backend.contentfulSync",
2024-03-08 13:50:52 "detail-type": "complete",
2024-03-08 13:50:52 "detail": {
2024-03-08 13:50:52 "id": "9e7f2b749b8d422f9f0f4e205fe2d986",
2024-03-08 13:50:52 "type": "complete"
2024-03-08 13:50:52 }
2024-03-08 13:50:52 }
2024-03-08 13:50:52
2024-03-08 13:50:52
2024-03-08 13:50:52 stdout: Traceback (most recent call last):
2024-03-08 13:50:52 File "/app/node_modules/.pnpm/serverless@3.38.0/node_modules/serverless/lib/plugins/aws/invoke-local/runtime-wrappers/invoke.py", line 94, in
2024-03-08 13:50:52
2024-03-08 13:50:52
2024-03-08 13:50:52 stdout: result = handler(input['event'], context)
2024-03-08 13:50:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52 File "/app/packages/workers/content/handlers.py", line 18, in synchronize_content
2024-03-08 13:50:52 synchronizer = services.ContentfulSync(client=client.get_client(), session=session)
2024-03-08 13:50:52 ^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52 File "/app/packages/workers/content/client.py", line 7, in get_client
2024-03-08 13:50:52
2024-03-08 13:50:52
2024-03-08 13:50:52 stdout: return contentful.Client(
2024-03-08 13:50:52 ^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52 File "/pkgs/pypackages/3.11/lib/contentful/client.py", line 138, in init
2024-03-08 13:50:52 self._cache_content_types()
2024-03-08 13:50:52 File "/pkgs/pypackages/3.11/lib/contentful/client.py", line 433, in _cache_content_types
2024-03-08 13:50:52
2024-03-08 13:50:52
2024-03-08 13:50:52 stdout: ContentTypeCache.update_cache(self)
2024-03-08 13:50:52 File "/pkgs/pypackages/3.11/lib/contentful/content_type_cache.py", line 38, in update_cache
2024-03-08 13:50:52 cls.CACHE = client.content_types()
2024-03-08 13:50:52 ^^^^^^^^^^^^^^^^^^^^^^
2024-03-08 13:50:52 File "/pkgs/pypackages/3.11/lib/contentful/client.py", line 196, in content_types
2024-03-08 13:50:52 return self._get(
2024-03-08 13:50:52 ^^^^^^^^^^
2024-03-08 13:50:52 File "/pkgs/pypackages/3.11/lib/contentful/client.py", line 575, in _get
2024-03-08 13:50:52 raise error
2024-03-08 13:50:52 contentful.errors.NotFoundError: HTTP status code: 404
2024-03-08 13:50:52 Message: The resource could not be found.
2024-03-08 13:50:52 Request ID: 5dc133df-9f22-4c9c-add4-1a3099279a2e
2024-03-08 13:50:52
2024-03-08 13:50:52
2024-03-08 13:50:52 stderr: Environment: linux, node 18.17.1, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
2024-03-08 13:50:52 Credentials: Local, environment variables
2024-03-08 13:50:52 Docs: docs.serverless.com
2024-03-08 13:50:52 Support: forum.serverless.com
2024-03-08 13:50:52 Bugs: github.com/serverless/serverless/issues
2024-03-08 13:50:52
2024-03-08 13:50:52 stderr:
2024-03-08 13:50:52
2024-03-08 13:50:52 stdout: Error:
2024-03-08 13:50:52 Error: python3 -u /app/node_modules/.pnpm/serverless@3.38.0/node_modules/serverless/lib/plugins/aws/invoke-local/runtime-wrappers/invoke.py content.handlers synchronize_content Exited with code 1
2024-03-08 13:50:52 at ChildProcess. (/app/node_modules/.pnpm/child-process-ext@2.1.1/node_modules/child-process-ext/spawn.js:38:8)
2024-03-08 13:50:52 at ChildProcess.emit (node:events:514:28)
2024-03-08 13:50:52 at ChildProcess.emit (node:domain:489:12)
2024-03-08 13:50:52 at maybeClose (node:internal/child_process:1091:16)
2024-03-08 13:50:52 at ChildProcess._handle.onexit (node:internal/child_process:302:5)
2024-03-08 13:50:52
2024-03-08 13:50:52 stderr:
2024-03-08 13:50:52
2024-03-08 13:50:52 stderr: 1 deprecation found: run 'serverless doctor' for more details
2024-03-08 13:50:52
2024-03-08 13:50:54 stdout:  ELIFECYCLE  Command failed with exit code 1.
2024-03-08 13:50:54
2024-03-08 13:50:54 child process exited with code 1

Validations