jirametrics icon indicating copy to clipboard operation
jirametrics copied to clipboard

Atlassian Proxy Issue

Open danagerous opened this issue 1 year ago • 4 comments

Unfortunately our Atlassian product URLs are behind a proxy and I am redirected for authentication causing the connection to fail and throw an error.

I tried encoding my login credentials instead of the token with no luck.

Error message included below. I get the same error with token and with encoded credentials.

I'm curious if there is a way to have these metrics work with a proxy?

Sample
  Downloading all statuses
Error #<JSON::ParserError:"unexpected token at '<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>302 Found</title>\n</head><body>\n<h1>Found</h1>\n<p>The document has moved <a href=\"<URL>">here</a>.</p>\n</body></html>\n'"> when parsing result: "
<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>302 Found</title>\n</head><body>\n<h1>Found</h1>\n<p>The document has moved <a href=\"<URL>">here</a>.</p>\n</body></html>\n"
  Downloading board configuration for board 12345
Error #<JSON::ParserError:"unexpected token at '
<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>302 Found</title>\n</head><body>\n<h1>Found</h1>\n<p>The document has moved <a href=\"<URL>"> when parsing result: "
<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>302 Found</title>\n</head><body>\n<h1>Found</h1>\n<p>The document has moved <a href=\"<URL>">here</a>.</p>\n</body></html>\n"
C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/downloader.rb:151:in `exit_if_call_failed': undefined method `[]' for nil (NoMethodError)
 
    return unless json['error'] || json['errorMessages'] || json['errorMessage']
                      ^^^^^^^^^
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/downloader.rb:172:in `download_board_configuration'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/downloader.rb:44:in `block in run'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/downloader.rb:43:in `each'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/downloader.rb:43:in `run'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/exporter.rb:67:in `block in download'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/exporter.rb:74:in `block in each_project_config'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/exporter.rb:73:in `each'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/exporter.rb:73:in `each_project_config'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics/exporter.rb:52:in `download'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/lib/jirametrics.rb:27:in `go'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
        from C:/Users/<USER>/.local/share/gem/ruby/3.3.0/gems/jirametrics-2.3/bin/jirametrics:5:in `<top (required)>'
        from C:/Users/<USER>/AppData/Local/Microsoft/WindowsApps/jirametrics:32:in `load'
        from C:/Users/<USER>/AppData/Local/Microsoft/WindowsApps/jirametrics:32:in `<main>'

danagerous avatar Aug 14 '24 18:08 danagerous