Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading aws-xray-sdk/lambda fails with json 2.8.2 #101

Open
ed-berry opened this issue Dec 4, 2024 · 0 comments
Open

Loading aws-xray-sdk/lambda fails with json 2.8.2 #101

ed-berry opened this issue Dec 4, 2024 · 0 comments

Comments

@ed-berry
Copy link

ed-berry commented Dec 4, 2024

We had a Lambda using aws-sdk-xray 1.4.0 where json was updated to 2.8.2. This led to require "aws-xray-sdk/lambda" failing with the following error. Reverting json back to 2.7.5 fixed this.

{
    "errorMessage": "undefined method `parse' for JSON::Ext::Parser:Class",
    "errorType": "Init<NoMethodError>",
    "stackTrace": [
        "/var/task/vendor/bundle/ruby/3.2.0/gems/json-2.8.2/lib/json/common.rb:205:in `parse'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath/lexer.rb:323:in `requires_wrapping?'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath/lexer.rb:328:in `<class:Lexer>'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath/lexer.rb:7:in `<module:JMESPath>'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath/lexer.rb:5:in `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath.rb:9:in `<module:JMESPath>'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/jmespath-1.6.2/lib/jmespath.rb:6:in `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-sdk-core-3.213.0/lib/aws-sdk-core.rb:5:in `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-sdk-xray-1.4.0/lib/aws-sdk-xray.rb:8:in `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/connector.rb:35:in `update_xray_client'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/connector.rb:14:in `initialize'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/lead_poller.rb:18:in `new'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/lead_poller.rb:18:in `initialize'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/default_sampler.rb:22:in `new'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/sampling/default_sampler.rb:22:in `initialize'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/configuration.rb:30:in `new'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/configuration.rb:30:in `initialize'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/recorder.rb:18:in `new'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/recorder.rb:18:in `initialize'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/lambda.rb:10:in `new'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/lambda.rb:10:in `<module:XRay>'",
        "/var/task/vendor/bundle/ruby/3.2.0/gems/aws-xray-sdk-0.16.0/lib/aws-xray-sdk/lambda.rb:9:in `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:141:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:141:in `rescue in require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:135:in `require'",
        "/var/task/functions/<my-function> `<top (required)>'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'",
        "<internal:/var/lang/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:136:in `require'"
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant