Release android application via azure pipeline - android

I create release pipeline on Azure DevOps and try publish android application in play google.
Now I use Google Play extension and when I start the process an error occurs
2020-09-09T03:43:27.0917248Z ##[section]Запускается: Release app.apk
2020-09-09T03:43:27.8780592Z ==============================================================================
2020-09-09T03:43:27.8781175Z Task : Google Play - Release Bundle
2020-09-09T03:43:27.8781808Z Description : Release an app bundle to the Google Play Store
2020-09-09T03:43:27.8782024Z Version : 3.174.0
2020-09-09T03:43:27.8782441Z Author : Microsoft Corporation
2020-09-09T03:43:27.8782859Z Help :
2020-09-09T03:43:27.8783075Z ==============================================================================
2020-09-09T03:43:35.1490887Z Found main bundle to upload: .../app.apk (version code %s)
2020-09-09T03:43:35.1776730Z (node:7588) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-09-09T03:43:56.1999306Z ##[error]FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: connect ETIMEDOUT 108.177.14.95:443
2020-09-09T03:43:56.2066653Z ##[section]Завершается: Release app.apk
My VSTS agent is installed on the windows server behind the proxy server. On proxy server have a white list with google address *.googleapis.com
Agent configuration
.\config.cmd --proxyurl http://... --proxyusername ... --proxypassword ... --url https://... --auth integrated --pool ... --agent vsts-agent-win-x64-2.169.1 --runAsService --windowsLogonAccount ... --windowsLogonPassword ...
And YAML configuration release step from pipeline
steps:
- task: ms-vsclient.google-play.google-play-release-bundle.GooglePlayReleaseBundle#3
displayName: 'Release app.apk'
inputs:
authType: JsonFile
serviceAccountKey: '....json'
applicationId: ...
bundleFile: '$(System.DefaultWorkingDirectory)/.../app.apk'
track: alpha
changeLogFile: '$(System.DefaultWorkingDirectory)/.../app.apk'
I thing this extension not work with proxy.
How fix this error?

To solve the problem with unloading we had to create additional environment variables
http_proxy=...
https_proxy=...
My proxy replaces the certificates with its own, so initially the system does not trust the CA of my organization, it was decided to ignore the validity of the certificate.
I created one more environment variable
NODE_TLS_REJECT_UNAUTHORIZED=0
and made adjustments to the npm setting
npm config set strict-ssl false
After that it was possible to connect to a google server and publish the application.

Related

Unable to use CLI Fastlane supply action with metadata for Android

I would like to use CLI Fastlane supply action to push an app-bundle to Play Store. Along side with other required options, i put a metadata path to declare release note so that it can be shown on the Play Store.
But it can't be executed instead it shows errors. Here's some tried CLI commands:
fastlane run supply aab:(path to aab) track:internal json_key:(path to json key) metadata_path:"path/to/metadata" package_name:(package name)
fastlane run supply aab:(path to aab) track:internal json_key:(path to json key) metadata_path:"path/to/metadata/android" package_name:(package name)
And this is how the metadata folder's described:
Finally, the error:
[11:06:54]: Preparing aab at path '/app-release.aab' for upload...
[11:07:19]: Updating track 'internal'...
[11:07:21]: Preparing to upload for language 'android'...
Looking for related GitHub issues on fastlane/fastlane...
➡️ http_command.rb:228:in `check_status': \e[31m[!] Invalid request\e[0m (Google::Apis::ClientError)
https://github.com/fastlane/fastlane/issues/18895 [open] 7 💬
2 days ago
➡️ Supply: Error 404 (Not Found) Google Api Error: Invalid request
https://github.com/fastlane/fastlane/issues/18896 [closed] 4 💬
16 Jun 2021
➡️ Swift: `scheme` value in Scanfile is ignored
https://github.com/fastlane/fastlane/issues/19196 [open] 1 💬
a week ago
and 424 more at: https://github.com/fastlane/fastlane/search?q=Invalid%20request&type=Issues&utf8=✓

Flutter with FirebaseAppDistribution ignore "--target"

Updated (07 Nov 2019)
I've tried the following command and it works as expected
Assume that flavor=Staging and build=Release, Build_Variant=StagingRelease.
And based on Flutter entry point file (--target)=lib/main_stg.dart
./gradlew appDistributionUploadStagingRelease --project-prop target=lib/main_stg.dart
It seems like appDistributionUploadStagingRelease re-build apk even though assembleStagingRelease is not added in the command.
Issue
I've a project which contain the following flavors and targets
Flavors
- Dev
- Staging
- Production
Targets (<project_root/lib>)
- main_dev.dart (development)
- main_stg.dart (staging)
- main.dart (production)
I've been using this command
flutter build --release --target staging --t lib/main_stg.dart for building Staging.
However, when executing FirebaseAppDistribution using ./gradlew appDistributionStagingRelease, the uploaded APK ignore lib/main_stg.dart and use lib/main.dart.
Further check on the log indicate that it does not rebuild
> Task :app:appDistributionUploadStagingRelease
Found APK at <project_root>/build/app/outputs/apk/staging/release/app-staging-release.apk.
Uploading APK to Firebase App Distribution...
Getting appId from output of google services plugin
This APK has not been uploaded before.
Uploading the APK.
Uploaded APK successfully 202
No release notes passed in. Skipping this step.
Added testers/groups successfully 200
App Distribution upload finished successfully!
Does any Flutter dev encounter similar issue? Kindly guide me for this.
Thank You

CodePush - Releasing an iOS bundle breaks Android and vice versa

Using react-native-code-push.
Whenever I release an iOS version (using code-push release-react ... ios), it breaks my Android code push. Next time I try to get an update I get the following error:
You attempted to set the key isPending with the value true on an
object that is meant to be immutable and has been frozen.
Then, if I release an Android version, it breaks my iOS, getting this error:
Update is invalid - A JS bundle file named "main.jsbundle" could not
be found within the downloaded contents. Please ensure that your app
is syncing with the correct deployment and that you are releasing your
CodePush updates using the exact same JS bundle file name that was
shipped with your app's binary.
It's very strange and the documentation doesn't say anything about collisions between the two platforms.
You need to setup an app for each platform
code-push app add [name]-ios
code-push app add [name]-android
i think the code-push release-react [app-name] [platform] ... the platform argument only tells the react-native bundler what entry file to use (index.ios.js or index.android.js) it doesnt work as "install only on ios"

How to use docker android images on drone.io

First of all , i am very beginner in this drone and docker stuffs , so please be kind on me. Now this is the scenario
My organisation has a drone server ready and working.
When I log in into the drone server , I can see all my android repositories.
There is repository named "DockerTesting" which I have made just to set up the drone for Android build.(It might confuse you)
I have added an .drone.yml file in top-level repository "DockerTesting"
My .drone.yml looks like this
image: docker.vokalinteractive.com/android:latest
env:
- ORG_GRADLE_PROJECT_ratsUser={{rats_user}}
- ORG_GRADLE_PROJECT_ratsPass={{rats_pass}}
- ANDROID_HOME=/usr/local/android-sdk
script:
- ./gradlew build device
notify:
slack:
webhook_url: https://hooks.slack.com/services/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
channel: docker_android
username: drone
template: >
{{#success build.status}}
{{ build.author }} successfully pushed to {{ build.branch}}. Code was published.
{{else}}
{{ build.author }} broke the build. Code was not published.
<{{system.link_url}}/{{repo.full_name}}/{{build.number}}|{{repo.name}}#{{build.commit}}>
{{/success}}
I wrote this yml file myself using google
I am getting slack notification this is good at least for me
Below is the problem:
In the repository "Docker Testing" I made a syntax error, as a result the build was failed in my local machine(my laptop) in Android Studio.
Now I did git push command to update this repository in my company's server
3 The push was successful (Why?) . It should have failed as I have done a syntax error & also the build was failed in local machine

How to rename(branding) browser built on Android Chromium source code?

I need to build custom browser based on android chromium with custom product name.
I found config files(src/chrome/app/theme/chromium/BRANDING) and changed PRODUCT_FULLNAME.
Then I have built APK with commands
src$ gclient sync
src$ ninja -C out/Release chrome_public_apk
in console.
Build completes without errors.
But after installation on target device, I saw default product name.
Configurations in src/build/common.gypi:
'branding%' : 'Chromium'
'buildtype%' : 'Dev'
'component%' : 'static_library'
chromium.gyp_env: { 'GYP_DEFINES': 'OS=android' }
What i do wrong? How rebrand chromium?
that package name string is defined in //chrome/android/BUILD.gn.

Categories

Resources