• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

317
Vistas
Getting allegedly randomly "No permission to send message to these tmIDs" HMS Push services

🟢 Fixed server-side

Note: this was a server side bug and for now seems to be solved. Our mobile app code remains unchanged.


I have to use HMS Push Services in order to make my RN App working for Huawei EMUI devices: HMS Core.

I followed all the required steps to install and configure HMS both on the server and on the mobile App.

However... I noticed a weird behavior. I use a button on the web page to send a Push Notification from the server to the Mobile App. I ensured that Push Kit is enabled on my Huawei ID and the Push Device Token is the correct one.

Sometimes the notification is sent and sometimes no. I tried all the day to find the cause, but for now it seems to be completely aleatory, at least until the cause will be not found.

Please note that in the code below the mc.send() goes every times into the .then() and never raised the .catch().

Sometimes I get: OK {"code":"80000000","msg":"Success","requestId":"161832746491754926000107"} and the notification is actually received from the Mobile App (all fine!).

Sometimes (and quite often): OK {"code":"80300002","msg":"No permission to send message to these tmIDs","requestId":"161832753512250325000107"}

Lastly, I am getting continuously: OK {"code":"80000000","msg":"Success","requestId":"161832795126307445060711"} but... the App does not receives actually the notification.

I tried to restart server, keep the App in the three various States (closed, foreground, background), but nothing helped me to find the problem.

This is the last version of the code I use to send the notification (I changed it many times):

function sendPushNotificationHMS(pushDeviceToken, data, attempt){
  hcm.init({
      appId: configHMS.AppId,
      appSecret: configHMS.AppSecret,
      authUrl: configHMS.AuthUrl,
      pushUrl: configHMS.PushUrl
  });
  let mc = hcm.messaging().messaging;

  let androidConfig = {
      collapse_key: -1,
      urgency:"HIGH",
      ttl: "10000s",
      bi_tag: "the_sample_bi_tag_for_receipt_service",
  }

  let message = {
      data: JSON.stringify(data),
      android: androidConfig,
      token: new Array(pushDeviceToken)
  };

  mc.send(message, true).then(data => {
      console.log('OK ', data);
  }).catch(err => {
      console.log('ERR ', err);
  });
}
about 3 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Please refer to this documentation:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/commonerror-0000001059816656

and see if one of the solution under 80300002 is correct. Since you have checked if your IDs are correct, please check the tips under 2, 4, 6, and 7.

about 3 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda