Skip to content

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

@markhorrocks

Description

@markhorrocks
  • 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

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