I have a Node.js application that's deployed via App Engine in a Flex environment. I've been getting the error below when I try to create a Google Cloud task from within the app using the createTask method. If I deploy another AppEngine version, this problem goes away but returns a day or so later. Any insights on to why this is suddenly breaking?
NodeJS Version: 20
@Google-cloud/tasks Version: 5.5.0
Error: Invalid response from metadata service: incorrect Metadata-Flavor header.
at metadataAccessor (/workspace/node_modules/gcp-metadata/build/src/index.js:120:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async GoogleAuth.getUniverseDomainFromMetadataServer (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:169:30)
at async GoogleAuth.getApplicationDefaultAsync (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:266:21)
at async GoogleAuth.getClient (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:695:17)
at async GrpcClient._getCredentials (/workspace/node_modules/google-gax/build/src/grpc.js:145:24)
at async GrpcClient.createStub (/workspace/node_modules/google-gax/build/src/grpc.js:318:23)
ℹ️A workaround is available in this github issue