on a project I setup with fastlane a lane to build an android app and publish it on appcenter.
Here a snippet of the lane, where, for the sake of simplicity, I surround by curly brackets protected data:
lane :buildAndDeploy do
gradle(task: "clean assembleRelease")
appcenter_upload(
app_name: "{myappname}",
api_token: "{token}",
owner_name: "{ownername}",
owner_type: "user",
file: "{filePath}"
)
Everything worked like a charm till two weeks ago, when suddently it stops working. When the lane cruise to the appcenter upload step I receive this from the plugin.
------------------------------
--- Step: appcenter_upload ---
------------------------------
App with name {appname} not found, create one? (y/n)
as indicated in the documentation the app name and owner name are populated like this:
https://appcenter.ms/users/{ownername}/apps/{appname}
Any idea of what could have happened in the past two weeks? I didn't change anything both on the Fastfile and the Appcenter project.
Finally I discover where was the issue.
Running this command with appcenter cli
appcenter apps list --token <MY_TOKEN> --debug
I found out that the token I was using didn't belong to the owner of the project, instead it belonged to a different user who has been removed from the project.
Adding a new API token resolved the issue.
Related
I don't know whats really wrong with my amplify. I run amplify init and get this error message. I have downloaded my amplify cli using npm and have successfully run 'amplify configure'.
init failed
InvalidSignatureException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
The Canonical String for this request should have been
'POST
/apps
host:amplify.ap-south-1.amazonaws.com
x-amz-content-sha256:79ec4b759220a7b1d454721bb2c7e1350dccbd691853e5ed1b3c92bec21dbc29
x-amz-date:20210121T154050Z
host;x-amz-content-sha256;x-amz-date
79ec4b759220a7b1d454721bb2c7e1350dccbd691853e5ed1b3c92bec21dbc29'
The String-to-Sign should have been
'AWS4-HMAC-SHA256
20210121T154050Z
20210121/ap-south-1/amplify/aws4_request
b150344845c2c575fd957d63172173a367f2bacf0e817764a02e5b20d03c3811'
Okay, so I finally found out what was bugging me for last three days. A whitespace ( ).
Yes!
I had my folder inside the user with a whitespace in it, as in "First Last". Instead what I should have done is changed my folder name inside my C:\Users\First Last to C:\Users\FirstLast before starting, and then try to install my amplify CLI using the command curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd and proceed as mentioned in the documentation here.
To change the name of the User folder in windows 10, I watched this great YT! video
On Mac:
I was also getting the same error while using the aws amplify CLI tool in my nodejs project.
Like #miraquee noted above about the issue being a white space. I suspected that I also had the same issue. What I did to start clean was:
Delete the local .aws folder in my home folder on mac to start clean
rm -rf ~/.aws/
Ran amplify init again. This time when reaching the step where it asks you to create an IAM user, which subsequently takes opens your web browser to finish the creation of the new IAM user, I was very careful about copying in the Access Key Id and Secret Access Key
This time when I went through the flow in the CLI it worked.
If you want to see a video of these steps, checkout this YouTube video built by one of the engineers on the AWS amplify team
Youtube video link: https://www.youtube.com/watch?v=fWbM5DLh25U
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
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
I am trying to submit a update to the google play store for my sencha touch 2 app.
the following is my packager.json file.
{
"applicationName":"DBS",
"applicationId":"com.keshav.dbs",
"versionCode":"2",
"versionString":"1.0.1",
"iconName":"ic_launcher.png",
"inputPath":"./build/package/Android",
"outputPath":"./build/native/Android",
"configuration":"Release",
"platform":"Android",
"deviceType":"Universal",
"certificatePath":"/Developer/Android-Keystore/myAndroidKeyStore",
"certificateAlias":"myandroidkey",
"certificatePassword":"<password>",
"sdkPath":"/Developer/sdks/android-sdk-macosx",
"androidAPILevel":"16",
"orientations": [
"portrait"
]
}
I run the following command
sencha package run packager.json
this creates the apk file however when i try to upload the new apk i get a message saying the versonCode 1 is already in use.
The instruction of packaging on Senchas website dont include the "versionCode" property I added that my self
Does anyone know how to change the version code for sencha app?
I was able to edit platforms/cordova/android/AndroidManifest.xml and update the android:versionCode, then run sencha app build native
It built the new APK (signed, based on my config) and it was accepted by the Google Play store.
Much easier than un-packaging and repackaging.
well here it is ...
After looking around the internet i found this approach works....
After Sencah creates the package use apktool to un-package the apk then edit the AndroidManifest.xml and package it up again with apktool.
Note when you re-package the app tit will be unsigned so you will have to sign it again for it install on peoples devices
I am trying to integrate my phonegap application with facebook through facebook connect plugin. I followed the instructions here since git wasn't working for me but I think I would end up with the exact same setup either way.
When I run the following code after doing FB.init() using my app ID, I get an alert saying "Cordova Facebook Connect Plugin failed on auth.status"
console.log('Debug 1');
var params = {
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.'
};
console.log(params);
FB.ui(params, function(obj) { console.log(obj);});
While logcat output shows this:
09-03 21:29:00.230: D/CordovaLog(21824): Error: Status=2 Message=Class not found
09-03 21:29:00.230: D/CordovaLog(21824): file:///android_asset/www/cordova-2.0.0.js: Line 938 : Error: Status=2 Message=Class not found
09-03 21:29:00.230: I/Web Console(21824): Error: Status=2 Message=Class not found at file:///android_asset/www/cordova-2.0.0.js:938
I don't know if this is an issue with facebook authentication of my app or some code issue. I have generated an Android Hash Key using the keytool and submitted it to facebook developer page. When I export my android project as android application in eclipse using the same keystore, it doesn't show me the alias I used with keytool (same keystore). So I created a new alias with the same alias name and password and then install the apk on my phone. What seems to be the issue here?
Well there were many problems. First of all, and most confusing was that the following line is not to be placed in plugins.xml but in config.xml instead.
<plugin name="com.phonegap.facebook.Connect" value="com.phonegap.facebook.ConnectPlugin" />
After that, I had not entered the correct hash key at facebook developer page. Since you don't want to export an apk through a keystore every time you need to test your app, you should just run the debugging apk generated by eclipse (Run as > Android application) and attempt FB.login(). Facebook will give you an error that your key is 'xxxxxx' and it does not match the keys listed at your app page. Note 'xxxxxxx' down and enter it on the facebook app page.
Others were my own mistakes of not including the scripts in the correct order. I had not followed the example carefully. Be sure you get the example/Simple/index.html working first before you code for your own application. Hope it helps...