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

ArgumentError: invalid base64 while calling JWT::JWK.import(hash) #361

Closed
AbhishekJadav2 opened this issue Jul 11, 2020 · 2 comments
Closed

Comments

@AbhishekJadav2
Copy link

My current ruby version is 2.2.2 which is greater than minimal ruby version requirement (>=2.1) as per .gemspec file *spec.required_ruby_version = '>= 2.1'

Here's the full Stack Trace.

ArgumentError: invalid base64
	from /home/viraj/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/base64.rb:77:in `unpack'
	from /home/viraj/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/base64.rb:77:in `strict_decode64'
	from /home/viraj/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/base64.rb:95:in `urlsafe_decode64'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/jwt-2.2.1/lib/jwt/jwk/rsa.rb:40:in `import'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/jwt-2.2.1/lib/jwt/jwk.rb:19:in `import'
	from (irb):21
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/railties-4.2.3/lib/rails/commands/console.rb:110:in `start'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/railties-4.2.3/lib/rails/commands/console.rb:9:in `start'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:68:in `console'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
	from /home/viraj/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'

Tested same with ruby 2.5.7 and 2.6.3 and works perfectly.
Please help

Thanks in advance.

@excpt excpt added this to the Version 2.3.0 milestone Jul 21, 2020
@iiewad
Copy link

iiewad commented Sep 1, 2020

+1

@anakinj
Copy link
Member

anakinj commented Oct 8, 2021

Fixed in #382

@anakinj anakinj closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants