google-auth-library-ruby icon indicating copy to clipboard operation
google-auth-library-ruby copied to clipboard

googleauth-1.11.0/lib/googleauth/service_account.rb:87:in `unescape': undefined method `gsub' for nil:NilClass

Open markhorrocks opened this issue 1 year ago • 1 comments

  • OS: ubuntu 20.04
  • Ruby version: 2.7.0
  • Gem name and version: googleauth 1.11.0

Steps to reproduce

  1. Attempt to use make_creds with json_key

#! /usr/bin/ruby

require 'googleauth'

SERVICE_ACCOUNT_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----MIIE1234ABCD-----END PRIVATE KEY-----"

begin credentials = Google::Auth::ServiceAccountCredentials.make_creds( scope: "https://analyticsreporting.googleapis.com/v4/reports:batchGet", json_key: SERVICE_ACCOUNT_PRIVATE_KEY ) rescue => error puts "Error: #{error.message}" end

markhorrocks avatar May 08 '24 13:05 markhorrocks

I got the same issue this morning.

palladius avatar May 09 '24 09:05 palladius