android / play-billing-samples

Samples for Google Play In-app Billing
Apache License 2.0
2.38k stars 1.34k forks source link

ClassyTaxiServer deploy failed with non-zero exit code 2 #643

Open kexuejin opened 11 months ago

kexuejin commented 11 months ago

[2023-10-13T08:47:17.496Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] [2023-10-13T08:47:17.497Z] > authorizing via signed-in user (*****@gmail.com) [2023-10-13T08:47:17.498Z] [iam] checking project classytaxi-fe477 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"] [2023-10-13T08:47:17.500Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/classytaxi-fe477:testIamPermissions [none] [2023-10-13T08:47:17.500Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/classytaxi-fe477:testIamPermissions x-goog-quota-user=projects/classytaxi-fe477 [2023-10-13T08:47:17.501Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/classytaxi-fe477:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]} [2023-10-13T08:47:19.479Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/classytaxi-fe477:testIamPermissions 200 [2023-10-13T08:47:19.479Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/classytaxi-fe477:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]} [2023-10-13T08:47:19.479Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/classytaxi-fe477/serviceAccounts/classytaxi-fe477@appspot.gserviceaccount.com:testIamPermissions [none] [2023-10-13T08:47:19.480Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/classytaxi-fe477/serviceAccounts/classytaxi-fe477@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]} [2023-10-13T08:47:21.375Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/classytaxi-fe477/serviceAccounts/classytaxi-fe477@appspot.gserviceaccount.com:testIamPermissions 200 [2023-10-13T08:47:21.376Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/classytaxi-fe477/serviceAccounts/classytaxi-fe477@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}

=== Deploying to 'classytaxi-fe477'...

i deploying functions Running command: npm --prefix "$RESOURCE_DIR" run lint

lint tslint --project tsconfig.json

/bin/sh: --: invalid option Usage: /bin/sh [GNU long option] [option] ... /bin/sh [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option

Error: functions predeploy error: Command terminated with non-zero exit code 2

i try many times, but cannot deploy successfully.

matale commented 11 months ago

Are you on Windows? The firebase.json file is so old in this code that it doesn't work on windows.

A possible fix is to change firebase.json to this

{
  "functions": {
    "predeploy": [
      "npm --prefix \"functions\" run lint",
      "npm --prefix \"functions\" run build"
    ],
    "source": "."
  },
  "hosting": {
    "public": "webapp",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": []
  }
}

Also see:

https://github.com/firebase/firebase-tools/issues/610 https://stackoverflow.com/questions/50915952/firebase-cloud-function-deploy-tslint-error

kexuejin commented 11 months ago

Thanks for your reply, but i deploy it on mac.

matale commented 11 months ago

Try it anyway. Last option create a brand new firebase project using the firebase cli then just copy over the code files and not the config files.