You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently testing using serverless offline to emulate an aws lambda that i will be deploying. It uses the default opensearch client to call an empty opensearch instance (with no data yet) running locally on my computer. When trying to return the search result I get the following error
× Uncaught exception
Environment: win32, node 22.11.0, framework 3.39.0 (local), plugin 7.2.3, SDK 4.5.1
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({})
at Worker.emit (node:events:507:17)
at Worker.emit (node:domain:489:12)
at [kOnErrorMessage] (node:internal/worker:326:10)
at [kOnMessage] (node:internal/worker:337:37)
at MessagePort.<anonymous> (node:internal/worker:232:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:816:20)
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
I can console.log the content of the variable just before trying to return it with no problems, the output is as follows:
Returning any other value inside this object, or any other value whatsoever, outputs the returned value normally to the lambda invoke requester.
I thought maybe the output was too large but I tested returning the content of a file with millions of characters, much large then the opensearch search output and it worked perfectly. Maybe there is a nesting limit but I could not find it.
services:
opensearch-node1:
image: opensearchproject/opensearch:2container_name: opensearch-node1environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.type=single-node
- discovery.seed_hosts=opensearch-node1
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration, required for OpenSearch 2.12 and higherulimits:
memlock:
soft: -1hard: -1nofile:
soft: 65536# maximum number of open files for the OpenSearch user, set to at least 65536 on modern systemshard: 65536volumes:
- opensearch-data1:/usr/share/opensearch/dataports:
- 9200:9200
- 9600:9600# required for Performance Analyzernetworks:
- opensearch-netopensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2container_name: opensearch-dashboardsports:
- 5601:5601expose:
- '5601'environment:
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200"]'networks:
- opensearch-netvolumes:
opensearch-data1:
networks:
opensearch-net:
Expected behavior/code
To see on the invoker output the value that was printed to console.
Environment
serverless version: 3.39.0
serverless-offline version: 13.6.0
node.js version: 22.11.0
OS: windows 11 win32
The text was updated successfully, but these errors were encountered:
Bug Report
I am currently testing using serverless offline to emulate an aws lambda that i will be deploying. It uses the default opensearch client to call an empty opensearch instance (with no data yet) running locally on my computer. When trying to return the search result I get the following error
I can console.log the content of the variable just before trying to return it with no problems, the output is as follows:
Returning any other value inside this object, or any other value whatsoever, outputs the returned value normally to the lambda invoke requester.
I thought maybe the output was too large but I tested returning the content of a file with millions of characters, much large then the opensearch search output and it worked perfectly. Maybe there is a nesting limit but I could not find it.
Current Behavior
When trying to return the object I get an error.
Sample Code
Expected behavior/code
To see on the invoker output the value that was printed to console.
Environment
serverless
version: 3.39.0serverless-offline
version: 13.6.0node.js
version: 22.11.0OS
: windows 11 win32The text was updated successfully, but these errors were encountered: