Appflow automation build error , ask upgrade to version 3

“Capacitor config command failed, ensure capacitor dependency has been updated to version 3 or more.”
I must upgrade capacitor to version 3 or there is another way to pass build process?

5 Likes

Hi yossibo,

You might not need to upgrade capacitor to version 3. It would be helpful to take a look at the build logs and your configuration.

If you email support@ionic.io along with the Appflow app id, support would be able to assist you.

thanks,

I’m having this same issue, with @capacitor/core@3.0.0-beta.6 . Were you able to get it resolved?

I got this issue as well and haven’t got any reply yet after submitting a ticket.

1 Like

anynews on this issue? I encounter this using the latest Capacitor 2.4.7

i’m having this issue even when trying to build a fresh ionic starter project with capacitor 3.0.0 on appflow. this is frustrating

1 Like

I just upgraded to Cpacitor 3.0.0 and now App flow doesnt work… this bug is still not fixed?? my error logs are exactly the same as yossibo’s logs. Please fix this asap

I ran into this issue also but later noticed the migration tutorials I had followed were not for ionic react, which was what I was using. Updating @ionic/react fixed this for me

Hi,

This could be an issue with a bad package-lock.json file.

Can you run the npm install command on your local machine to generate a new package-lock.json file and make sure you commit the changes.

Try a new build with the latest commit in appflow and verify if you are still seeing the same issue.

Let us know if you have any further questions.

Thanks,

Another person with the same problem here.

This was a good suggestion, as my packagejson and package-lockjson were not in sync, but unfortunately this didnt solve the issue.

Currently our stack is relatively up-to-date with angular11/capacitor 3, with only some small back compat cordova libraries like datepicker and deeplinks. Creating an app locally with capacitor is going fine.

If it is of any use, here is my capconfigts

import { CapacitorConfig } from '@capacitor/cli'

const config: CapacitorConfig = {
    appId: 'xxxxxxxxx',
    appName: 'xxxxxxxxx',
    webDir: 'www',
    bundledWebRuntime: false,
    server: {
        iosScheme: 'ionic'
    },
    cordova: {
        preferences: {
            ScrollEnabled: 'false',
            'android-minSdkVersion': '23',
            'android-targetSdkVersion': '30',
            BackupWebStorage: 'none',
            'cordova.plugins.diagnostic.modules':
                'LOCATION BLUETOOTH WIFI CAMERA NOTIFICATIONS MICROPHONE CONTACTS CALENDAR REMINDERS MOTION NFC EXTERNAL_STORAGE'
        }
    },
    plugins: {
        SplashScreen: {
            launchAutoHide: false,
            androidScaleType: 'CENTER_CROP'
        }
    }
}

export default config

and here is the packagejson

{
  "name": "xxxxxxxxxxxxxxxx",
  "version": "1.3.1",
  "author": "xxxxxxxxxxxx",
  "homepage": "",
  "scripts": {
    "ng": "ng",
    "build": "ng build",
    "start": "ionic serve --lab",
    "serve": "ng serve --open",
    "test": "jest",
    "test:debug": "jest --detectOpenHandles --watch",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build-android-dev": "ionic cap sync android",
    "build-android-prod": "ionic cap sync android --prod",
    "build-ios-dev": "ionic cap sync ios",
    "build-ios-prod": "ionic cap sync ios --prod",
    "resources": "cordova-res ios --skip-config --copy && cordova-res android --skip-config --copy",    
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^11.2.14",
    "@angular/cdk": "^11.2.13",
    "@angular/common": "^11.2.14",
    "@angular/core": "^11.2.14",
    "@angular/forms": "^11.2.14",
    "@angular/platform-browser": "^11.2.14",
    "@angular/platform-browser-dynamic": "^11.2.14",
    "@angular/router": "^11.2.14",
    "@capacitor/android": "^3.0.0",
    "@capacitor/angular": "^1.0.3",
    "@capacitor/app": "^1.0.0",
    "@capacitor/camera": "^1.0.1",
    "@capacitor/core": "3.0.0",
    "@capacitor/device": "^1.0.0",
    "@capacitor/filesystem": "^1.0.0",
    "@capacitor/geolocation": "^1.0.1",
    "@capacitor/haptics": "^1.0.0",
    "@capacitor/ios": "^3.0.0",
    "@capacitor/keyboard": "^1.0.0",
    "@capacitor/network": "^1.0.0",
    "@capacitor/splash-screen": "^1.0.0",
    "@capacitor/status-bar": "^1.0.0",
    "@ionic-native/android-permissions": "^5.28.0",
    "@ionic-native/barcode-scanner": "^5.33.1",
    "@ionic-native/core": "^5.28.0",
    "@ionic-native/date-picker": "^5.28.0",
    "@ionic-native/deeplinks": "^5.28.0",
    "@ionic-native/file": "5.26.0",
    "@ionic-native/file-path": "5.26.0",
    "@ionic-native/ionic-webview": "^5.28.0",
    "@ionic-native/photo-viewer": "^5.28.0",
    "@ionic/angular": "^5.3.2",
    "@ionic/storage": "^3.0.4",
    "@ionic/storage-angular": "^3.0.6",
    "@ngrx/effects": "^8.6.0",
    "@ngrx/store": "^8.6.0",
    "@ngrx/store-devtools": "^8.6.0",
    "com-sarriaroman-photoviewer": "^1.2.5",
    "cordova-plugin-android-permissions": "^1.1.0",
    "cordova-plugin-androidx-adapter": "^1.1.3",
    "cordova-plugin-datepicker": "^0.9.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-filepath": "^1.5.8",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-sqlite-storage": "^6.0.0",
    "crypto-js": "^3.3.0",
    "ion2-calendar": "^3.0.0-rc.0",
    "ionic-plugin-deeplinks": "^1.0.20",
    "ionic-selectable": "^4.7.1",
    "jetifier": "^2.0.0",
    "localforage-cordovasqlitedriver": "^1.8.0",
    "moment": "^2.27.0",
    "monet": "^0.9.1",
    "ng2-file-upload": "1.4.0",
    "phonegap-plugin-barcodescanner": "^8.1.0",
    "ramda": "^0.26.1",
    "rxjs": "^6.6.3",
    "stacktrace-js": "^2.0.2",
    "ts-md5": "1.2.4",
    "tslib": "^2.0.0",
    "zone.js": "^0.10.3"
  },
  "devDependencies": {
    "@angular-builders/jest": "^10.0.0",
    "@angular-devkit/architect": "^0.1102.14",
    "@angular-devkit/build-angular": "^0.1102.14",
    "@angular-devkit/core": "^11.2.14",
    "@angular-devkit/schematics": "^11.2.14",
    "@angular/cli": "^11.2.14",
    "@angular/compiler": "^11.2.14",
    "@angular/compiler-cli": "^11.2.14",
    "@angular/language-service": "~11.2.14",
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@babel/preset-env": "^7.11.5",
    "@babel/preset-typescript": "^7.10.4",
    "@capacitor/cli": "3.0.0",
    "@ionic/angular-toolkit": "^2.3.3",
    "@ionic/lab": "^3.2.10",
    "@ngneat/spectator": "^5.13.3",
    "@types/crypto-js": "^3.1.47",
    "@types/jest": "^26.0.13",
    "@types/jsdom": "^12.2.4",
    "@types/node": "^12.12.55",
    "@types/ramda": "0.27.34",
    "codelyzer": "^6.0.0",
    "jest": "^26.4.2",
    "jest-preset-angular": "^8.3.1",
    "ng-mocks": "^11.11.2",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.3",
    "typescript": "^4.0.2"
  },
  "description": "xxxxxxxxxxxxx",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-datepicker": {},
      "cordova-plugin-file": {},
      "com-sarriaroman-photoviewer": {},
      "cordova-plugin-android-permissions": {},
      "cordova.plugins.diagnostic": {
        "ANDROIDX_VERSION": "1.+"
      },
      "cordova-plugin-filepath": {},
      "cordova-sqlite-storage": {},
      "ionic-plugin-deeplinks": {
        "URL_SCHEME": "ceapp",
        "DEEPLINK_SCHEME": "https",
        "DEEPLINK_HOST": "costengineering.eu",
        "ANDROID_PATH_PREFIX": "/",
        "ANDROID_2_PATH_PREFIX": "/",
        "ANDROID_3_PATH_PREFIX": "/",
        "ANDROID_4_PATH_PREFIX": "/",
        "ANDROID_5_PATH_PREFIX": "/",
        "DEEPLINK_2_SCHEME": " ",
        "DEEPLINK_2_HOST": " ",
        "DEEPLINK_3_SCHEME": " ",
        "DEEPLINK_3_HOST": " ",
        "DEEPLINK_4_SCHEME": " ",
        "DEEPLINK_4_HOST": " ",
        "DEEPLINK_5_SCHEME": " ",
        "DEEPLINK_5_HOST": " "
      },
      "cordova-plugin-androidx-adapter": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }
}

I have the same issue, using latest of everything I can find…

"@capacitor/android": "3.1.1",
"@capacitor/app": "1.0.2",
"@capacitor/core": "^3.1.1",
"@capacitor/haptics": "1.0.2",
"@capacitor/ios": "3.1.1",
"@capacitor/keyboard": "1.0.2",
"@capacitor/status-bar": "1.0.2",
"@ionic/react": "^5.6.11",
"@ionic/react-router": "^5.6.11",

Solved for me, we had unresolved environment vars, so the build path was incorrect

@JohnQuby Which environment vars were unresolved?

PLATFORM, IOS_ID, etc., I was not aware of the Environment vars in AppFlow

Where i config Environment vars? Please

Under Automate you will see Environments

the issue is still here for me

I don’t use Environment vars, I have a blank new ionic project ( created this morning ) and yet the project doesn’t work in app flow, telling me to update to capacitor 3…

Under Automate you will see Environments Thank you for your information

A similar error happened on Appflow when you didn’t have iOS platform added.
Should be good if you update to @capacitor/cli 3.3.1 or newer

I had this issue because the capacitor config file was a TS file. Converting it to Json solved the issue for me.

1 Like