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

Invalid Dangerfile file: 401 Unauthorized #14

Closed
anthonymonori opened this issue Dec 21, 2017 · 2 comments
Closed

Invalid Dangerfile file: 401 Unauthorized #14

anthonymonori opened this issue Dec 21, 2017 · 2 comments

Comments

@anthonymonori
Copy link

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
Copy link
Member

orta commented Dec 21, 2017

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

@anthonymonori
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants