I’ve recently taken over development of an old project (started 5 years ago) setup in Google Cloud, it’s all new to me so forgive any incorrect terminology. It uses load balancing, a backend service which points to a VM. There is a React app that was working fine for over a year until 10/13/25 when all of a sudden it started showing 502 errors when trying to load the application. No changes were made by us that I am aware of with regards to this app, I’ve been making changes to a React Native phone app and various things associated with the developer accounts, but nothing on that day. It also started failing its health checks a day or so after that. Looking at the monitoring graph for the load balancer I saw the traffic is now being routed to INVALID_BACKEND.
Looking through some of the logs for the VM I came across the first occurrence of the error on 10/13 and looking into the details I see the following excerpts from the same error message:
message: “Error waiting for task (attempt 1 of 10): rpc error: code = Unavailable desc = 502:Bad Gateway”
resource: {
labels: {3}
type: “gce_instance”
}
severity: “WARNING”
logName: “XXXXXXX/logs/OSConfigAgent”
sourceLocation: {
file: “agentendpoint.go”
function: “github.com/GoogleCloudPlatform/osconfig/agentendpoint.(*Client).WaitForTaskNotification.func1”
line: “414”
}
Looking in that code in GitHub i see some reference to and error message "No service account set for instance.” however there is a service account set which is being used on another server and all the permissions appear to be the same. I’ve checked everything I can find to look at and am not sure where else to look.
before i found the above messages I was also seeing the following in the same VM logs:
“message”: “Error watching metadata: invalid character ‘<’ looking for beginning of value”,
“logName”: “XXXXXXXXX/logs/GCEGuestAgent”,
“sourceLocation”: {
“file”: “metadata.go”,
“line”: “74”,
“function”: “github.com/GoogleCloudPlatform/guest-agent/google_guest_agent/events/metadata.(*Watcher).Run”
Can anyone provide some guidance? Any help is much appreciated.