So I have tried to build our App to Android and IOS but for both it always uses one of our older versions (always the same 1.0.13) but Play Store and IOS App Store show the correct versions on their page - but the app just isnt the right version. Any guess what might cause this, or is there some other cache I have to clean?
Basic Questions:
- Whether you are bare or managed workflow
We are using managed workflow.
The latest, it always gets downloaded by gitlab ci
- What you have tried so far
Clearing Gitlab Runner Cache , trying to add more space to our gitlab server.
Really need help on this one. I post additionally my eas.json config:
{
"cli": {
"version": ">= 0.47.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
}
},
"submit": {
"preview": {
"android": {
"releaseStatus": "draft",
"serviceAccountKeyPath": "./services.json"
},
"ios": {
"appleId": "<Hidden>",
"ascAppId": "<Hidden>"
}
}
}
}
and my gitlab-ci.yml
image: node:17-alpine3.12
stages:
- pre
- test
- build
- publish
- post
cache:
untracked: true
when: on_success
key: ${CI_COMMIT_REF_SLUG}
paths:
- ~/.npm
- node_modules/
variables:
DOCKER_DRIVER: overlay2
before_script:
- npm install --cache .npm --prefer-offline
close:issue:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue
stage: pre
before_script: [ ]
only:
- main
script:
- apk add --no-cache --upgrade grep
- ISSUE=$(echo $CI_COMMIT_MESSAGE | grep -oP "(?<=Fixes \#)[0-9]+" || echo '1')
- gitlab_auto_close_issue --issue $ISSUE --remove-label "Doing" --remove-label "To Do"
create:merge-request:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-mr
stage: pre
before_script: [ ]
except:
- production
- main
- tags
script:
- gitlab_auto_mr -t main -c WIP -d .gitlab/merge_request_templates/merge_request.md -r -s --use-issue-name --private-token=$GITLAB_PRIVATE_TOKEN
lint:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run lint
lint:code-formatter:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run code-formatter-check
tests:unit:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run tests --silent
# Runs unit tests and coverage
tests:coverage:
stage: test
only:
- main
script:
- npm run coverage --silent
coverage: /All\sfiles.*?\s+(\d+.\d+)/
# Builds the app for android and ios and uploads it to the expo cloud.
eas-build:
stage: build
only:
- main
script:
- apk add --no-cache bash git openssh
- git status
- npx eas-cli build --platform all --non-interactive
#Submits latest build to the playstore.
publish:android:package:
stage: publish
only:
- /^release/.*$/
script:
- apk add --no-cache bash git openssh
- git status
#- cat $FIREBASE_GOOGLE_SERVICES_JSON > app/google-services.json
- npx eas-cli submit -p android --latest --profile=preview
#Submits latest IOS build to the appstore.
publish:ios:package:
stage: publish
only:
- /^release/.*$/
script:
- apk add --no-cache bash git openssh
- git status
#- cat $FIREBASE_GOOGLE_SERVICES_JSON > app/google-services.json
- npx eas-cli submit -p ios --latest --profile=preview
#Generates a release information for the gitlab repo.
create:gitlab:release:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-release
stage: post
only:
- /^release/.*$/
except:
variables:
- $CI_COMMIT_TAG =~ /beta/
- $CI_COMMIT_TAG =~ /alpha/
before_script: [ ]
script:
- gitlab_auto_release -c CHANGELOG.md -d "This was auto-generated by the gitlab-auto-release tool, https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-release." --artifacts "publish:android:package"
pages:
only:
- not-in-use
script:
- npm run docs-build
- mv .docz/dist/* public/
artifacts:
paths:
- public
I also tested the following:
- Build apk: Works fine
- Run Eas Build on my pc and then run eas submit on the runner: Same issue as running eas build on the runner => Therefore, the problem has to be eas submit taking the wrong apk!
Thanks in advance!
Its the latest version on all of these (right now 1.0.16), but the app itself simply isnt. I also added a version visual inside the app, that says 1.0.13 - this doesnt change at all.
but the app itself simply isn’t
what does it mean?
I also added a version visual inside the app, that says 1.0.13
how are you accessing that version from js code?
“what does it mean?” -
The app doesnt have the latest UI features i implemented, its on a older version.
“how are u accesing that version from js code?”
via Expo Constants - i have an app.config.js therefore
Really need help on this one. I post additionally my eas.json config:
{
"cli": {
"version": ">= 0.47.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
}
},
"submit": {
"preview": {
"android": {
"releaseStatus": "draft",
"serviceAccountKeyPath": "./services.json"
},
"ios": {
"appleId": "<Hidden>",
"ascAppId": "<Hidden>"
}
}
}
}
and my gitlab-ci.yml
image: node:17-alpine3.12
stages:
- pre
- test
- build
- publish
- post
cache:
untracked: true
when: on_success
key: ${CI_COMMIT_REF_SLUG}
paths:
- ~/.npm
- node_modules/
variables:
DOCKER_DRIVER: overlay2
before_script:
- npm install --cache .npm --prefer-offline
close:issue:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue
stage: pre
before_script: [ ]
only:
- main
script:
- apk add --no-cache --upgrade grep
- ISSUE=$(echo $CI_COMMIT_MESSAGE | grep -oP "(?<=Fixes \#)[0-9]+" || echo '1')
- gitlab_auto_close_issue --issue $ISSUE --remove-label "Doing" --remove-label "To Do"
create:merge-request:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-mr
stage: pre
before_script: [ ]
except:
- production
- main
- tags
script:
- gitlab_auto_mr -t main -c WIP -d .gitlab/merge_request_templates/merge_request.md -r -s --use-issue-name --private-token=$GITLAB_PRIVATE_TOKEN
lint:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run lint
lint:code-formatter:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run code-formatter-check
tests:unit:
stage: test
only:
- merge_requests
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^master/
script:
- npm run tests --silent
# Runs unit tests and coverage
tests:coverage:
stage: test
only:
- main
script:
- npm run coverage --silent
coverage: /All\sfiles.*?\s+(\d+.\d+)/
# Builds the app for android and ios and uploads it to the expo cloud.
eas-build:
stage: build
only:
- main
script:
- apk add --no-cache bash git openssh
- git status
- npx eas-cli build --platform all --non-interactive
#Submits latest build to the playstore.
publish:android:package:
stage: publish
only:
- /^release/.*$/
script:
- apk add --no-cache bash git openssh
- git status
#- cat $FIREBASE_GOOGLE_SERVICES_JSON > app/google-services.json
- npx eas-cli submit -p android --latest --profile=preview
#Submits latest IOS build to the appstore.
publish:ios:package:
stage: publish
only:
- /^release/.*$/
script:
- apk add --no-cache bash git openssh
- git status
#- cat $FIREBASE_GOOGLE_SERVICES_JSON > app/google-services.json
- npx eas-cli submit -p ios --latest --profile=preview
#Generates a release information for the gitlab repo.
create:gitlab:release:
image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-release
stage: post
only:
- /^release/.*$/
except:
variables:
- $CI_COMMIT_TAG =~ /beta/
- $CI_COMMIT_TAG =~ /alpha/
before_script: [ ]
script:
- gitlab_auto_release -c CHANGELOG.md -d "This was auto-generated by the gitlab-auto-release tool, https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-release." --artifacts "publish:android:package"
pages:
only:
- not-in-use
script:
- npm run docs-build
- mv .docz/dist/* public/
artifacts:
paths:
- public
I also tested the following:
- Build apk: Works fine
- Run Eas Build on my pc and then run eas submit on the runner: Same issue as running eas build on the runner => Therefore, the problem has to be eas submit taking the wrong apk!
Therefore, the problem has to be eas submit taking the wrong apk!
last submit was definitely uploading a version 1.0.18
I’m assuming that by that you mean that if you build apk and install it on the device it has correct UI changes?
The latest submits on your account are definitely using newer versions than 1.0.13
, best on what you described it also looks like new versions are showing up in both stores, so the only explanation I can see is that you did not update your app on tesflight and you are still loading the old version.
The other explanation could be that someone is running expo publish on old code, but it should only affect older builds, so if you first publish and then build then that apk should not be updated.
yeah, i have to add a newer version everytime I test it again. 1.0.18 was with testing a local built apk. Its not Testflight alone, its also palystore. What is expo publish? I only use eas build and eas submit
yeah, i have to add a newer version every time I test it again. 1.0.18 was with testing a local built apk.
please try to be precise, I have no idea what you mean by that
Its not Testflight alone, its also palystore.
yes, I’m aware
I made few assumptions in the previous comment, please clarify if my assumption was correct and if not describe what is different.
When you open tesflight what version it shows(I’m asking about version of your app displayed in testflight not the one displayed in your app)
please try to be precise, I have no idea what you mean by that
When uploading to the playstore or App Store, youre always required to change version number or else it wont be updated. I therefore need to change it everytime.
yes, I’m aware
I made few assumptions in the previous comment, please clarify if my assumption was correct and if not describe what is different.
When you open tesflight what version it shows(I’m asking about version of your app displayed in testflight not the one displayed in your app)
Testflight shows the correct version number, and Google Play Store too. But the version number displayed inside the app is always 1.0.13 and the build itsself is older - Although Expo always shows that it uploads the latest build. So somehow - thats my assumption - expo always uses old code instead of the one I upload.
The other explanation could be that someone is running expo publish on old code, but it should only affect older builds, so if you first publish and then build then that apk should not be updated.
I dont know what you mean by that - I have never used expo publish, I only use eas build and submit.