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

Upload fails with error "flags": "This field may not be blank." #246

Closed
IanHoar opened this issue Jan 25, 2024 · 4 comments · Fixed by codecov/codecov-circleci-orb#182
Closed
Assignees

Comments

@IanHoar
Copy link

IanHoar commented Jan 25, 2024

Describe the bug
Trying to setup codecov for the first time and have run into an inscrutable error. On the last step of the uploader I get this error:

Upload failed: {"flags":{"0":["This field may not be blank."]}}

Environment (please complete the following information):
uploading .xcresult from 4.0.0 orb on CircleCI

To Reproduce
Steps to reproduce the behavior:

  1. Run codecov uploader to upload an .xcresult on circleci
  2. wait for upload step to complete
  3. see error

Expected behavior
Upload succeeds

Screenshots

Additional context

info - 2024-01-25 19:36:56,703 -- ci service found: circleci
info - 2024-01-25 19:36:56,889 -- Process Commit creating complete
info - 2024-01-25 19:36:57,273 -- ci service found: circleci
info - 2024-01-25 19:36:57,515 -- Process Report creating complete
info - 2024-01-25 19:36:57,516 -- Finished creating report successfully --- {"response": "{\"external_id\":\"2ff75aff-1a01-4115-ad94-aadd78c5b986\",\"created_at\":\"2024-01-25T19:36:57.431975Z\",\"commit_sha\":\"7f01b30e3b8f98a3b907e066a5fc62e401fb49af\",\"code\":null}"}
info - 2024-01-25 19:36:57,926 -- ci service found: circleci
info - 2024-01-25 19:36:58,123 -- Running swift coverage on the following list of files: --- {"matched_paths": ["/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/ProfileData/9F96316F-CBCA-4691-9155-715A0CF8045B/Coverage.profdata"]}
info - 2024-01-25 19:36:58,155 -- + Building reports for ****** app
info - 2024-01-25 19:36:59,413 -- Generated ******.app.coverage.txt file successfully
info - 2024-01-25 19:36:59,449 -- + Building reports for GoogleAppMeasurement framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/GoogleAppMeasurement.framework/GoogleAppMeasurement': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,461 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/GoogleAppMeasurement.framework/GoogleAppMeasurement
info - 2024-01-25 19:36:59,461 -- + Building reports for FirebaseAnalytics framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/FirebaseAnalytics.framework/FirebaseAnalytics': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,470 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/FirebaseAnalytics.framework/FirebaseAnalytics
info - 2024-01-25 19:36:59,471 -- + Building reports for GoogleAppMeasurementIdentitySupport framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/GoogleAppMeasurementIdentitySupport.framework/GoogleAppMeasurementIdentitySupport': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,480 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/GoogleAppMeasurementIdentitySupport.framework/GoogleAppMeasurementIdentitySupport
info - 2024-01-25 19:36:59,480 -- + Building reports for Lottie framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/Lottie.framework/Lottie': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,488 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/Lottie.framework/Lottie
info - 2024-01-25 19:36:59,488 -- + Building reports for XCUnit framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCUnit.framework/XCUnit': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,497 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCUnit.framework/XCUnit
info - 2024-01-25 19:36:59,498 -- + Building reports for XCTAutomationSupport framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,506 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport
info - 2024-01-25 19:36:59,507 -- + Building reports for XCUIAutomation framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCUIAutomation.framework/XCUIAutomation': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,544 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCUIAutomation.framework/XCUIAutomation
info - 2024-01-25 19:36:59,544 -- + Building reports for XCTestSupport framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTestSupport.framework/XCTestSupport': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,554 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTestSupport.framework/XCTestSupport
info - 2024-01-25 19:36:59,554 -- + Building reports for XCTest framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTest.framework/XCTest': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,563 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTest.framework/XCTest
info - 2024-01-25 19:36:59,563 -- + Building reports for XCTestCore framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTestCore.framework/XCTestCore': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,572 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/XCTestCore.framework/XCTestCore
info - 2024-01-25 19:36:59,572 -- + Building reports for Lottie framework
error: Failed to load coverage: '/Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/Lottie.framework/Lottie': `-arch` specifier is invalid or missing for universal binary
warning - 2024-01-25 19:36:59,581 -- llvm-cov failed to produce results for /Users/distiller/Library/Developer/Xcode/DerivedData/******-cacdflbojhwrfbcektungztjnqmb/Build/Products/Debug-Production-iphonesimulator/******.app/Frameworks/Lottie.framework/Lottie
info - 2024-01-25 19:36:59,614 -- + Building reports for HomeTests xctest
info - 2024-01-25 19:37:00,095 -- Generated HomeTests.xctest.coverage.txt file successfully
info - 2024-01-25 19:37:00,096 -- + Building reports for CheckInTests xctest
info - 2024-01-25 19:37:00,547 -- Generated CheckInTests.xctest.coverage.txt file successfully
info - 2024-01-25 19:37:00,548 -- + Building reports for ModelTests xctest
info - 2024-01-25 19:37:00,614 -- Generated ModelTests.xctest.coverage.txt file successfully
info - 2024-01-25 19:37:00,615 -- + Building reports for RootTests xctest
info - 2024-01-25 19:37:01,124 -- Generated RootTests.xctest.coverage.txt file successfully
info - 2024-01-25 19:37:01,125 -- + Building reports for ComponentLibraryTests xctest
info - 2024-01-25 19:37:01,319 -- Generated ComponentLibraryTests.xctest.coverage.txt file successfully
info - 2024-01-25 19:37:01,319 -- + Building reports for ******Tests xctest
info - 2024-01-25 19:37:01,332 -- Generated ******Tests.xctest.coverage.txt file successfully
warning - 2024-01-25 19:37:01,786 -- No gcov data found.
warning - 2024-01-25 19:37:01,787 -- coverage.py is not installed or can't be found.
warning - 2024-01-25 19:37:02,123 -- Some files were not found --- {"not_found_files": ["fastlane/test_output/******-production.xcresult"]}
info - 2024-01-25 19:37:02,459 -- Found 20 coverage files to upload
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/HomeTests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/SourcePackages/checkouts/GoogleDataTransport/.github/workflows/test_coverage.yml
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCUnit.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/Lottie.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/ComponentLibraryTests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/******Tests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/SourcePackages/checkouts/GoogleUtilities/.github/workflows/test_coverage.yml
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCTestSupport.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCTestCore.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/FirebaseAnalytics.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/ModelTests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCTAutomationSupport.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/CheckInTests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/RootTests.xctest.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/fastlane/report.xml
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/******.app.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCTest.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/GoogleAppMeasurementIdentitySupport.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/XCUIAutomation.framework.coverage.txt
info - 2024-01-25 19:37:02,459 -- > /Users/distiller/project/GoogleAppMeasurement.framework.coverage.txt
info - 2024-01-25 19:37:04,313 -- Process Upload complete
error - 2024-01-25 19:37:04,314 -- Upload failed: {"flags":{"0":["This field may not be blank."]}}
@IanHoar
Copy link
Author

IanHoar commented Jan 25, 2024

Looks like I was able to fix the upload step by adding the flags argument to my upload step:

- codecov/upload:
    file: fastlane/test_output/braver-production.xcresult
    flags: "tests"

The flags command appears to be optional so this is seemingly a bug (or incorrect documentation)

@christianmierez
Copy link

christianmierez commented Jan 30, 2024

Looks like I was able to fix the upload step by adding the flags argument to my upload step:

- codecov/upload:
    file: fastlane/test_output/braver-production.xcresult
    flags: "tests"

The flags command appears to be optional so this is seemingly a bug (or incorrect documentation)

I am facing the same issue after upgrading from codecov/codecov@3.2.4 to 4.0.0 (latest). Seems like the flags parameter is required as opposed to what the documentation states

error - Upload failed: {"flags":{"0":["This field may not be blank."]}}

@thomasrockhu-codecov
Copy link
Contributor

@christianmierez @IanHoar sorry about this, I'll take a look today and see what we can do

@thomasrockhu-codecov
Copy link
Contributor

@christianmierez @IanHoar codecov/codecov-circleci-orb#182 should fix the issue. I intend to push a release tomorrow around noon PT.

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

Successfully merging a pull request may close this issue.

3 participants