Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

URI::InvalidURIError After Updating codecov Gem to 0.2.6 #92

Closed
EmmaPrescott opened this issue Aug 20, 2020 · 4 comments · Fixed by #93
Closed

URI::InvalidURIError After Updating codecov Gem to 0.2.6 #92

EmmaPrescott opened this issue Aug 20, 2020 · 4 comments · Fixed by #93

Comments

@EmmaPrescott
Copy link

EmmaPrescott commented Aug 20, 2020

Hello! We recently upgraded the codecov ruby gem to 0.2.6 and we are getting the following error: split': bad URI(is not URI?): "Use v2 endpoint\n" (URI::InvalidURIError.

In our case, the gem issues a request to .../upload/v4?token=se ....... and then we get the following error: /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in split': bad URI(is not URI?): "Use v2 endpoint\n" (URI::InvalidURIError). The exception appears to be happening at uri = URI.parse(url.chomp('/') + '/upload/v4').

Any ideas as to what may causing the issue?

@thomasrockhu
Copy link
Contributor

Hi @EmmaPrescott, would you be able to post the Codecov output here?

@EmmaPrescott
Copy link
Author

EmmaPrescott commented Aug 20, 2020

Here's a snippet:

==> Jenkins CI detected
�[0;32;49m==>�[0m Appending file network
�[0;32;49m==>�[0m Gzipping contents
�[0;32;49m==>�[0m Uploading reports
    url:  http://[redacted]
    query: token=secret&flags&package=ruby-0.2.6&service=jenkins&branch=6412-pcp_slide_up&commit=6e028254872226e704512729b2f914ac91ab660b&pr=6422&build=9142&root=%2Fhome%2Fubuntu%2Fworkspace%2FPull-Request-Pipeline&build_url=[redacted]
�[0;32;49m-> �[0m Pinging Codecov
[redacted]/upload/v4?token=secret&flags&package=ruby-0.2.6&service=jenkins&branch=6412-pcp_slide_up&commit=6e028254872226e704512729b2f914ac91ab660b&pr=6422&build=9142&root=%2Fhome%2Fubuntu%2Fworkspace%2FPull-Request-Pipeline&build_url=[redacted]
�[0;32;49m-> �[0m Uploading to
Use v2 endpoint
/usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "Use v2 endpoint\n" (URI::InvalidURIError)
	from /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/rfc3986_parser.rb:73:in `parse'
	from /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/common.rb:234:in `parse'
	from /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/common.rb:737:in `URI'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/codecov-0.2.6/lib/codecov.rb:390:in `upload_to_v4'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/codecov-0.2.6/lib/codecov.rb:357:in `upload_to_codecov'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/codecov-0.2.6/lib/codecov.rb:453:in `format'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/simplecov-0.19.0/lib/simplecov/result.rb:51:in `format!'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/simplecov-0.19.0/lib/simplecov/configuration.rb:196:in `block in at_exit'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/simplecov-0.19.0/lib/simplecov.rb:189:in `run_exit_tasks!'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/simplecov-0.19.0/lib/simplecov.rb:179:in `at_exit_behavior'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/simplecov-0.19.0/lib/minitest/simplecov_plugin.rb:11:in `block in plugin_simplecov_init'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/minitest-5.14.0/lib/minitest.rb:64:in `reverse_each'
	from /usr/local/rvm/gems/ruby-2.6.5/gems/minitest-5.14.0/lib/minitest.rb:64:in `block (2 levels) in autorun'

@thomasrockhu
Copy link
Contributor

@EmmaPrescott is this an enterprise build?

@EmmaPrescott
Copy link
Author

I'm pretty sure it is but we get it through our parent company so I'm totally sure. Is there an easy way to tell?

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

Successfully merging a pull request may close this issue.

2 participants