使用FCM时,有时会遇到错误“ invalid_grant
”,描述为“ Invalid JWT: No valid verifier found for issuer.
”。在大多数情况下,它都有效,但是每个月我们都会多次遇到此问题(在UTC中):
Jun 5, 2018 6:00 PM
Jun 14, 2018 7:07 PM
Jun 21, 2018 4:40 AM
Jul 16, 2018 4:53 PM
Jul 16, 2018 8:35 AM
Jul 17, 2018 7:58 AM
Jul 24, 2018 4:27 AM
Aug 6, 2018 11:21 PM
我们调查了问题,但没有发现任何帮助。以下似乎是最相关的东西:
https://www.reddit.com/r/Firebase/comments/7xvvie/realtime_database_still_having_issues/ https://bugs.chromium.org/p/chromium/issues/detail?id=861527
都说这可能是服务器端的临时问题。
没有任何更改,我们使用的服务帐户密钥始终如一。 我们使用 google-auth-library 0.9.0 (java)。
堆栈跟踪的相关部分如下:
java.io.IOException: Error getting access token for service account:
at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:385)
at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:175)
at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:161)
at com.google.auth.Credentials.getRequestMetadata(Credentials.java:70)
...
Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Invalid JWT: No valid verifier found for issuer."
}
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1054)
at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:383)
...
问题的原因是什么?是客户端( google-auth-library )还是服务器端( FCM )?