tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

Cloud build service not working

Open violuke opened this issue 3 years ago • 8 comments

Problem description

Cloud build not working for Android (iOS not tested)

Expected behavior

Build to succeed

Environment

  • Tabris.js version: npm latest

Logs snippet

No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /home/travis/build/eclipsesource/tabris-js-build-template/build/build/cordova/platforms/android/app/src/main/res/xml/config.xml
config file *-Info.plist requested for changes not found at /home/travis/build/eclipsesource/tabris-js-build-template/build/build/cordova/platforms/android/*-Info.plist, ignoring
Merging project's config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
Wrote out android application name "REDACTED" to /home/travis/build/eclipsesource/tabris-js-build-template/build/build/cordova/platforms/android/app/src/main/res/values/strings.xml
Cannot read property 'find' of null
TypeError: Cannot read property 'find' of null
    at /home/travis/build/eclipsesource/tabris-js-build-template/build/node_modules/cordova-android/lib/prepare.js:387:49
    at Array.forEach ()
    at updateProjectSplashScreen (/home/travis/build/eclipsesource/tabris-js-build-template/build/node_modules/cordova-android/lib/prepare.js:384:7)
    at updateProjectAccordingTo (/home/travis/build/eclipsesource/tabris-js-build-template/build/node_modules/cordova-android/lib/prepare.js:269:5)
    at /home/travis/build/eclipsesource/tabris-js-build-template/build/node_modules/cordova-android/lib/prepare.js:67:21
    at async Promise.all (index 0)
The command /home/travis/.tabris-cli/cordova/9.0.0/node_modules/.bin/cordova exited with 1
Warning: Command failed: tabris build android  --release --device --verbose --cordova-build-config="../../../tabrisBuildConfig.json"  -- --packageType=bundle
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=14.0.0"} (current: {"node":"12.22.12","npm":"6.14.16"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN [email protected] requires a peer of tabris@^3.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
Cannot read property 'find' of null
The command /home/travis/.tabris-cli/cordova/9.0.0/node_modules/.bin/cordova exited with 1
 Use --force to continue.
Aborted due to warnings.
travis_time:end:0cbf2cf8:start=1660561238116710003,finish=1660561293647739433,duration=55531029430,event=script
The command "grunt build deploy" exited with 6.
Done. Your build exited with 1.

Please can you help.

violuke avatar Aug 15 '22 11:08 violuke

  • Tabris.js version: npm latest

...is not specific enough. Can you post the exact version from your package-lock.json?

If you're using the nightlies You might also try building against an older version that worked, assuming you know which version introduced the particular feature you are depending on.

cookieguru avatar Aug 16 '22 05:08 cookieguru

The latest build attempt is 3.9.0-dev.20220807. We've been on nightly a for ages, to be honest.

package-lock.json extract

    "node_modules/tabris": {
      "version": "3.9.0-dev.20220807",
      "resolved": "https://registry.npmjs.org/tabris/-/tabris-3.9.0-dev.20220807.tgz",
      "integrity": "sha512-xwoYieWiCJi6znKDnWCXSV5DlTHoEh0vHyTr2kUA/Ppec22yNxUBkEb1vkF6rtt2DAyCVzalvAYYY+7cfAVh0A=="
    },

I also had to add

    "cordova-android": "^11.0.0",
    "cordova-common": "^4.0.2",

to the package.json dependencies to get this far, I've never needed this for a build before.

Here is my current complete package.json dependencies

  "dependencies": {
    "cordova-android": "^11.0.0",
    "cordova-common": "^4.0.2",
    "cordova-plugin-app-review": "^2.0.3",
    "cordova-plugin-flashlight": "^3.2.0",
    "cordova-plugin-media": "^5.0.4",
    "cordova-plugin-vibration": "^3.1.1",
    "js-base64": "^3.7.2",
    "tabris": "^3.9.0-dev.20220807",
    "tabris-decorators": "3.8.*",
    "tabris-plugin-barcode-scanner": "^3.0.0"
  },
  "devDependencies": {
    "tslint": "^5.20.1",
    "typescript": "3.8.x"
  }

violuke avatar Aug 16 '22 13:08 violuke

And news on this? This is still broken.

violuke avatar Sep 07 '22 13:09 violuke

Screenshot 2022-09-07 at 14 33 03

violuke avatar Sep 07 '22 13:09 violuke

I see this in your log:

[email protected] requires a peer of tabris@^3.8.0 but none is installed. You must install peer dependencies yourself

Do you have tabris in your package.json file? Is it at or above 3.8.0?

cookieguru avatar Sep 08 '22 08:09 cookieguru

Thanks for looking at this.

Yes, I do have tabris in the package.json. Please see attached the package.json.txt and package-lock.json.txt that correspond with the build in that screenshot.

Additionally, I can build locally by using this Dockerfile.txt without an issue (based upon https://github.com/eclipsesource/tabris-js-hello-world/blob/master/Dockerfile) which I think points to the issue being the cloud build service, not my project. It's probably worth noting that my Dockerfile installs node 16 and the master tabris-js-cli, not the outdated last release to npm.

(I had to add the .txt extension to all attachments as otherwise GitHub rejected them from being uploaded).

Thanks for your help.

violuke avatar Sep 08 '22 08:09 violuke

I should add that iOS builds without a problem on the cloud build service for the exact same code/repo that's failing with the above on Android.

violuke avatar Sep 08 '22 09:09 violuke

@violuke the tabris-android platform has just migrated the latest cordova-android 11 baseline. Please check again if this works for you.

mpost avatar Oct 10 '22 07:10 mpost