myConsciousness / aws-lambda-dart-runtime-ns

A powerful runtime to build Lambda functions in Dart with native AWS events. Sound null safety.
https://pub.dev/packages/aws_lambda_dart_runtime_ns
Apache License 2.0
1 stars 1 forks source link

"errorType": "InvocationError", "Null check operator used on a null value", #1

Open henryqum opened 3 weeks ago

henryqum commented 3 weeks ago

Hi,

i came across your package and i want to thank you for your work

i deployed a function and i got the following error


NewEve

Response
{
  "errorType": "InvocationError",
  "errorMessage": "Null check operator used on a null value",
  "stackTrace": "#0      new RuntimeContext.fromNextInvocation (package:aws_lambda_dart_runtime_ns/src/runtime/context.dart:56)\n#1      AwsLambdaRuntime.invoke (package:aws_lambda_dart_runtime_ns/src/runtime/runtime.dart:59)\n<asynchronous suspension>\n#2      invokeAwsLambdaRuntime (package:aws_lambda_dart_runtime_ns/src/runtime/runtime.dart:20)\n<asynchronous suspension>\n#3      main (file:///root/node-zfs-test/qcp_storage_qs_proc/bin/main.dart:3)\n<asynchronous suspension>\n"
}```

aws have a problem with this line `executionEnv: Platform.environment[_kAWSLambdaExecutionEnv]!` i guess this var not in the env for some reason maybe it's an optional var

thanks for you help
henryqum commented 1 week ago

update: the above error it's only happen when you deploy from a zip file when you use docker is not happening, but it still an error so i keep it open