'Fastlane error when uploading to Testflight Error uploading ipa file

I'm learning CD with Fastlane, Fastlane Match, and CircleCI. I was able to upload a new version to Tesflight (version 4), however, all the subsequent attempts have failed.

Is it possible to build the artifact with no changes in the code and upload it as a new version to Testflight? That's what I'm trying to do, re-running the same job but I'm receiving this error instead of uploading version 5 to Testflight:

[00:47:47]: Error uploading ipa file: 
 [Transporter Error Output]: ERROR ITMS-90189: Redundant Binary Upload. You've already uploaded a build with build number '4' for version number '1.0.0'. Make sure you increment the build string before you upload your app to App Store Connect. Learn more in Xcode Help (http://help.apple.com/xcode/mac/current/#/devba7f53ad4).
[Transporter Error Output]: Return status of iTunes Transporter was 1: ERROR ITMS-90189: Redundant Binary Upload. You've already uploaded a build with build number '4' for version number '1.0.0'. Make sure you increment the build string before you upload your app to App Store Connect. Learn more in Xcode Help (http://help.apple.com/xcode/mac/current/#/devba7f53ad4).
[Transporter Error Output]: The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

Version 4 is the number I have on my project.pbxproj. Same with version 1.0.0

CURRENT_PROJECT_VERSION = 4;

MARKETING_VERSION = 1.0.0;

Before uploading to Testflight, I'm doing:

increment_build_number(
  xcodeproj: "src/Project.xcodeproj"
)

As the docs states by default increment by one.

In the CI logs I can see that first logs the number harcoded in the file: Current version of project Project is: 4 and then prints Setting version of project Project to: 5

I don't know why it is not working, and if changes in the code are required to build a new artifact a create a new version.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source