Error : Error getting access token for service account: Remote host terminated the handshake, iss:
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- firebase, java
- Domain
- authentication, backend
Research direction
The only entry point shown is getAccessToken(), which reads service-account.json and calls refreshIfExpired(). Start by reproducing the handshake failure and checking the Maven JARs and runtime or network setup; done requires a confirmed cause and verified access-token retrieval.
Written by the indexing model from the issue text.
Description
I'm using below Java snippet to get the Authentication token for Firebase Messaging. But its throwing error during refreshIfExpired method call.
private static String getAccessToken() throws IOException {
String[] SCOPES = {"https://www.googleapis.com/auth/firebase.messaging"};
GoogleCredentials googleCredentials = GoogleCredentials.fromStream(new FileInputStream("./src/service-account.json")).createScoped(Arrays.asList(SCOPES));
//googleCredentials.refresh();
try {
googleCredentials.getAuthenticationType();
googleCredentials.refreshIfExpired();
} catch (IOException e) {
e.printStackTrace();
}
return googleCredentials.getAccessToken().getTokenValue();
}
When i remove refreshIfExpired and call getAccessToken directly also same error is coming. Any suggestion. Are these related to jars? As i have uploaded certain jars downloaded from Maven as i do not find anything on google firebase link.
Error at refreshIfExpired step: Error getting access token for service account: Remote host terminated the handshake, iss: firebase-adminsdk-jnf15@***
- Dominant language
- Java
- Stars
- 241
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/quickstart-java
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
firebase/quickstart-java#50 ·
-
outdated Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
firebase/quickstart-java#41 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
firebase/quickstart-java#32 · 3 comments ·
-
Admin SDK example Open
firebase/quickstart-java#31 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
firebase/quickstart-java#28 · 2 comments ·
All issues in firebase/quickstart-java
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100