Unexpected token at ''
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 36/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- objective-c, ruby, swift
- Domain
- testing-qa
Research direction
Start with Slather::Project#pathnames_per_binary in lib/slather/project.rb:135, where the stack trace shows JSON parsing fails after coverage loading reports no data for the binary. Check how the coverage command handles that failed load and identify why the JSON input is empty. Done means the failure is reported or handled clearly for this Xcode coverage case; the issue gives no reproduction project or test to run.
Written by the indexing model from the issue text.
Description
Hi,
I'm trying to use slather to convert Xcode coverage output to Cobertura XML format.
The project contains both objective-c and swift files.
The output from Xcode seems OK, there is the profdata file which is not empty, also the .gcdo, .dia etc files...
But slather ends up with the below error:
Slathering...
Processing coverage file: /Users/marcbiosca/Library/Developer/Xcode/DerivedData/MobileSDK-cdwqzqnpwqkarzdkewkdznfastpf/Build/ProfileData/21968B43-AFA4-4330-B505-45D1D0DB1F57/Coverage.profdata
Against binary files:
/Users/marcbiosca/Library/Developer/Xcode/DerivedData/MobileSDK-cdwqzqnpwqkarzdkewkdznfastpf/Build/Products/PlotDebug-iphonesimulator/libSelligentMobile.a
error: /Users/marcbiosca/Library/Developer/Xcode/DerivedData/MobileSDK-cdwqzqnpwqkarzdkewkdznfastpf/Build/Products/PlotDebug-iphonesimulator/libSelligentMobile.a: Failed to load coverage: No coverage data found
error: Could not load coverage information
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in 'parse': 767: unexpected token at '' (JSON::ParserError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in 'parse'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/project.rb:135:in 'pathnames_per_binary'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/project.rb:124:in 'block in profdata_coverage_files'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/project.rb:123:in 'each'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/project.rb:123:in 'profdata_coverage_files'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/project.rb:98:in 'coverage_files'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/coverage_service/simple_output.rb:17:in 'post'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/command/coverage_command.rb:101:in 'post'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/lib/slather/command/coverage_command.rb:61:in 'execute'
from /Library/Ruby/Gems/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in 'run'
from /Library/Ruby/Gems/2.6.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in 'execute'
from /Library/Ruby/Gems/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in 'run'
from /Library/Ruby/Gems/2.6.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in 'run'
from /Library/Ruby/Gems/2.6.0/gems/slather-2.7.2/bin/slather:17:in '<top (required)>'
from /usr/local/bin/slather:23:in 'load'
from /usr/local/bin/slather:23:in '<main>'
Any idea what could go wrong here?
- Dominant language
- Ruby
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SlatherOrg/slather
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
SlatherOrg/slather#582 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
SlatherOrg/slather#580 · 9 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 56/100
SlatherOrg/slather#578 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
SlatherOrg/slather#577 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
SlatherOrg/slather#576 · 2 comments ·
All issues in SlatherOrg/slather
Similar issues
-
message-patterns
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
sisimai/rb-sisimai#468 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 7 days
-
bugsnag
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
JoeMcB/improvcoaches#827 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
TheOdinProject/curriculum#31465 ·
Maintainers usually reply within 1 day