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

undefined method `match' for nil:NilClass (NoMethodError) when opening encryptionClient #1240

Closed
blondowski opened this Issue Jul 11, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@blondowski
  1. Install

gem install aws-sdk
Successfully installed aws-sdk-2.3.21
Parsing documentation for aws-sdk-2.3.21
Done installing documentation for aws-sdk after 0 seconds
1 gem installed

  1. code
    more DS3.rb
    require 'aws-sdk'
    require 'openssl'

key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key)

  1. execute
    ruby DS3.rb
    /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:67:in block in partition_matching_region': undefined methodmatch' for nil:NilClass (NoMethodError)
    Did you mean? catch
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:66:in each' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:66:infind'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:66:in partition_matching_region' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:55:inget_partition'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:26:in endpoint_for' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:10:inresolve'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/endpoint_provider.rb:80:in resolve' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/aws-sdk-core/plugins/regional_endpoint.rb:24:inblock in class:RegionalEndpoint'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:70:in call' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:205:inblock in resolve_defaults'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:57:in each' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:57:ineach'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:204:in resolve_defaults' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:200:invalue_at'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:189:in block in resolve' from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/set.rb:306:ineach_key'
    from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/set.rb:306:in each' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:189:inresolve'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:177:in apply_defaults' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/configuration.rb:150:inbuild!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/base.rb:68:in build_config' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/base.rb:19:ininitialize'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-core-2.3.21/lib/seahorse/client/base.rb:105:in new' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-resources-2.3.21/lib/aws-sdk-resources/services/s3/encryption/client.rb:298:inextract_client'
    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-resources-2.3.21/lib/aws-sdk-resources/services/s3/encryption/client.rb:221:in initialize' from DS3.rb:5:innew'
    from DS3.rb:5:in `'
@awood45

This comment has been minimized.

Show comment
Hide comment
@awood45

awood45 Jul 11, 2016

Member

Related to #1237

This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:

key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using
Member

awood45 commented Jul 11, 2016

Related to #1237

This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:

key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using

@awood45 awood45 closed this Jul 11, 2016

@awood45 awood45 added the Version 2 label Jul 11, 2016

@blondowski

This comment has been minimized.

Show comment
Hide comment
@blondowski

blondowski Jul 11, 2016

From: Alex Wood <notifications@github.commailto:notifications@github.com>
Reply-To: aws/aws-sdk-ruby <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, July 11, 2016 at 4:10 PM
To: aws/aws-sdk-ruby <aws-sdk-ruby@noreply.github.commailto:aws-sdk-ruby@noreply.github.com>
Cc: Dan Blondowski <dan.blondowski@dhigroupinc.commailto:dan.blondowski@dhigroupinc.com>, Author <author@noreply.github.commailto:author@noreply.github.com>
Subject: Re: [aws/aws-sdk-ruby] undefined method `match' for nil:NilClass (NoMethodError) when opening encryptionClient (#1240)

Related to #1237#1237

This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:

key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using

You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHubhttps://github.com/aws/aws-sdk-ruby/issues/1240#issuecomment-231866239, or mute the threadhttps://github.com/notifications/unsubscribe/AGsPJTfOr2XXmtRVqfx5Iq7PYvau7tTlks5qUrFYgaJpZM4JJxUl.

This email has been scanned for email related threats and delivered safely by Mimecast.

For more information please visit http://www.mimecast.com

blondowski commented Jul 11, 2016

From: Alex Wood <notifications@github.commailto:notifications@github.com>
Reply-To: aws/aws-sdk-ruby <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, July 11, 2016 at 4:10 PM
To: aws/aws-sdk-ruby <aws-sdk-ruby@noreply.github.commailto:aws-sdk-ruby@noreply.github.com>
Cc: Dan Blondowski <dan.blondowski@dhigroupinc.commailto:dan.blondowski@dhigroupinc.com>, Author <author@noreply.github.commailto:author@noreply.github.com>
Subject: Re: [aws/aws-sdk-ruby] undefined method `match' for nil:NilClass (NoMethodError) when opening encryptionClient (#1240)

Related to #1237#1237

This means you haven't configured a region. To configure a region, set the AWS_REGION environment variable, or pass it in as a parameter. For example:

key = OpenSSL::PKey::RSA.new(1024)
s3 = Aws::S3::Encryption::Client.new(encryption_key: key, region: "us-east-1") # or the region you are using

You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHubhttps://github.com/aws/aws-sdk-ruby/issues/1240#issuecomment-231866239, or mute the threadhttps://github.com/notifications/unsubscribe/AGsPJTfOr2XXmtRVqfx5Iq7PYvau7tTlks5qUrFYgaJpZM4JJxUl.

This email has been scanned for email related threats and delivered safely by Mimecast.

For more information please visit http://www.mimecast.com

@awood45

This comment has been minimized.

Show comment
Hide comment
@awood45

awood45 Jul 11, 2016

Member

It's an unhelpful error that I'm aiming to fix, though it's something I can't consistently reproduce either so it's been slightly elusive. Sorry about the unhelpful error message.

Member

awood45 commented Jul 11, 2016

It's an unhelpful error that I'm aiming to fix, though it's something I can't consistently reproduce either so it's been slightly elusive. Sorry about the unhelpful error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment