App build failed on Appcenter but build on local app

94 Views Asked by At
##[section]Starting: Build
##[section]Starting: Initialize job
Agent name: 'Hosted Agent'
Agent machine name: 'Mac-1706533300120'
Current agent version: '3.232.3'
##[group]Operating System
macOS
11.7.10
20G1427
##[endgroup]
##[group]Runner Image
Image: macos-11
Version: 20240113.1
##[endgroup]
##[group]Runner Image Provisioner
2.0.329.1+b3ad46f283ae2edf89fbf23e452357fca7144186
##[endgroup]
Current image version: '20240113.1'
Agent running as: 'runner'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: PowerShell (2.232.1)
Downloading task: Bash (3.231.5)
Downloading task: CmdLine (1.1.3)
Downloading task: CmdLine (2.231.1)
Downloading task: ShellScript (2.231.1)
Downloading task: Gradle (1.128.0)
Downloading task: CopyFiles (2.231.1)
Downloading task: PublishBuildArtifacts (1.231.1)
Checking job knob settings.
   Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
   Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
   Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
   Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
   Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
   Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
   Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
Finished checking job knob settings.
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Async Command Start: DetectDockerContainer
##[section]Async Command End: DetectDockerContainer
##[section]Async Command Start: DetectDockerContainer
##[section]Async Command End: DetectDockerContainer
##[section]Starting: Checkout legoMobileApp@legoCall to s
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Syncing repository: legoMobileApp (ExternalGit)
##[command]git version
git version 2.43.0
##[command]git lfs version
git-lfs/3.4.1 (GitHub; darwin amd64; go 1.21.6)
##[command]git init "/Users/runner/work/1/s"
hint: Using 'master' as the name for the initial branch. This default branch name
Initialized empty Git repository in /Users/runner/work/1/s/.git/
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>

##[command]git config gc.auto 0

##[command]git config --get-all http.extraheader
##[command]git config --get-regexp .*extraheader
##[command]git config --get-all http.proxy
##[command]git config http.version HTTP/1.1
##[command]git remote set-url origin
Updated Git hooks.
Git LFS initialized.progress --no-recurse-submodules origin
remote: Enumerating objects: 50600, done.        
remote: Counting objects:   0% (1/12166)        
remote: Counting objects:   1% (122/12166)        
remote: Counting objects:   2% (244/12166)        
remote: Counting objects:   3% (365/12166)        
remote: Counting objects:   4% (487/12166)        
remote: Counting objects:   5% (609/12166)        
remote: Counting objects:   6% (730/12166)        
remote: Counting objects:   7% (852/12166)        
remote: Counting objects:   8% (974/12166)        
remote: Counting objects:   9% (1095/12166)        
remote: Counting objects:  10% (1217/12166)        
remote: Counting objects:  11% (1339/12166)        
remote: Counting objects:  12% (1460/12166)        
remote: Counting objects:  13% (1582/12166)        
remote: Counting objects:  14% (1704/12166)        
remote: Counting objects:  15% (1825/12166)        
remote: Counting objects:  16% (1947/12166)        
remote: Counting objects:  17% (2069/12166)        
remote: Counting objects:  18% (2190/12166)        
remote: Counting objects:  19% (2312/12166)        
remote: Counting objects:  20% (2434/12166)        
remote: Counting objects:  21% (2555/12166)        
remote: Counting objects:  22% (2677/12166)        
remote: Counting objects:  23% (2799/12166)        
remote: Counting objects:  24% (2920/12166)        
remote: Counting objects:  25% (3042/12166)        
remote: Counting objects:  26% (3164/12166)        
remote: Counting objects:  27% (3285/12166)        
remote: Counting objects:  28% (3407/12166)        
remote: Counting objects:  29% (3529/12166)        
remote: Counting objects:  30% (3650/12166)        
remote: Counting objects:  31% (3772/12166)        
remote: Counting objects:  32% (3894/12166)        
remote: Counting objects:  33% (4015/12166)        
remote: Counting objects:  34% (4137/12166)        
remote: Counting objects:  35% (4259/12166)        
remote: Counting objects:  36% (4380/12166)        
remote: Counting objects:  37% (4502/12166)        
remote: Counting objects:  38% (4624/12166)        
remote: Counting objects:  39% (4745/12166)        
remote: Counting objects:  40% (4867/12166)        
remote: Counting objects:  41% (4989/12166)        
remote: Counting objects:  42% (5110/12166)        
remote: Counting objects:  43% (5232/12166)        
remote: Counting objects:  44% (5354/12166)        
remote: Counting objects:  45% (5475/12166)        
remote: Counting objects:  46% (5597/12166)        
remote: Counting objects:  47% (5719/12166)        
remote: Counting objects:  48% (5840/12166)        
remote: Counting objects:  49% (5962/12166)        
remote: Counting objects:  50% (6083/12166)        
remote: Counting objects:  51% (6205/12166)        
remote: Counting objects:  52% (6327/12166)        
remote: Counting objects:  53% (6448/12166)        
remote: Counting objects:  54% (6570/12166)        
remote: Counting objects:  55% (6692/12166)        
remote: Counting objects:  56% (6813/12166)        
remote: Counting objects:  57% (6935/12166)        
remote: Counting objects:  58% (7057/12166)        
remote: Counting objects:  59% (7178/12166)        
remote: Counting objects:  60% (7300/12166)        
remote: Counting objects:  61% (7422/12166)        
remote: Counting objects:  62% (7543/12166)        
remote: Counting objects:  63% (7665/12166)        
remote: Counting objects:  64% (7787/12166)        
remote: Counting objects:  65% (7908/12166)        
remote: Counting objects:  66% (8030/12166)        
remote: Counting objects:  67% (8152/12166)        
remote: Counting objects:  68% (8273/12166)        
remote: Counting objects:  69% (8395/12166)        
remote: Counting objects:  70% (8517/12166)        
remote: Counting objects:  71% (8638/12166)        
remote: Counting objects:  72% (8760/12166)        
remote: Counting objects:  73% (8882/12166)        
remote: Counting objects:  74% (9003/12166)        
remote: Counting objects:  75% (9125/12166)        
remote: Counting objects:  76% (9247/12166)        
remote: Counting objects:  77% (9368/12166)        
remote: Counting objects:  78% (9490/12166)        
remote: Counting objects:  79% (9612/12166)        
remote: Counting objects:  80% (9733/12166)        
remote: Counting objects:  81% (9855/12166)        
remote: Counting objects:  82% (9977/12166)        
remote: Counting objects:  83% (10098/12166)        
remote: Counting objects:  84% (10220/12166)        
remote: Counting objects:  85% (10342/12166)        
remote: Counting objects:  86% (10463/12166)        
remote: Counting objects:  87% (10585/12166)        
remote: Counting objects:  88% (10707/12166)        
remote: Counting objects:  89% (10828/12166)        
remote: Counting objects:  90% (10950/12166)        
remote: Counting objects:  91% (11072/12166)        
remote: Counting objects:  92% (11193/12166)        
remote: Counting objects:  93% (11315/12166)        
remote: Counting objects:  94% (11437/12166)        
remote: Counting objects:  95% (11558/12166)        
remote: Counting objects:  96% (11680/12166)        
remote: Counting objects:  97% (11802/12166)        
remote: Counting objects:  98% (11923/12166)        
remote: Counting objects:  99% (12045/12166)        
remote: Counting objects: 100% (12166/12166)        
remote: Counting objects: 100% (12166/12166), done.        
remote: Compressing objects: 100% (3165/3165), done.        
Receiving objects:  99% (50094/50600), 142.87 MiB | 30.60 MiB/s
remote: Total 50600 (delta 9258), reused 11546 (delta 8741), pack-reused 38434        
Receiving objects: 100% (50600/50600), 150.80 MiB | 31.44 MiB/s, done.
Resolving deltas: 100% (37224/37224), done.
Updating files:  92% (1419/1542)
Updating files:  93% (1435/1542)
Updating files:  94% (1450/1542)
Updating files:  95% (1465/1542)
Updating files:  96% (1481/1542)
Updating files:  97% (1496/1542)
Updating files:  98% (1512/1542)
Updating files:  99% (1527/1542)
Updating files: 100% (1542/1542)
Updating files: 100% (1542/1542), done.
HEAD is now at a0a1bbc9 gradlew changes
##[command]git submodule sync --recursive
##[command]git submodule update --init --force --recursive
##[command]git config --unset-all remote.origin.lfsurl
##[command]git config --unset-all remote.origin.lfspushurl
##[section]Finishing: Checkout legoMobileApp@legoCall to s
##[section]Starting: Install build scripts
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.232.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
[command]/usr/local/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/Users/runner/work/_temp/2d00ab32-f147-4220-a8b8-03ba98821b0e.ps1'
Reinstalling Gradle init script plugins from /Users/runner/runners/3.232.3/scripts/gradle-init-script-plugins...

##[section]Finishing: Install build scripts
##[section]Starting: Select Node.js Version v2
==============================================================================
Task         : Bash
Description  : Run a Bash script on macOS, Linux, or Windows
Version      : 3.231.5
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
==============================================================================
Generating script.
Formatted command: exec bash '/Users/runner/runners/3.232.3/scripts/select-node-version.sh' node18
========================== Starting Command Output ===========================
[command]/bin/bash /Users/runner/work/_temp/8b8fbace-4536-4f9a-beb8-5e3f612c1551.sh
Loading NVM.
v18.19.0 is already installed.
Now using node v18.19.0 (npm v10.2.3)
default -> v18.19.0 *
Node version: v18.19.0
npm version: 10.2.3

##[section]Finishing: Select Node.js Version v2
##[section]Starting: yarn/npm install
==============================================================================
Task         : Command Line
Description  : Run a command line with arguments
Version      : 1.1.3
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
==============================================================================
[command]/bin/sh -c if [ -f yarn.lock ]; then { yarn install --network-timeout=600000 && yarn list --depth=0; } else npm install; fi
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2139) Warning: Use Cipheriv for counter mode of aes-256-ctr
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@sentry/react-native > @sentry/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 17.x".
warning "apollo-link-token-refresh > [email protected]" has unmet peer dependency "@types/node@*".
warning " > [email protected]" has incorrect peer dependency "react-native@^0.41.2 || ^0.57.0 || ^0.68.0 || ^0.70.0".
warning " > [email protected]" has incorrect peer dependency "react-native-svg@^6.2.1||^7.0.3".
[4/4] Building fresh packages...
error /Users/runner/work/1/s/node_modules/postinstall-postinstall: Command failed.
Exit code: 1
Command: node ./run.js
Arguments: 
Directory: /Users/runner/work/1/s/node_modules/postinstall-postinstall
Output:
error Command failed with exit code 1.
node:child_process:965
    throw err;
    ^

Error: Command failed: yarn run postinstall
error Command failed with exit code 1.

    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at Object.<anonymous> (/Users/runner/work/1/s/node_modules/postinstall-postinstall/run.js:15:5)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(2234) [Uint8Array] [
      121,  97, 114, 110,  32, 114, 117, 110,  32, 118,  49,  46,
       50,  50,  46,  49,  57,  10,  36,  32, 112,  97, 116,  99,
      104,  45, 112,  97,  99, 107,  97, 103, 101,  10, 112,  97,
      116,  99, 104,  45, 112,  97,  99, 107,  97, 103, 101,  32,
       56,  46,  48,  46,  48,  10,  65, 112, 112, 108, 121, 105,
      110, 103,  32, 112,  97, 116,  99, 104, 101, 115,  46,  46,
       46,  10,  64, 114, 101,  97,  99, 116,  45, 110,  97, 116,
      105, 118, 101,  45,  99, 111, 109, 109, 117, 110, 105, 116,
      121,  47, 115, 108,
      ... 2134 more items
    ],
    Buffer(39) [Uint8Array] [
      101, 114, 114, 111, 114,  32,  67, 111,
      109, 109,  97, 110, 100,  32, 102,  97,
      105, 108, 101, 100,  32, 119, 105, 116,
      104,  32, 101, 120, 105, 116,  32,  99,
      111, 100, 101,  32,  49,  46,  10
    ]
  ],
  pid: 2256,
  stdout: Buffer(2234) [Uint8Array] [
    121,  97, 114, 110,  32, 114, 117, 110,  32, 118,  49,  46,
     50,  50,  46,  49,  57,  10,  36,  32, 112,  97, 116,  99,
    104,  45, 112,  97,  99, 107,  97, 103, 101,  10, 112,  97,
    116,  99, 104,  45, 112,  97,  99, 107,  97, 103, 101,  32,
     56,  46,  48,  46,  48,  10,  65, 112, 112, 108, 121, 105,
    110, 103,  32, 112,  97, 116,  99, 104, 101, 115,  46,  46,
     46,  10,  64, 114, 101,  97,  99, 116,  45, 110,  97, 116,
    105, 118, 101,  45,  99, 111, 109, 109, 117, 110, 105, 116,
    121,  47, 115, 108,
    ... 2134 more items
  ],
  stderr: Buffer(39) [Uint8Array] [
    101, 114, 114, 111, 114,  32,  67, 111,
    109, 109,  97, 110, 100,  32, 102,  97,
    105, 108, 101, 100,  32, 119, 105, 116,
    104,  32, 101, 120, 105, 116,  32,  99,
    111, 100, 101,  32,  49,  46,  10
  ]
}

Node.js v18.19.0
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
##[error]/bin/sh failed with return code: 1
##[error]/bin/sh failed with error: /bin/sh failed with return code: 1
##[section]Finishing: yarn/npm install
Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: succeeded()
Result: False

Skipping step due to condition evaluation.
Evaluating: and(succeeded(), startsWith(variables['appcenter_android_postprocess_output.mapping'], True))
Expanded: and(False, startsWith(variables['appcenter_android_postprocess_output.mapping'], True))
Result: False

##[section]Starting: Checkout legoMobileApp@legoCall to s
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: legoMobileApp (ExternalGit)
##[section]Finishing: Checkout legoMobileApp@legoCall to s
##[section]Starting: Finalize Job
Cleaning up task key
Start cleaning up orphan processes.
##[section]Finishing: Finalize Job
##[section]Finishing: Build

App build is working fine on my local mac but when i build with the appcenter getting the above error

using node 18 on local also setup same on the appcenter

openjdk 17.0.10 2024-01-16 LTS OpenJDK Runtime Environment Corretto-17.0.10.7.1 (build 17.0.10+7-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.10.7.1 (build 17.0.10+7-LTS, mixed mode, sharing)

setup java 17 on the variables as well on the app center

0

There are 0 best solutions below