Giter VIP home page Giter VIP logo

Comments (21)

nakiostudio avatar nakiostudio commented on May 17, 2024 1

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.

michaelharro avatar michaelharro commented on May 17, 2024 1

👍 it worked perfectly with escapable characters in the path. thanks for merging it.

from xcov.

odemolliens avatar odemolliens commented on May 17, 2024

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:inparse_xccoverage'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/runner.rb:13:in run' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/manager.rb:9:inwork'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:41:in block (2 levels) in run' 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:178:in call' from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:inrun'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in run_active_command' from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.37.0/lib/fastlane_core/ui/fastlane_runner.rb:23:inrun!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in run!' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:47:inrun'
from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/lib/xcov/commands_generator.rb:15:in start' from /Library/Ruby/Gems/2.0.0/gems/xcov-0.5/bin/xcov:6:in<top (required)>'
from /usr/local/bin/xcov:22:in load' 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.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

odemolliens avatar odemolliens commented on May 17, 2024

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.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

odemolliens avatar odemolliens commented on May 17, 2024

All projects was running good with xcov 0.4 version
Doesn't work better with sudo

from xcov.

odemolliens avatar odemolliens commented on May 17, 2024

Do you have a debug version with logs?

from xcov.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

odemolliens avatar odemolliens commented on May 17, 2024

Ok I found the bug:
test_logs_path contains a wrong path. The folder doesn't exist.

from xcov.

odemolliens avatar odemolliens commented on May 17, 2024

screenshot 2016-03-15 13 39 03
Do you manage this way ? How do you generate derived_data_path?

from xcov.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

odemolliens avatar odemolliens commented on May 17, 2024

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.

nakiostudio avatar nakiostudio commented on May 17, 2024

I will :) I'm going to keep the issue open to track the problem 👍

from xcov.

genglei01 avatar genglei01 commented on May 17, 2024

Has this issue been fixed in version 0.9? I still meet this issue

from xcov.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

michaelharro avatar michaelharro commented on May 17, 2024

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.

michaelharro avatar michaelharro commented on May 17, 2024

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.

michaelharro avatar michaelharro commented on May 17, 2024

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.

nakiostudio avatar nakiostudio commented on May 17, 2024

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.

odemolliens avatar odemolliens commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.