0

I am currently using WSO2 EMM 2.0.1, and platform configuration I use GCM, I have follow the step in document, and already set the API key and Sender ID. in the device I manage to get the GCM reg id too, but when I perform operation on EMM, at the console and log, I have receive this error (Exception occurred while sending the GCM notification : null). I have try to find the solution through online, but I cant find any solution to solve this problem.

Here is a screenshot for the error:

GCM Error

Please advice and help, Thanks.

Community
  • 1
  • 1
JK9
  • 370
  • 2
  • 7
  • 26

1 Answers1

0

Since not much can be taken from the log, I looked into the code where the exception is occurring. Error in the log is possible generated from the line number 50 of the attached[1] code. In line number 48 it calls sendWakeupCall method[2]. As I can see in line number 75 and 76 of the sendWakeUpCall method, the returned status cannot be success. Can you ping the gcm server and see if it is reachable - ping gcm-http.googleapis.com If so, you might have to debug here and see the issue your-self, To debug, take a clone of carbon-device-mgt-plugins repository. Switch to release-2.0.4 branch Open the code using a preferred IDE. Put some break points for sendWakeUpCall method Edit your IDEs remote debug configurations to listen to a specific port and host(in IDE default 5005) Start the server as - sh wso2server.sh -debug 5005 Now start debugging in the previously configured debug config. You can find more details about debugging in the attached docs[3][4]

[1]. https://github.com/wso2/carbon-device-mgt-plugins/blob/release-2.0.4/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMService.java [2]. https://github.com/wso2/carbon-device-mgt-plugins/blob/release-2.0.4/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java [3]. wso2.com/library/225/

Inosh Perera
  • 200
  • 2
  • 9