1

We're trying to deploy firebase functions and we continuously have this error: The service has encountered an error during container import. Please try again late

Here's a video overview: https://www.loom.com/share/9afb2facb5e3461ebef74e7e802a2761

{
  "protoPayload": {
    "@type": "type.googleapis.com/google.cloud.audit.AuditLog",
    "status": {
      "code": 14,
      "message": "The service has encountered an error during container import. Please try again later"
    },
    "authenticationInfo": {},
    "serviceName": "cloudfunctions.googleapis.com",
    "methodName": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction",
    "resourceName": "projects/voypost-matching-prod/locations/europe-west3/functions/createFromJobPubSub"
  },
  "insertId": "-wq3kwnb2c",
  "resource": {
    "type": "cloud_function",
    "labels": {
      "project_id": "voypost-matching-prod",
      "function_name": "createFromJobPubSub",
      "region": "europe-west3"
    }
  },
  "timestamp": "2023-01-07T16:39:01.688761Z",
  "severity": "ERROR",
  "logName": "projects/voypost-matching-prod/logs/cloudaudit.googleapis.com%2Factivity",
  "operation": {
    "id": "operations/dm95cG9zdC1tYXRjaGluZy1wcm9kL2V1cm9wZS13ZXN0My9jcmVhdGVGcm9tSm9iUHViU3ViL0pOaGkxYW9zMWxj",
    "producer": "cloudfunctions.googleapis.com",
    "last": true
  },
  "receiveTimestamp": "2023-01-07T16:39:02.021123649Z"
}

As per this doc, it may be due to non-utf8 characters, but there are none (checked using https://stackoverflow.com/a/41741313 grep -axv '.*' ./lib/**/*.js)

It failed 3 times in a row and continues failing. And every time it fails on the same functions.

There is always only one deployment ongoing - we don't run multiple firebase functions deploy at the same time.

The original discussion is on their github, but we were refered here.

  • As it is suggested in github raise [Google support](https://cloud.google.com/build/docs/getting-support) as it requires internal logs for analyzing, which can only be accessible by engineering team – Roopa M Jan 10 '23 at 13:18
  • As I also mentioned on Github, it requires a premium support plan. So here I'm trying to look for workarounds already known by the community to fix this w/o spending money on fixing what is expected to work. – Nikita Sviridenko Jan 14 '23 at 18:12

1 Answers1

0

This has happened to me on projects with many cloud functions.

As a workaround I run a deploy command for that specific function, instead of the whole functions project.

firebase deploy --only functions:myFunctionName
gantonioid
  • 367
  • 1
  • 2
  • 15