Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Ahmed Bayoumy
    Hello, I have been running into this weird error on the second request after running sls offline start
    node[91757]: ../src/env-inl.h:1036:void node::Environment::AddCleanupHook(void (*)(void *), void *): Assertion `(insertion_info.second) == (true)' failed.
     1: 0x10009ce91 node::Abort() [/usr/local/bin/node]
     2: 0x10009cd1a node::AppendExceptionLine(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Message>, node::ErrorHandlingMode) [/usr/local/bin/node]
     3: 0x10001f6be node::Environment::AddCleanupHook(void (*)(void*), void*) [/usr/local/bin/node]
     4: 0x100008b00 node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [/usr/local/bin/node]
     5: 0x107903206 WrappedRE2::Init() [/Users/Test/Documents/instagram-bot/serverless/node_modules/re2/build/Release/re2.node]
     6: 0x107903f23 node_register_module_v88 [/Users/Test/Documents/instagram-bot/serverless/node_modules/re2/build/Release/re2.node]
     7: 0x10007bf86 std::__1::__function::__func<node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)::$_0, std::__1::allocator<node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)::$_0>, bool (node::binding::DLib*)>::operator()(node::binding::DLib*&&) [/usr/local/bin/node]
     8: 0x10007ada9 node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
     9: 0x10021da46 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
    10: 0x10021d0c9 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
    11: 0x10021c8b0 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
    12: 0x1007fd979 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]
    Abort trap: 6
    that only occurs on the second request, the first request goes through just fine
    anyone got serverless offline working with rollup?
    Zhani Baramidze
    I've installed serverless offline plugin, all works good, port 3000 got exposed and handles fine, but for some reason it does not seem to expose 3002 to do Lambda invocations by hand. shouldn't it start working automatically?
    Andy Swanson

    Hello, I have been running into this weird error on the second request after running sls offline start

    @bayoumymac Were you able to resolve this issue? The exact same thing is happening to me.

    Jack Howard
    is there a good way of mocking alb? I'm seeing urls that aren't matching what I would expect running serverless-offline?
    [offline] Lambda Invocation Routes (for AWS SDK or AWS CLI):
               * POST http://localhost:3002/2015-03-31/functions/x-api-sandbox-getBundles/invocations
    Jack Howard
    ^ this is related to issue dherault/serverless-offline#598 if any one is working on this. I saw someone try to bounty it I think
    Jack Howard
    also is there a way to specify a different serverless.yml file to run? I haven't been able to find the equivalent of --config equivalent to serverless. thanks for your help!
    looks like it's being tracked here by dherault/serverless-offline#1146
    Rafael Franco
    How about releasing the support for nodejs14.x?
    Zac Tolley
    Another Vote here for 14. Is there ANY traction on this?
    Is there a way to just run one function with serverless offline when I have many functions defined in my serverless.yml file?
    e.g. given my serverless.yml file looks like this, how do I just run functionB. I tried sls offline --functionB but that builds and starts all the functions, and function A takes a very long time to build. Also, I intend to build many more functions in the future, but I want to be able to run a single functional locally while working on it without having to worry about the rest.
      name: backend
      - serverless-webpack
      - serverless-offline
      name: aws
      region: us-west-1
      runtime: nodejs12.x
        handler: handler.functionAHandler
          - http:
              path: functionA
              method: post
          - http:
              path: functionA
              method: get
        handler: handler.functionBHandler
          - http:
              path: functionB
              method: post
          - http:
              path: functionB
              method: get
    Jake Wood
    +1 for Node v14, as well as a +1 for dherault/serverless-offline#1175. I'm happy to help with either of these initiatives.
    Zac Tolley
    At what point do we have to resort to created an official fork?
    Does anyone know if this repo is still being supported? It seems as if @dherault has not responded since October. I'm just concerned as this is a pretty big part of a lot of peoples development and the repo now hasn't seen a new release for almost 6 months, was monthly prior to 6.8.0. I've created this question, dherault/serverless-offline#1193, on the github repo. First and foremost I hope that @dherault is ok, but would like to know if the community needs to have a discussion as to where this project is going.
    Mirko Buholzer

    I have an issue when running serverless-offline with the JWT Authorization function. serverless-offline tries to compare my jwt token with jwtOptions.issuerUrl that points to a cloudformation function.
    My jwtOptions from createJWTAuthScheme.js look like this:

      authorizerName: 'cognitoAuthorizer',
      name: 'cognitoAuthorizer',
      identitySource: '$request.header.Authorization',
      issuerUrl: { 'Fn::Join': [ '', [Array] ] },
      audience: [ { 'Fn::ImportValue': 'authUserPoolClientId' } ]

    Any way I can ignore issuerUrl and audience?

    Arslan Ali
    Hi Guys,

    I am facing this below error while I am trying to run the serverless offline.
    Error ---------------------------------------------------

    Error: Cannot find module 'please-upgrade-node'
    Require stack:

    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\checkEngine.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\index.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\main.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\scripts\serverless.js
    C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\checkEngine.js:3:49)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\index.js:13:1)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless-offline\dist\main.js:11:18)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at requireServicePlugin (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:28:12)
    at C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:164:20
    at Array.map ()
    at PluginManager.resolveServicePlugins (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:161:8)
    at PluginManager.loadAllPlugins (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:147:10)
    at Serverless.init (C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:171:30)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async C:\Users\Arslan Titan\AppData\Roaming\npm\node_modules\serverless\scripts\serverless.js:235:7

    Tim Stackhouse
    How does one run the integration tests properly in order to contribute to the project?
    I keep getting timeouts because it doesn't look like it's spinning up a local server
    Dmitry Kireev
    Something common, prob ably, but Serverless command "offline start" not found. even after installing from "serverless-offline": "github:dherault/serverless-offline#master",
    1 reply
    any word where to look? thanks!
    Neeraj Mittal
    invoking lambda without event mapping, doesn't seems to work in offline mode
    Screen Shot 2021-05-20 at 11.29.17.png
    Good morning, Layer dont download when adding to provider
    when i added the layer in the provider section, the layer is not downloaded
    Screen Shot 2021-05-20 at 11.32.19.png
    but if i added it to function, the layer download perfectly
    Hello, anyone knows what is the max size a request header can take (i keep having 431 errors :c )