Comments (21)
Hi @odemolliens 👋
Thank you for reporting the issue. Could you please post the entire log? Like this:
nakiostudio@MBP $ xcov -w LystSDK.xcworkspace -s LystSDK
[11:07:16]: xcrun xcodebuild -list -workspace 'LystSDK.xcworkspace'
+-----------------------------+---------------------+
| Summary for xCov 0.5 |
+-----------------------------+---------------------+
| workspace | LystSDK.xcworkspace |
| scheme | LystSDK |
| output_directory | ./xcov_report |
| minimum_coverage_percentage | 0.0 |
| include_test_targets | false |
| skip_slack | false |
+-----------------------------+---------------------+
[11:07:18]: $ /Users/nakiostudio/.rvm/gems/ruby-2.2.1/gems/xcov-0.5/lib/xcov-core/bin/xcov-core -s /Users/nakiostudio/Library/Developer/Xcode/DerivedData/LystSDK-eirtcvknlftjfiavurorndrssbgg/Logs/Test/7C6071CD-6B31-4FE8-B1B1-15A534492DCA.xccoverage -o /var/folders/m7/kzdcwc2559960r9g12hn7m8m0000gn/T/report.json20160315-5848-1q8tpj9
[11:07:18]: ▸ Loading...
[11:07:18]: ▸ ------ xCov-Core ------
[11:07:18]: ▸ Opening .xccoverage file at path: /Users/nakiostudio/Library/Developer/Xcode/DerivedData/LystSDK-eirtcvknlftjfiavurorndrssbgg/Logs/Test/7C6071CD-6B31-4FE8-B1B1-15A534492DCA.xccoverage
[11:07:18]: ▸ Parsing .xccoverage file...
[11:07:18]: ▸ File successfully parsed
[11:07:18]: ▸ Serializing coverage report...
[11:07:18]: ▸ Report successfully serialized
[11:07:18]: ▸ Writing report on disk...
[11:07:18]: ▸ Coverage report successfully created at path: /var/folders/m7/kzdcwc2559960r9g12hn7m8m0000gn/T/report.json20160315-5848-1q8tpj9
+-------------------+-----------+
| xCov Coverage Report |
+-------------------+-----------+
| LystSDK.framework | 91% |
+-------------------+-----------+
Thanks!
from xcov.
👍 it worked perfectly with escapable characters in the path. thanks for merging it.
from xcov.
X:dgtaxud-vies-mobile-ios X$ xcov -w MobVIES.xcworkspace -s MobVIES --verbose
INFO [2016-03-15 10:30:35.02]: xcrun xcodebuild -list -workspace 'MobVIES.xcworkspace+-----------------------------+------------------------+
| Summary for xCov 0.5 |
+-----------------------------+------------------------+
| workspace | MobVIES.xcworkspace |
| scheme | MobVIES |
| output_directory | ./fastlane/xcov_report |
| minimum_coverage_percentage | 0.0 |
| include_test_targets | false |
| skip_slack | false |
+-----------------------------+------------------------+ERROR [2016-03-15 10:30:36.44]: Unable to find any .xccoverage file.
ERROR [2016-03-15 10:30:36.44]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.ERROR [2016-03-15 10:30:36.44]: Alternatively you can provide the full path to your .xccoverage file.
😨 An error occured. Please enable crash reports using
fastlane enable_crash_reporting
.
👍 This makes resolving issues much easier and helps improve fastlane.
🔒 The reports will be stored securely on getsentry.com.🙊 More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3
/Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/error_handler.rb:35:in
'handle_error': [!] Error processing coverage file - see the log above (RuntimeError) from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/runner.rb:24:in
parse_xccoverage'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/runner.rb:13:inrun' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/manager.rb:9:in
work'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:41:inblock (2 levels) in run' from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in
call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:incall' from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in
run'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:inrun_active_command' from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.37.0/lib/fastlane_core/ui/fastlane_runner.rb:23:in
run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:inrun!' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:47:in
run'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:15:instart' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/bin/xcov:6:in
<top (required)>'
from /usr/local/bin/xcov:22:inload' from /usr/local/bin/xcov:22:in
I think it will not help you more... no debug way?
Problem come from: "Error processing coverage file"
from xcov.
This is pretty strange 🤔 Could you please also check that your scheme is marked as Shared. Also if you could try the following it would be great:
- Remove project's DerivedData folder
- Run tests
- Run xcov
Thank you for your patience!
from xcov.
My scheme is marked as Shared. Don't forget it was working on previous xcov version.
- Remove DerivedData folder - OK
- Run tests - OK
- Run xcov - NOK: Error processing coverage file - see the log above
from xcov.
Did it work with xcov 0.4 or previous versions? The changes between 0.4 and 0.5 are trivial therefore it should be okay... Could it be a permissions issue? have you tried running sudo xcov -w ...
?
Sorry for making you try so many things but I have no idea what's causing your problem 😁
from xcov.
All projects was running good with xcov 0.4
version
Doesn't work better with sudo
from xcov.
Do you have a debug version with logs?
from xcov.
I'm afraid logging is a pending task... for now I recommend you to rollback to 0.4. In the meantime I will dig a bit more into this and update you as soon as I know anything else.
Once again thank you for reporting!
from xcov.
Ok I found the bug:
test_logs_path contains a wrong path. The folder doesn't exist.
from xcov.
Do you manage this way ? How do you generate derived_data_path?
from xcov.
Hi @odemolliens, thank you for investigating further. That's the issue indeed. Right now I don't support relative DerivedData paths. However until I implement this you can use the derived_data_path
argument and provide the right path to your logs.
Example of use:
xcov -w LystSDK.xworkspace -s LystSDK -j /Users/nakiostudio/Library/Developer/Xcode/DerivedData/LystSDK-fdtwgbzpiwhsxtbyxrzdtlylrgkp
from xcov.
OK fixed with your work around
Keep me updated for next version.
Because now I need specify path for every project !
Thanks @nakiostudio
from xcov.
I will :) I'm going to keep the issue open to track the problem 👍
from xcov.
Has this issue been fixed in version 0.9? I still meet this issue
from xcov.
Hi @LeoGeng 👋
I'm afraid this is more a project configuration issue rather than a xcov specific problem. Unfortunately, I'm still trying to figure out how to get this sorted out...
from xcov.
I also get this error. However, when I use the absolute path I continue to get the error because my path needs to be shellescaped. That is something that other fastlane actions do for me. I am ok with doing it myself but it would be nice if it were documented as it differs from the rest of fastlane. Although if you were willing to shellescape the paths that are handed to you that would be even better.
from xcov.
jk, looks like it is a bit hit and miss about who shellescapes for you and who doesn't, which makes it a bit tricky on my end. If you did document it that would be great.
from xcov.
I am back to believing that escaping is an issue. I ran this test to see if I can get it to generate an html report with a path that has to be escaped. Here is the output:
[16:42:46]: Successfully generated report at '/Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios)/fastlane/output/unit_test_reports/report.html'
[16:42:49]: Successfully generated report at '/Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios)/fastlane/output/unit_test_reports/report.junit'
[16:42:49]: ------------------
[16:42:49]: --- Step: xcov ---
[16:42:49]: ------------------
[16:42:49]: xcrun xcodebuild -list -workspace JesusFilm.xcworkspace
2016-07-21 16:42:49.721 xcodebuild[43508:10791106] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-07-21 16:42:49.725 xcodebuild[43508:10791106] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OneSkyPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-07-21 16:42:49.725 xcodebuild[43508:10791106] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Lin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-07-21 16:42:49.726 xcodebuild[43508:10791106] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ExtractorLocalizableStrings.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-07-21 16:42:49.727 xcodebuild[43508:10791106] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUFullIssueNavigator.xcplugin' not present in DVTPlugInCompatibilityUUIDs
[16:42:51]: Skipping file blacklisting as no ignore file was found at path ./fastlane/.xcovignore
+-----------------------------+--------------------------------------------------------------------+
| Summary for xcov 0.10 |
+-----------------------------+--------------------------------------------------------------------+
| workspace | JesusFilm.xcworkspace |
| scheme | JesusFilmArclightTests |
| derived_data_path | /Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios... |
| output_directory | /Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios... |
| html_report | true |
| markdown_report | false |
| json_report | false |
| minimum_coverage_percentage | 0 |
| ignore_file_path | ./fastlane/.xcovignore |
| include_test_targets | false |
| skip_slack | false |
+-----------------------------+--------------------------------------------------------------------+
[16:42:51]: $ /Users/michaelharrison/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcov-0.10/lib/xcov-core/bin/xcov-core -s /Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios)/fastlane/output/derivedData/Logs/Test/7500D92E-FB95-4FEF-9473-8F568EB35FEA.xccoverage -o /var/folders/28/rh8b7hk16479rsnxwr2ylckc0000gn/T/report.json20160721-40213-1jwo7be
[16:42:51]: ▸ Loading...
[16:42:51]: ▸ sh: -c: line 0: syntax error near unexpected token `('
[16:42:51]: ▸ sh: -c: line 0: `/Users/michaelharrison/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcov-0.10/lib/xcov-core/bin/xcov-core -s /Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios)/fastlane/output/derivedData/Logs/Test/7500D92E-FB95-4FEF-9473-8F568EB35FEA.xccoverage -o /var/folders/28/rh8b7hk16479rsnxwr2ylckc0000gn/T/report.json20160721-40213-1jwo7be'
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `/Users/michaelharrison/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/xcov-0.10/lib/xcov-core/bin/xcov-core -s /Users/michaelharrison/Documents/apps/jesusfilm/jesus-film (ios)/fastlane/output/derivedData/Logs/Test/7500D92E-FB95-4FEF-9473-8F568EB35FEA.xccoverage -o /var/folders/28/rh8b7hk16479rsnxwr2ylckc0000gn/T/report.json20160721-40213-1jwo7be'
I believe it is the use of TempFile here https://github.com/nakiostudio/xcov/blob/master/lib/xcov-core.rb#L15 I think it is generating a file path that is unescaped and that path is the one being using in the bash command https://github.com/nakiostudio/xcov/blob/master/lib/xcov-core.rb#L16 which causes the crash I am seeing. I can create a situation for now that will use a path that doesn't need to be escaped but I don't know if that will always be true of our server. I do not maintain it.
from xcov.
I've just released 0.11
which includes @michaelharro's fix. It'd be great if any of you could double check that it solves the issue.
from xcov.
The problem persist here
But now the command: xcodebuild -list -w XXX.xcworkspace -s XXX works
Not working on fastlane (and Derived path option is defined)
No space in the path
from xcov.
Related Issues (20)
- Swift Package Manager Mandatory fields
- [!] Could not find option 'workspace' in the list of available options: HOT 2
- Reports 0% Code Coverage with Xcode 12.5
- Exclude subset of ignored files in .xcovignore HOT 1
- xccov_file_direct_path cannot treat with multiple files
- Missing `clean: true` to delete the existing code coverage data HOT 3
- Parsing Coverage Data for Swift Packages HOT 1
- Invalid coverage report for SPM with dependencies HOT 2
- Missing git information when uploading to coveralls
- Could not find option 'xccov_file_direct_path' in the list of available options HOT 1
- Modernize HTML templates
- Fix root directory when opening files
- How can we ignore `Swift Package Dependencies` HOT 4
- Bad CPU type in executable HOT 6
- .xcovignore file not working HOT 1
- Target with no valid files is considered as having 0% coverage
- Xcov 1.8.1 : Xcov not able to find ignore file path HOT 4
- Include files (opposite of ignore)
- `PBXProject` attempted to initialize an object with unknown ISA `XCLocalSwiftPackageReference`
- "Error occured while exporting xccovreport from xcresult" when "xcov_report" folder already exists HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcov.