microsoft / appcenter-cli

Command-line Interface (CLI) for Visual Studio App Center
https://appcenter.ms/
MIT License
581 stars 234 forks source link

Getting "error: ';' expected" all of the sudden when running "appcenter codepush release-react" #2469

Closed allengong-drizly closed 7 months ago

allengong-drizly commented 8 months ago

Description

Please describe the issue you are facing using the CLI.

When i tried to run my usual codepush commands: yarn appcenter codepush release-react -a #{app_name} -d #{app_version.capitalize} -o build/staging/#{platform} -s build/staging/#{platform}/CodePush/#{source_map_name}

I am getting the following error (I added DEBUG="appcenter-cli:*" before the command to see more details). I have not change anything in our repo, and I have success in codepushing before the New Year. So this new error is popping up out of no where, there is absolutely no linter errors. Error for iOS (android is the same):

build/staging/ios/CodePush/main.jsbundle:1019:39: error: ';' expected
`;var t=e.TEST_INFO_FRAGMENT=0,r(d[0]).gql`
                                      ^
  appcenter-cli:commands:codepush:release-react Failed to release a CodePush update - Error: "hermes" command failed (exitCode=2, signal=null).
  appcenter-cli:commands:codepush:release-react     at ChildProcess.<anonymous> (/Users/my.name/Apps/repo_name/node_modules/appcenter-cli/dist/commands/codepush/lib/react-native-utils.js:309:28)
  appcenter-cli:commands:codepush:release-react     at ChildProcess.emit (node:events:517:28)
  appcenter-cli:commands:codepush:release-react     at maybeClose (node:internal/child_process:1098:16)
  appcenter-cli:commands:codepush:release-react     at ChildProcess._handle.onexit (node:internal/child_process:303:5) +0ms
Error: Failed to release a CodePush update.
error Command failed with exit code 3.     

Repro Steps

Please list the steps used to reproduce your issue.

  1. Ran yarn appcenter codepush release-react -a #{app_name} -d #{app_version.capitalize} -o build/staging/#{platform} -s build/staging/#{platform}/CodePush/#{source_map_name}

Expected behavior

A clear and concise description of what you expected to happen.

The codepush should not fail

Details

  1. Is there a particular beacon/command that you are having trouble with?
    • appcenter codepush release-react
  2. Which version of the App Center CLI are you using?
    • tried 2.12.0 through 2.14.0
  3. Which OS version did you experience the issue on?
    • MacOS Sonoma 14.2.1 (23C71)
  4. What command line/shell are you using?
    • zsh
  5. What version of Node.js and NPM/Yarn are you using?
    • node v18.19.0, npm 10.2.3, also tried Node v16 and node v20
  6. Additionally, you can provide verbose logs of a CLI command by using DEBUG="appcenter-cli:*" before the command, for example, DEBUG="appcenter-cli:*" appcenter apps list. Include the logs here, don't forget to omit any personal/sensitive data.
    build/staging/ios/CodePush/main.jsbundle:1019:39: error: ';' expected
    `;var t=e.TEST_INFO_FRAGMENT=0,r(d[0]).gql`
                                      ^
    appcenter-cli:commands:codepush:release-react Failed to release a CodePush update - Error: "hermes" command failed (exitCode=2, signal=null).
    appcenter-cli:commands:codepush:release-react     at ChildProcess.<anonymous> (/Users/my.name/Apps/repo_name/node_modules/appcenter-cli/dist/commands/codepush/lib/react-native-utils.js:309:28)
    appcenter-cli:commands:codepush:release-react     at ChildProcess.emit (node:events:517:28)
    appcenter-cli:commands:codepush:release-react     at maybeClose (node:internal/child_process:1098:16)
    appcenter-cli:commands:codepush:release-react     at ChildProcess._handle.onexit (node:internal/child_process:303:5) +0ms
    Error: Failed to release a CodePush update.
    error Command failed with exit code 3.     
MikhailSuendukov commented 8 months ago

Hi @allengong-drizly and thanks for reaching us out. I was unable to reproduce this error, and I think that the issue may be in the code of your project, so it would be very useful for us if you could provide us with a small demo application that reproduces this error.

AnatolyPristensky commented 7 months ago

We haven't heard from you for a while, so I'm closing this issue. Please, feel free to reopen It in case of new information.