I can't eas build --platform android Execution failed for task ':app:mergeReleaseResources' - build

In my expo sdk version 47, when I eas build in root directory it shows Execution failed for task ':app:mergeReleaseResources'.
how will i solve?
my app.json folder is
{
"expo": {
"name": "ebibaaha",
"slug": "ebibaaha",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.ebibaaha.app",
"permissions": [
"CAMERA",
"CAMERA_ROLL"
]
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "97cd307d-920a-4056-a550-0770aa4afaef"
}
}
}
}
enter image description here
I tried eas build --platform android to build my expo react native app but it show error.

Related

EXPO Error: Fastlane build failed with unknown error

I'm trying to compile my expo development (Not expo go) app, it all works for IOS and android in testing but when i try compiling it for production, only the android compiles successfully the IOS build fails at "Run Fastlane".
I've search and tried different online suggestions but nothing seems to work
has anyone else run into this issue? I've been stuck for days
my error
Build failed: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
here is my app.json
{
"expo": {
"name": "myapp",
"scheme": "myapp",
"version": "2.0.0",
"orientation": "portrait",
"icon": "iconIOS.png",
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"plugins": [
[
"react-native-fbsdk-next",
{
"appID": "12",
"clientToken": "12",
"displayName": "12",
"scheme": "12"
}
],
"#react-native-firebase/app",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static",
"deploymentTarget": "13.0"
}
}
],
"#react-native-firebase/dynamic-links"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "myapp.ai.finance",
"buildNumber": "3",
"use_frameworks": "static",
"googleServicesFile": "./GoogleService-Info.plist",
"associatedDomains": [
"applinks:myapp.site"
],
"infoPlist": {
"NSUserTrackingUsageDescription": "This identifier will be used to deliver personalized ads to you.",
"SKAdNetworkItems": [
{
"SKAdNetworkIdentifier": "v9wttpbfk9.skadnetwork"
},
{
"SKAdNetworkIdentifier": "n38lu8286q.skadnetwork"
}
]
}
},
"android": {
"package": "com.myapp.app",
"googleServicesFile": "./google-services.json",
"versionCode": 3,
"adaptiveIcon": {
"foregroundImage": "./src/assets/icons/myapp.png",
"backgroundColor": "#FFFFFF"
},
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "*.site.site",
"pathPrefix": "/records"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
],
"permissions": [
"android.permission.INTERNET"
]
},
"resolutions": {
"#expo/config-plugins": "^5.0.2",
"#expo/prebuild-config": "~5.0.3",
"expo-modules-autolinking": "~1.0.0"
},
"extra": {
"eas": {
"projectId": "id"
}
}
}
}
and here is my package.json
{
"name": "myapp",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"dev": "cross-env NODE_OPTIONS='--openssl-legacy-provider' next dev",
"eas-build-pre-install": "npm config set legacy-peer-deps true"
},
"dependencies": {
"#babel/preset-react": "^7.18.6",
"#babel/preset-typescript": "^7.18.6",
"#burstware/expo-plaid-link": "^1.0.6",
"#expo/config-plugins": "^5.0.4",
"#expo/dev-server": "^0.1.123",
"#expo/metro-config": "^0.5.1",
"#expo/webpack-config": "^0.17.0",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-firebase/app": "^17.0.0",
"#react-native-firebase/dynamic-links": "^17.0.0",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/core": "^6.4.1",
"#react-navigation/drawer": "^6.5.0",
"#react-navigation/native": "^6.0.14",
"#react-navigation/native-stack": "^6.9.1",
"#react-navigation/stack": "^6.3.2",
"axios": "^1.1.3",
"cross-env": "^7.0.3",
"expo": "~46.0.19",
"expo-apple-authentication": "~4.3.0",
"expo-auth-session": "~3.7.4",
"expo-build-properties": "~0.3.0",
"expo-dev-client": "^2.0.1",
"expo-device": "~4.3.0",
"expo-linear-gradient": "~11.4.0",
"expo-navigation-bar": "~1.3.0",
"expo-notifications": "~0.16.1",
"expo-random": "~12.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-web-browser": "~11.0.0",
"intl": "^1.2.5",
"metro-core": "^0.73.3",
"moment": "^2.29.4",
"node": "^19.6.0",
"react": "18.0.0",
"react-content-loader": "^6.2.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-dotenv": "^3.4.7",
"react-native-event-listeners": "^1.0.7",
"react-native-fbsdk-next": "^11.1.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-select-dropdown": "^3.2.1",
"react-native-svg": "12.3.0",
"react-native-svg-charts": "^5.4.0",
"react-native-svg-transformer": "^1.0.0",
"react-native-swipe-list-view": "^3.2.9",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-native-web-webview": "^1.0.2",
"react-native-webview": "11.23.0",
"react-redux": "^8.0.5",
"redux": "^4.2.0",
"redux-thunk": "^2.4.2",
"yarn": "^1.22.19"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react-native": "~0.69.1",
"metro": "^0.73.3",
"typescript": "^4.6.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1"
},
"private": true
}
eas.json
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug",
"image": "latest"
}
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {
"ios": {
"appleId": "me#gmail.com",
"ascAppId": "1234",
"appleTeamId": "4321"
}
}
}
}

Angular v12 - Unit Test - [ERROR] No specs found

After developing my Angular application I would like to run unit tests with Karma and Jasmine.
I haven't written any unit-tests yet, but trying to run the default ones, with the 'ng test' command, I notice that the .spec files are not recognized by Karma-Jasmine.
Inside the browser, Karma gives the following message: "Incomplete, no specs found", in the terminal "Executed 0 of 0 SUCCESS".
I tried to generate a new application with the Angular CLI and to run the unit test. And it works.
Within my application, the Karma configuration files have not been touched, they are the same as those of the test application, and I don't understand why the .spec files are not recognized.
angular.json
{
"$schema": "./node_modules/#angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"dibfibo": {
"projectType": "application",
"schematics": {
"#schematics/angular:component": {
"style": "scss"
},
"#schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "#angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/dibfibo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "#angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "dibfibo:build:production"
},
"development": {
"browserTarget": "dibfibo:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "#angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dibfibo:build"
}
},
"test": {
"builder": "#angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
}
}
},
"defaultProject": "dibfibo"
}
karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '#angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('#angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/dibfibo'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

Consuming a manifest artifact published by Google-cloud with Spinnaker

I am using google cloud-build as my CI system and Spinnaker as my CD.
I have configured cloud-build to copy my manifest and include it as an artifact.
that's my cloudbuild.yaml:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--tag=gcr.io/$PROJECT_ID/gordion-backend:$COMMIT_SHA', '.']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'manifests/manifest.yaml', 'gs://$PROJECT_ID-kubernetes-manifests/gordion-backend/']
images: ['gcr.io/$PROJECT_ID/gordion-backend']
artifacts:
objects:
location: 'gs://${_BUCKET_NAME}/$COMMIT_SHA/'
paths: ['manifests/manifest.yaml']
When the build is over, that's the message being broadcast by pub/sub:
{
"id": "ba084f1c-494a-42c0-8499-1b84fbb30551",
"projectId": "gordion-2",
"status": "SUCCESS",
"source": {
"repoSource": {
"projectId": "gordion-2",
"repoName": "github_gordion-beam_gordion-backend",
"branchName": "feature/build-yaml"
}
},
"steps": [
{
"name": "gcr.io/cloud-builders/docker",
"args": [
"build",
"--tag=gcr.io/gordion-2/gordion-backend:936543554ad5fab4017319005413dd38beefda04",
"."
],
"timing": {
"startTime": "2019-10-04T12:03:46.996926010Z",
"endTime": "2019-10-04T12:03:57.357589900Z"
},
"pullTiming": {
"startTime": "2019-10-04T12:03:46.996926010Z",
"endTime": "2019-10-04T12:03:47.056257759Z"
},
"status": "SUCCESS"
},
{
"name": "gcr.io/cloud-builders/gsutil",
"args": [
"cp",
"manifests/manifest.yaml",
"gs://gordion-2-kubernetes-manifests/gordion-backend/"
],
"timing": {
"startTime": "2019-10-04T12:03:57.357662249Z",
"endTime": "2019-10-04T12:04:00.089381056Z"
},
"pullTiming": {
"startTime": "2019-10-04T12:03:57.357662249Z",
"endTime": "2019-10-04T12:03:57.436904050Z"
},
"status": "SUCCESS"
}
],
"results": {
"images": [
{
"name": "gcr.io/gordion-2/gordion-backend:936543554ad5fab4017319005413dd38beefda04",
"digest": "sha256:538771fe1be2abd54f6d092519c131019d64bd1001ba38138c565faa9fe343b6",
"pushTiming": {
"startTime": "2019-10-04T12:04:00.404451498Z",
"endTime": "2019-10-04T12:04:06.089323750Z"
}
}
],
"buildStepImages": [
"sha256:c0525aac022b1a92e97f9c6cf4ede4dd82979a9f014f05b2ec8843012a03aa60",
"sha256:fbd483fa382118462a136f916b17d3197325881b6d966ba82ee3a54f4b550e76"
],
"artifactManifest": "gs://gordion-manifests/gordion-2/936543554ad5fab4017319005413dd38beefda04/artifacts-ba084f1c-494a-42c0-8499-1b84fbb30551.json",
"numArtifacts": "1"
},
"createTime": "2019-10-04T12:03:32.668464866Z",
"startTime": "2019-10-04T12:03:38.343591796Z",
"finishTime": "2019-10-04T12:04:15.243708Z",
"timeout": "600s",
"images": [
"gcr.io/gordion-2/gordion-backend"
],
"artifacts": {
"images": [
"gcr.io/gordion-2/gordion-backend"
],
"objects": {
"location": "gs://gordion-manifests/gordion-2/936543554ad5fab4017319005413dd38beefda04/",
"paths": [
"manifests/manifest.yaml"
],
"timing": {
"startTime": "2019-10-04T12:04:08.060372060Z",
"endTime": "2019-10-04T12:04:12.248879364Z"
}
}
},
"logsBucket": "gs://1039931537996.cloudbuild-logs.googleusercontent.com",
"sourceProvenance": {
"resolvedRepoSource": {
"projectId": "gordion-2",
"repoName": "github_gordion-beam_gordion-backend",
"commitSha": "936543554ad5fab4017319005413dd38beefda04"
}
},
"buildTriggerId": "6b7405e7-c2db-4412-9f1a-186c7f7d5975",
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"logUrl": "https://console.cloud.google.com/gcr/builds/ba084f1c-494a-42c0-8499-1b84fbb30551?project=1039931537996",
"substitutions": {
"_BUCKET_NAME": "gordion-manifests"
},
"tags": [
"trigger-6b7405e7-c2db-4412-9f1a-186c7f7d5975"
],
"timing": {
"BUILD": {
"startTime": "2019-10-04T12:03:46.996877211Z",
"endTime": "2019-10-04T12:04:00.404416077Z"
},
"FETCHSOURCE": {
"startTime": "2019-10-04T12:03:39.677294695Z",
"endTime": "2019-10-04T12:03:46.930866092Z"
},
"PUSH": {
"startTime": "2019-10-04T12:04:00.404450167Z",
"endTime": "2019-10-04T12:04:14.358324463Z"
}
}
}
I can also see in cloud-build history that it produced 2 artifacts:
docker image
Kubernetes manifest
the manifest is located in this location:
gs://gordion-manifests/a91cb009fa184713b86eb8b532a75dc088a25713/manifest.yaml gs://"gordion-manifests
As the location of the artifact is dynamic (due to folders named after SHA), How do I consume this artifact in expected artifacts in spinnaker?
You can use wildcards in artifact's matcher.
Please refer to documentation - https://www.spinnaker.io/reference/artifacts/in-pipelines/#expected-artifacts for overall description and
https://www.spinnaker.io/reference/artifacts-with-artifactsrewrite/types/gcs-object/#in-a-trigger for GCS artifact details.
For example following matcher should handle your case (I don't have instance to test it properly):
{
"type": "gcs/object",
"name": "gs://gordion-manifests/.*/manifest.yaml"
}

Running Unit Test with Intern 4

We migrate our intern 3 test to intern 4.
Unfortunately I get following error for my unit tests (functional tests works)
Error: scriptError
No stack or location
Error: Dojo loader error:scriptError
No stack or location
My test:
File located:
build/webapp/app/tests/unit/test.js
define([], function () {
const {registerSuite} = intern.getInterface("object");
let assert = intern.getPlugin("chai").assert;
registerSuite("Test", function () {
return {
beforeEach() {
console.log("test");
},
tests: {
defaults() {
console.log("test3");
console.log("test2");
},
toggle() {
console.log("test4");
console.log("test5");
console.log("test8");
console.log("test9");
}
}
};
});
});
My intern.json (see below)
{
"loader": {
"script": "dojo",
"options": {
"packages": [
{
"name": "app",
"location": "build/webapp/app"
},
{
"name": "dojo",
"location": "lib/dojo"
},
{
"name": "dojox",
"location": "lib/dojox"
},
{
"name": "dijit",
"location": "lib/dijit"
},
{
"name": "dstore",
"location": "lib/dstore"
}
]
}
},
"suites": [
"./build/webapp/app/tests/unit/test.js"
],
"functionalSuites": [
"./build/webapp/app/tests/functional/TestDocumentation.js"
],
"functionalTimeouts": {
"connectTimeout": 60000
},
"defaultTimeout": 180000,
"filterErrorStack": true,
"tunnel": "selenium",
"tunnelOptions": {
"version": "3.8.0",
"drivers": [
{
"name": "ie",
"arch": "Win64",
"version": "3.8.0"
}
]
},
"debug": true,
"environments": [
"node",
{
"browserName": "internet explorer",
"fixSessionCapabilities": "no-detect"
}
]
}
If I execute the unit test in the node envrioment it works fine but after launching to the ie my test failed with the Dojo loader error.
Dojo & intern are aviable in the node_moudles directory.
Best Regards
Kai
Add the lines below to the json file solved my problem
{
"name": "tests",
"location": "build/webapp/app/tests/"
}

How to get credentials file used in HFC SDK for chain-code development environment?

I am writing my chain code application in development environment provided by hyperledger fabric. I want to have an web UI for this application. IBM-BlockChain has provided an example of using HFC SDK with node.js app. I am trying to follow the same example as shown here SDK-Demo. This example is deployed on IBM-BlueMix and has ServiceCredentials.json file which contains entries like
{
"peers": [
{
"discovery_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
"discovery_port": 30001,
"api_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
"api_port_tls": 5001,
"api_port": 5001,
"event_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
"event_port": 31001,
"type": "peer",
"network_id": "36a78535bcdf4ef0g96h85619i046271",
"container_id": "b90e4977ff987e34ceb193daafdf7723751f6a195771125a12051ac44442367e",
"id": "36a78535bcdf4ef0g96h85619i046271-vp3",
"api_url": "http://36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com:5001"
},
{
"discovery_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
"discovery_port": 30001,
"api_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
"api_port_tls": 5001,
"api_port": 5001,
"event_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
"event_port": 31001,
"type": "peer",
"network_id": "36a78535bcdf4ef0g96h85619i046271",
"container_id": "dea7d34e49827e1ddb465fae16bb40724a7aeaac8775d8193a7071f0cf51e13b",
"id": "36a78535bcdf4ef0g96h85619i046271-vp0",
"api_url": "http://36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com:5001"
},
],
"ca": {
"36a78535bcdf4ef0g96h85619i046271-ca": {
"url": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com:30001",
"discovery_host": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com",
"discovery_port": 30001,
"api_host": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com",
"api_port_tls": 30001,
"api_port": 30001,
"type": "ca",
"network_id": "36a78535bcdf4ef0g96h85619i046271",
"container_id": "0083cc6af273d82a18698763348494708063af871bead073f1899ce1726f5e07"
}
},
"users": [
{
"enrollId": "admin",
"enrollSecret": "c62d4d9a5d",
"affiliation": "group1",
"username": "admin",
"secret": "c62d4d9a5d"
},
{
"enrollId": "WebAppAdmin",
"enrollSecret": "50dd43e4c0",
"affiliation": "group1",
"username": "WebAppAdmin",
"secret": "50dd43e4c0"
}
],
"cert": "https://blockchain-certs.mybluemix.net/us.blockchain.ibm.com.cert",
"cert_path": "/certs/peer/cert.pem"
}
I am not using IBM-BlueMix so can't get the auto-generated credentials file.
How do i generate credentials file for my environment?