The registration token is not a valid FCM registration token
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- csharp, firebase
- Área
- backend, mobile-dev
Línea de trabajo
Comienza con FirebaseMessaging.DefaultInstance.SendAllAsync en el código .NET reportado e inspecciona la reproducción vinculada PushNotificationPoC. Compara el origen del token y la configuración del proyecto de Firebase con el comportamiento reportado; se considera terminado cuando se reproduzca la discrepancia y se documente una causa o solución confirmada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I trying to send push notification through web APi .net core 7 where I have installed FirebaseAdmin Nuget packages version 2.4.0 and my configuration is
// Get the current directory and append the relative path to the JSON file
var serviceAccountKeyPath = System.IO.Path.Combine(Environment.CurrentDirectory, "serviceAccountKey.json");
// Initialize the default app
var defaultApp = FirebaseApp.Create(new AppOptions()
{
Credential = GoogleCredential.FromFile(serviceAccountKeyPath),
});
and I am sending message like below snippet
`var messages = new List();
foreach (var item in tokens.Split(','))
{
string trimmedToken = item.Trim();
// Create a message
var message = new Message
{
Notification = new Notification
{
Title = model.Title,
Body = model.Message,
},
Token = trimmedToken, // The device token of the recipient
};
messages.Add(message);
}
BatchResponse response = default;
try
{
response = await FirebaseMessaging.DefaultInstance.SendAllAsync(messages);
// Check for a successful response
if (response != null)
{
Console.WriteLine("Successfully sent message: " + response);
}
else
{
Console.WriteLine("FCM response is null.");
}
}
catch (FirebaseException ex)
{
Console.WriteLine("Error sending FCM message: " + ex.Message);
Console.WriteLine("Error code: " + ex.ErrorCode);
// Handle the error appropriately
}`
I am getting error saying
The registration token is not a valid FCM registration token
But same token I am sending using firebase console it is working fine
[REQUIRED] Step 2: Describe your environment
- Operating System version: Android 11
- Firebase AdminSDK version: 2.4.0
- Firebase Product: Push Notification
- .NET version: .net core 7
- OS: windows 11
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
- Create Xamarin forms application.
- Setup firebase Push notification plugin and android manifest.
- Get Token from refresh token if in debug or else token
- try to send Push Notification using Token.
- here you will get error
Relevant Code:
- Lenguaje dominante
- C#
- Estrellas
- 407
- Forks
- 147
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de firebase/firebase-admin-dotnet
-
AbstractFirebaseAuth.cs has a typo (accound/account)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoneeds-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
firebase/firebase-admin-dotnet#334 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
firebase/firebase-admin-dotnet#591 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
GetProjectId returns null on Compute Engine / Cloud Run with application default credentialsPosiblemente ocupada @lahirumaramba la tomó hace 4 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
firebase/firebase-admin-dotnet#588 ·
Los mantenedores suelen responder en 1 día
-
Sending FCM notification with Fids Return NotRegisteredQuizá libre de nuevo @yvonnep165 la tomó hace 81 días y no hay ningún pull request abierto. Abierto
firebase/firebase-admin-dotnet#534 · 5 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Sending MulticastMessage does not work after replacing Tokens with FidsQuizá libre de nuevo @Doris-Ge la tomó hace 109 días y no hay ningún pull request abierto. Abiertoapi: messaging
firebase/firebase-admin-dotnet#530 · 2 comentarios · 2 asignados ·
Los mantenedores suelen responder en 1 día
Todos los issues de firebase/firebase-admin-dotnet
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Facepunch/sbox-public#12305 ·
Los mantenedores suelen responder en 5 días
-
分享 JVC DVD+RW 4.7G (铼德代工) 实测标定预设Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#205 ·
Los mantenedores suelen responder en 1 día
-
bug keep-fresh
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Flow-Launcher/Flow.Launcher#4744 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
flyingpie/windows-terminal-quake#419 ·
Los mantenedores suelen responder en 1 día
-
Show the per-model weekly limitAbiertoenhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100