danger / danger-mention

Danger plugin to automatically mention potential reviewers on pull requests
MIT License
30 stars 12 forks source link

Invalid `Dangerfile` file: 401 Unauthorized #14

Closed anthonymonori closed 3 years ago

anthonymonori commented 6 years ago

Got the following error when I tried running mention.run or even mention.run(2, [], []) as well.

My service account that is associated with the access token has Reporter rights (tried as Developer, but same results). I am also running on a private GitLab instance. Before adding mention, danger was working fine, but I am a bit left in the dark here.

Any tips on how to debug this further?

I could read the following on the Reference page:

Note: This plugin uses the web-scraping of GitHub.com and GitLab to detect the authors to find potential reviewers. This might cause the plugin to break if either of those pages introduce design changes.

Could that be it?

Here's the raw output:

/usr/local/lib/ruby/2.3.0/open-uri.rb:359:in `open_http':  (Danger::DSLError)
[!] Invalid `Dangerfile` file: 401 Unauthorized
 #  from Dangerfile:2
 #  -------------------------------------------
 #  # Find some reviewers for this MR
 >  mention.run
 #  
 #  -------------------------------------------
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:717:in `open'
    from /usr/local/lib/ruby/2.3.0/open-uri.rb:35:in `open'
    from /usr/local/bundle/gems/danger-mention-0.6.1/lib/danger_plugin.rb:101:in `parse_blame'
    from /usr/local/bundle/gems/danger-mention-0.6.1/lib/danger_plugin.rb:46:in `block in run'
    from /usr/local/bundle/gems/danger-mention-0.6.1/lib/danger_plugin.rb:45:in `each'
    from /usr/local/bundle/gems/danger-mention-0.6.1/lib/danger_plugin.rb:45:in `run'
    from Dangerfile:2:in `block in parse'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/dangerfile.rb:200:in `eval'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/dangerfile.rb:200:in `block in parse'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/dangerfile.rb:196:in `instance_eval'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/dangerfile.rb:196:in `parse'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/dangerfile.rb:273:in `run'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/danger_core/executor.rb:27:in `run'
    from /usr/local/bundle/gems/danger-5.5.5/lib/danger/commands/runner.rb:66:in `run'
    from /usr/local/bundle/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    from /usr/local/bundle/gems/danger-5.5.5/bin/danger:5:in `<top (required)>'
    from /usr/local/bundle/bin/danger:22:in `load'
    from /usr/local/bundle/bin/danger:22:in `<main>'
[!] The exception involves the following plugins:
 -  danger-mention
orta commented 6 years ago

Looks more like it can't access the web page InvalidDangerfilefile: 401 Unauthorized you might have to figure out how this plugin can authenticate

anthonymonori commented 6 years ago

So maybe #12 would solve my issues here, as I am running into the issue that my repo is privately hosted. If you agree, let's close this!