Closed laumair closed 6 years ago
Hi @laumair Thank you for reporting an issue, we will check it ASAP
@laumair we could not reproduce this so far when the version codes were good.
Could you please copy paste the build's bitrise.io URL, so that we can check the whole log?
@viktorbenei we're seeing the same issue. This is our build url on Bitrise: https://www.bitrise.io/build/621bc4a221c0303b
Thanks @joluet , we'll look into it ASAP!
Hey @joluet !
Couldn't get enough info from the log. It seems like that the updated code is not in the build yet, or is it possible that another build were running before? (used to happen that 2 builds started, push and PR). Could you please check that?
If it still not figured out, please contact us on our on-site chat.
@joluet I close this issue now, if you have any more info or question please feel free to re-open the issue!
Thanks! 🚀
I'm getting the same error In Google Play Console I can see that I only uploaded one APK with version code 1 as beta (manually), and i'm trying to upload another APK with various version codes (reached 30 now), but keep getting this error. @viktorbenei @trapacska @doomsayer13 https://www.bitrise.io/build/809b2d6e06fc2833
Thanks!
Problem solved.
It appears that starting from one of the latest create-react-native-app versions the version code is set in the default config of the build.gradle
file.
So doing the following solved my issue:
In build.gradle
remove the lines that set the versionCode
and versionName
located under the default config:
android {
...
defaultConfig {
...
versionCode 1
versionName "1.0"
...
}
}
And in AndroidManifest.xml
add those definitions
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YOUR_PACKAGE_NAME"
android:versionCode="1"
android:versionName="1.0">
This is still happening for whether I change versionCode in manifest or cradle.
Hey @alexnivanov @asafda !
Checked again. In 100% of the cases there is an issue with changing the version of the app rather than this step uploads "wrong" version. This step has no functionality of changing, reading, or doing whatever with version codes. The version codes you see printed in the log is for verbose mode reasons. So if you want to upload the same version that you have in the Play Store then you will receive the same error message.
Closing the issue now, as it still seems to be not an error with the step itself.
Happy Building! 🚀
@alexnivanov I had the same issue but I solved it by following the solution described here: https://github.com/fastlane/fastlane/issues/4675
The step was trying to upload app-debug.apk
instead of app-release.apk
. I removed the app-debug.apk
file and added a step to clean the project and my problem was solved.
Thank you very much, @Ingibjorg !!!
I added gradle(task: "clean")
and it works!
I uploaded the apk file manually after uploading failed through console 5 times https://stackoverflow.com/a/52853585/2761641
We are also experiencing this issue, we have several white labels so manually uploading is not a sustainable option. We've updated the version from 169 to 170, 171, and finally 172, each time the production version codes number increases to our current version number under "List track infos". How is this possible? Shouldn't this represent the current version on Google Play?
List track infos
production versionCodes: [172]
Upload apks or app bundle
Failed to upload apk, error: googleapi: Error 403: APK specifies a version code that has already been
used., apkUpgradeVersionConflict
| x | google-play-deploy@1.5.1 (exit code: 1)
We also had a couple builds marked as success but did not appear to actually be updated on google play after all. Failing build: https://app.bitrise.io/build/6f360f699c846056 Succeeding build: https://app.bitrise.io/build/dc3185417a87dd72 (Separate white labels, same versions)
Hello @rpekarek
Could you try using the Change Android versionCode and versionName
step to increment the version code with each build so this error will not come up? well at least I hope.
Go to your gradle files change this in build.gradle file->module:app: versionCode 2 versionName "2.0"
Problem solved.
It appears that starting from one of the latest create-react-native-app versions the version code is set in the default config of the
build.gradle
file.So doing the following solved my issue: In
build.gradle
remove the lines that set theversionCode
andversionName
located under the default config:android { ... defaultConfig { ... versionCode 1 versionName "1.0" ... } }
And in
AndroidManifest.xml
add those definitions<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="YOUR_PACKAGE_NAME" android:versionCode="1" android:versionName="1.0">
Thanks. This worked for me.
android:versionCode="1" android:versionName="1.0"
worked for me thanks you man
Hi.
Thank you for this tool. I am having some difficulty while deploying the apk to playstore. Currently we manually update the version code and version name before triggering the build. Despite the version update I always get
Failed to upload apk, error: googleapi: Error 403: APK specifies a version code that has already been used., apkUpgradeVersionConflict
Configuration
I'm really not sure how I can further debug but I do have the versions upgraded in the appropriate files.
I would greatly appreciate any help regarding this.