Skip to content

Launchdarkly errors in Rails console: "#<NoMethodError: undefined method `keys' for nil:NilClass>"Β #147

@AndrewRayCode

Description

@AndrewRayCode

Describe the bug
Starting a Rails console on a server with Launchdarkly logs an error.

To reproduce
Start a Rails console on a server with the ldclient-rb gem installed

Expected behavior
No errors

Logs
#<NoMethodError: undefined method `keys' for nil:NilClass>

/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/user_filter.rb:37:in `filter_values'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/user_filter.rb:18:in `transform_user_props'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:392:in `make_output_event'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:338:in `block in make_output_events'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:338:in `map'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:338:in `make_output_events'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:295:in `run'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/events.rb:226:in `block in trigger_flush'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/ldclient-rb-5.4.1/lib/ldclient-rb/non_blocking_thread_pool.rb:25:in `block in post'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
/usr/local/rvm/gems/ruby-2.5.1@project/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

SDK version
ldclient-rb (5.4.3)

Language version, developer tools
Ruby, Rails 5.2

OS/platform
Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions