When I run fastlane to build project, I get error:
C:\Users\Me\AndroidStudioProjects\MyProject\MyProject-android>fastlane staging app:MyApp
[✔] 🚀
[11:56:13]: fastlane detected a Gemfile in the current directory
[11:56:13]: However, it seems like you didn't use bundle exec
[11:56:13]: To launch fastlane faster, please use
[11:56:13]:
[11:56:13]: $ bundle exec fastlane staging app:MyApp
[11:56:13]:
[11:56:13]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
+---------------------------+---------+------------------------------------+
| Used plugins |
+---------------------------+---------+------------------------------------+
| Plugin | Version | Action |
+---------------------------+---------+------------------------------------+
| fastlane-plugin-cryptex | 0.1.5 | cryptex, cryptex_generate_keystore |
| fastlane-plugin-appcenter | 2.0.0 | appcenter_codepush_release_react, |
| | | appcenter_fetch_devices, |
| | | appcenter_fetch_version_number, |
| | | appcenter_upload |
+---------------------------+---------+------------------------------------+
11:56:16: --- Step: default_platform ---
11:56:16: ------------------------------
11:56:16: Driving the lane 'android staging' 🚀
11:56:16: --------------------------------------------------
11:56:16: --- Step: Switch to android assemble_vars lane ---
11:56:16: --------------------------------------------------
11:56:16: Cruising over to lane 'android assemble_vars' 🚖
11:56:16: Cruising back to lane 'android staging' 🚘
11:56:16: ------------------------------------------
11:56:16: --- Step: Switch to android build lane ---
11:56:16: ------------------------------------------
11:56:16: Cruising over to lane 'android build' 🚖
11:56:16: ---------------------
11:56:16: --- Step: cryptex ---
11:56:16: ---------------------
11:56:16: The cryptex plugin is working!
11:56:16: Successfully loaded 'C:/Users/Me/AndroidStudioProjects/MyProject/MyProject-android/fastlane/Cryptexfile' 📄
+---------+----------------------------------------------------------+
| Detected Values from './fastlane/Cryptexfile' |
+---------+----------------------------------------------------------+
| git_url | git#bitbucket.org:MyProject/MyProject-certificates.git |
+---------+----------------------------------------------------------+
+---------------+----------------------------------------------------------+
| Summary for cryptex 0.1.5 |
+---------------+----------------------------------------------------------+
| type | export |
| out | fastlane/secrets/MyProject-ci.json |
| key |MyProject-ci.key |
| git_url | git#bitbucket.org:MyProject/MyProjectcertificates.git |
| git_branch | master |
| set_env | false |
| verbose | false |
| shallow_clone | false |
| skip_docs | false |
| digest | md5 |
+---------------+----------------------------------------------------------+
11:56:16: Cloning remote git repo...
No such file or directory - GIT_TERMINAL_PROMPT=0 git clone 'git#bitbucket.org:MyProject/MyProject-certificates.git' 'C:/Users/ME1/AppData/Local/Temp/d20220514-12820-9gt23v'
11:56:16: Error cloning Repo
11:56:16: Run the following command manually to make sure you're properly authenticated:
11:56:16: $ git clone 'git#bitbucket.org:MyProject/MyProject-certificates.git' 'C:/Users/ME1/AppData/Local/Temp/d20220514-12820-9gt23v'
11:56:16: 🔒 Successfully encrypted certificates repo
+------------------+-----------------+
| Lane Context |
+------------------+-----------------+
| DEFAULT_PLATFORM | android |
| PLATFORM_NAME | android |
| LANE_NAME | android staging |
+------------------+-----------------+
11:56:16: Error cloning cryptex git repo, please make sure you have access to the repository - see instructions above
+------+--------------------------------------+-------------+
| fastlane summary |
+------+--------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+--------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | Switch to android assemble_vars lane | 0 |
| 3 | Switch to android build lane | 0 |
| 💥 | cryptex | 0 |
+------+--------------------------------------+-------------+
11:56:16: fastlane finished with errors
[!] Error cloning cryptex git repo, please make sure you have access to the repository - see instructions above
But if I run :
$ git clone git#bitbucket.org:MyProject/MyProject-certificates.git C:/Users/ME~1/AppData/Local/Temp/d20220514-12820-9gt23v
or
or if I run
GIT_TERMINAL_PROMPT=0 git clone git#bitbucket.org:MyProject/MyProject-certificates.git
cloning is successful.
My FastFile:
platform :android do
desc "Assemble input vars"
lane :assemble_vars do |options|
# Supply package name from CLI (com.myproj.firstrapp or com.myproj.secondapp)
# See https://github.com/fastlane/fastlane/issues/7949
case options[:app]
when "FirstApp"
$apk_file = "./FirstApp/build/outputs/apk/FirstApp-release.apk"
$package_name = "com.myproj.firstrapp"
$task_prefix = "FirstApp"
$appcenter_app = "FirstApp"
when "MyProject"
$apk_file = "./MyProject/build/outputs/apk/MyProject-release.apk"
$package_name = "com.myproj.secondapp"
$task_prefix = "MyProject"
$appcenter_app = "MyProject"
else
raise "Invalid app name #{options[:app]}"
end
end
desc "Invoke build"
lane :build do |options|
# Fetch secrets
cryptex(
type: "export",
out: "fastlane/secrets/MyProject-ci.json",
key: "MyProject-ci.key"
)
cryptex(
type: "export",
out: "fastlane/secrets/MyProject_signing.jks",
key: "MyProject_signing.jks"
)
# Build
gradle(
task: "common:assembleRelease #{$task_prefix}:assembleRelease",
print_command: false,
properties: {
"android.injected.signing.store.file" => "fastlane/secrets/MyProject_signing.jks",
"android.injected.signing.store.password" => ENV["ANDROID_SIGNING_KEY"],
"android.injected.signing.key.alias" => "MyProject",
"android.injected.signing.key.password" => ENV["ANDROID_SIGNING_KEY"],
}
)
end
desc "Submit a new Beta Build to Appcenter"
lane :staging do |options|
# Assemble vars
assemble_vars(
app: options[:app]
)
# Invoke build
build(
)
appcenter_upload(
api_token: "********************************************************",
owner_name: "MyProject",
owner_type: "organization",
app_name: $appcenter_app,
notify_testers: true
)
# Notify in Slack
if ENV["SLACK_URL"] =~ /.+/
slack(
message: "MyProject Android version available check your inbox!",
channel: "#ci",
success: true,
default_payloads: [:git_branch, :git_author, :last_git_commit_message]
)
end
end
desc "Deploy a new version to the Google Play"
lane :production do |options|
# Assemble vars
assemble_vars(
app: options[:app]
)
# Invoke build
build(
)
# Upload to Goodle Play
supply(
# Supply JSON credentials from cryptex
json_key: "fastlane/secrets/MyProject-ci.json",
package_name: $package_name,
apk: $apk_file,
# Uncomment for internal testing
# track: "internal",
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true
)
# Notify in Slack
if ENV["SLACK_URL"] =~ /.+/
slack(
message: "New Google Play version ready for publishing - check the App Store, write release notes & publish!",
channel: "#ci",
success: true,
default_payloads: [:git_branch, :git_author, :last_git_commit_message]
)
end
end
end
# error block is executed when a error occurs
error do |lane, exception|
if ENV["SLACK_URL"] =~ /.+/
slack(
message: "CI failed with exception : #{exception.to_s}",
success: false,
default_payloads: [:git_branch, :git_author, :last_git_commit_message],
# Output containing extended log output
payload: { "Output" => exception.to_s }
)
end
end
I am building a web application allowing users to build and deploy a Flutter mobile app on Play Store with one click.
I was testing the deployment with Fastlane when I got this
:~/data/60e294c76bb64b00207a83bc/android$ fastlane supply --aab ../build/app/outputs/bundle/release/app-release.aab --track beta --rollout 0.5
[✔] 🚀
[17:13:56]: fastlane detected a Gemfile in the current directory
[17:13:56]: However, it seems like you didn't use `bundle exec`
[17:13:56]: To launch fastlane faster, please use
[17:13:56]:
[17:13:56]: $ bundle exec fastlane supply --aab ../build/app/outputs/bundle/release/app-release.aab --track beta --rollout 0.5
[17:13:56]:
[17:13:56]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
+---------------------------------+--------------------------------------------------------+
| Summary for supply 2.187.0 |
+---------------------------------+--------------------------------------------------------+
| aab | ../build/app/outputs/bundle/release/app-release.aab |
| track | beta |
| rollout | 0.5 |
| package_name | com.draft.mobile.fosso_mael_elvis.p60e294c76bb64b0020 |
| | 7a83bc |
| release_status | completed |
| json_key | ~/Draft/pc-api-xxxxxxxxxxxx-xxxwwwwyyy.json |
| skip_upload_apk | false |
| skip_upload_aab | false |
| skip_upload_metadata | false |
| skip_upload_changelogs | false |
| skip_upload_images | false |
| skip_upload_screenshots | false |
| validate_only | false |
| check_superseded_tracks | false |
| timeout | 300 |
| deactivate_on_promote | true |
| ack_bundle_installation_warning | false |
+---------------------------------+--------------------------------------------------------+
[!] Google Api Error: Invalid request - Package not found: com.draft.mobile.fosso_mael_elvis.p60e294c76bb64b00207a83bc.
I got the error [!] Google Api Error: Invalid request - Package not found: com.draft.mobile.fosso_mael_elvis.p60e294c76bb64b00207a83bc. many times after many configurations from fastlane deploy to fastlane supply
It seems like this error means that to use Fastlane for auto-deployment you must deploy it first manually so that the package ID will be available in Play Store for an update. So it's almost like an auto-update that an auto-deployment 😢
So my question is, is there a tool or a way to deploy a mobile application completely automatically?
Try upload .aab or .apk manually on google play console, then use fastlane to auto deploy next versions...
I'm trying to integrate AWS authentication in my android application, I'm using AWS amplify.
While trying to use amplify push command i received following error.
An error occurred during the push operation: app\src\main\res\raw contains invalid WIN32 path characters.
I'm pushing below category:
| Category | Resource name | Operation | Provider plugin |
| -------- | -------------------------- | --------- | ----------------- |
| Auth | <My Resource name> | Create | awscloudformation |
Please if someone could help me solving this issue.
Im setting up a new machine to run Android pipeline, when I'm trying to upload APK to Fabric using fastlane display this error: Fastlane finished with errors
[!] Error fetching remote file: Connection reset by peer - SSL_connect
I have proxy, I already set the proxy in bash_profile, gradle.proprieties, etc/profile
Result:
[11:47:10]: The `generated_fastfile_id` action was deprecated, you can remove the line from your `Fastfile`
[11:47:10]: ------------------------------
[11:47:10]: --- Step: default_platform ---
[11:47:10]: ------------------------------
[11:47:10]: Driving the lane 'beta_deploy' 🚀
[11:47:10]: -----------------------------------------------
[11:47:10]: --- Step: Switch to upload_crashlytics lane ---
[11:47:10]: -----------------------------------------------
[11:47:10]: Cruising over to lane 'upload_crashlytics' 🚖
[11:47:10]: -------------------------
[11:47:10]: --- Step: crashlytics ---
[11:47:10]: -------------------------
[11:47:10]: Downloading Crashlytics Support Library - this might take a minute...
+------------------+-------------+
| Lane Context |
+------------------+-------------+
| DEFAULT_PLATFORM | android |
| PLATFORM_NAME | |
| LANE_NAME | beta_deploy |
+------------------+-------------+
[11:47:10]: Error fetching remote file: Connection reset by peer - SSL_connect
+------+-----------------------------------+-------------+
| fastlane summary |
+------+-----------------------------------+-------------+
| Step | Action | Time (in s) |
+------+-----------------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to upload_crashlytics lane | 0 |
| 💥 | crashlytics | 0 |
+------+-----------------------------------+-------------+
[11:47:10]: fastlane finished with errors
[!] Error fetching remote file: Connection reset by peer - SSL_connect
)
Upload to Fabric is display error, I expected without errors.
I am getting the errors in the fastlane for building a signed apk as an assembleRelease apk and i want to deploy the update on the playstore but when i firing the fastlane command at the time i am getting the error for the increment_version_code.
Shubhams-MacBook-Air:ProjectPath shubhamsejpal$ fastlane beta
[✔] 🚀
[23:33:51]: fastlane detected a Gemfile in the current directory
[23:33:51]: however it seems like you don't use `bundle exec`
[23:33:51]: to launch fastlane faster, please use
[23:33:51]:
[23:33:51]: $ bundle exec fastlane beta
[23:33:51]:
[23:33:51]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[23:33:51]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
[23:33:52]: ----------------------------------------
[23:33:52]: --- Step: Verifying fastlane version ---
[23:33:52]: ----------------------------------------
[23:33:52]: Your fastlane version 2.90.0 matches the minimum requirement of 2.64.0 ✅
[23:33:52]: ------------------------------
[23:33:52]: --- Step: default_platform ---
[23:33:52]: ------------------------------
[23:33:52]: Driving the lane 'android beta' 🚀
+------------------+--------------+
| Lane Context |
+------------------+--------------+
| DEFAULT_PLATFORM | android |
| PLATFORM_NAME | android |
| LANE_NAME | android beta |
+------------------+--------------+
[23:33:52]: Could not find action, lane or variable 'increment_version_code'. Check out the documentation for more details: https://docs.fastlane.tools/actions
+------+---------------------+-------------+
| fastlane summary |
+------+---------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------+-------------+
| 1 | Verifying fastlane | 0 |
| | version | |
| 2 | default_platform | 0 |
+------+---------------------+-------------+
[23:33:52]: fastlane finished with errors
[!] Could not find action, lane or variable 'increment_version_code'. Check out the documentation for more details: https://docs.fastlane.tools/actions
[23:33:52]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
you have to add this plugin
fastlane add_plugin increment_version_code
reference url