Native Mobile FCM Push Notification Configuration

0
Currently attempting to setup push notifications on our mobile app in our QA environment. APN setup works normally but when setting up the FCM for Android I receive an error.  I don’t get the same error when setting it up on my local env. There was another error that appeared prior that apparently was linked with Community Commons and a duplicate pdfbox-1.8.5.jar that I had to remove in order to be able to run the project.  Unsure if they are related. I also had to downgrade the encryption module version. 1:33:20 PMAPPERROREncryption: Error while encrypting string: Key should not be empty 1:33:20 PMAPPERRORConnector: An error has occurred while handling the request. [User '----' with session id '----' and roles 'Administrator'] 1:33:20 PMAPPERRORConnector: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Key should not be empty 1:33:20 PMAPPINFOat Encryption.Encrypt (Error : '') 1:33:20 PMAPPINFOat PushNotifications.IVK_SaveFCMSettings (SubMicroflow : 'Encrypt') 1:33:20 PMAPPINFOAdvanced stacktrace: 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.ErrorEvent.throwError$1(ErrorEvent.scala:17) 1:33:20 PMAPPINFOCaused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Key should not be empty 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) 1:33:20 PMAPPINFOCaused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Key should not be empty 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) 1:33:20 PMAPPINFOCaused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Key should not be empty 1:33:20 PMAPPINFOat encryption.actions.EncryptString.executeAction(EncryptString.java:42) 1:33:20 PMAPPINFOat encryption.actions.EncryptString.executeAction(EncryptString.java:19) 1:33:20 PMAPPINFOat com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) 1:33:20 PMAPPINFOat com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:30) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:56) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:215) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:165) 1:33:20 PMAPPINFOat com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) 1:33:20 PMAPPINFOat com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) 1:33:20 PMAPPINFOat com.mendix.basis.component.InternalCoreBase.executeSync(InternalCoreBase.java:382) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.MicroflowExecuter$.executeSync(MicroflowExecuter.scala:19) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:49) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:215) 1:33:20 PMAPPINFOat com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:165) 1:33:20 PMAPPINFOat com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) 1:33:20 PMAPPINFOat com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:40) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.ExecuteMicroflowAction.runMicroflow(ExecuteMicroflowAction.scala:76) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.ExecuteMicroflowAction.$anonfun$apply$3(ExecuteMicroflowAction.scala:42) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction$Helpers$.$anonfun$liftEither$1(RegularClientAction.scala:29) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.$anonfun$apply$4(RegularClientAction.scala:55) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:35) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:32) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.withState(RegularClientAction.scala:45) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.apply(RegularClientAction.scala:53) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.apply(RegularClientAction.scala:45) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.ExecuteMicroflowAction.apply(ExecuteMicroflowAction.scala:43) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.ExecuteMicroflowAction.apply(ExecuteMicroflowAction.scala:22) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$3(RegularClientAction.scala:109) 1:33:20 PMAPPINFOat scala.util.Try$.apply(Try.scala:213) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2(RegularClientAction.scala:109) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2$adapted(RegularClientAction.scala:107) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$5(ContextHandling.scala:47) 1:33:20 PMAPPINFOat scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49) 1:33:20 PMAPPINFOat com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling$ClientMonitoredAction.monitor(ContextHandling.scala:59) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:47) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:27) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:86) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:24) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:19) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:86) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$1(RegularClientAction.scala:107) 1:33:20 PMAPPINFOat scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.profileRequest(RegularClientAction.scala:86) 1:33:20 PMAPPINFOat com.mendix.webui.actions.client.RegularClientAction.execute(RegularClientAction.scala:104) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:104) 1:33:20 PMAPPINFOat com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:81) 1:33:20 PMAPPINFOat com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) 1:33:20 PMAPPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:76) 1:33:20 PMAPPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:73) 1:33:20 PMAPPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 1:33:20 PMAPPINFOat com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:79) 1:33:20 PMAPPINFOat com.mendix.basis.impl.MxRuntimeImplBase.processRequest(MxRuntimeImplBase.java:930) 1:33:20 PMAPPINFOat com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42) 1:33:20 PMAPPINFOat javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 1:33:20 PMAPPINFOat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) 1:33:20 PMAPPINFOat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 1:33:20 PMAPPINFOat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.Server.handle(Server.java:500) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) 1:33:20 PMAPPINFOat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) 1:33:20 PMAPPINFOat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 1:33:20 PMAPPINFOat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) 1:33:20 PMAPPINFOat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) 1:33:20 PMAPPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) 1:33:20 PMAPPINFOat java.base/java.lang.Thread.run(Unknown Source)  
asked
2 answers
0

Hi Andrew

There is a encryption key need to be set in this step. 

https://docs.mendix.com/howto/mobile/native-remote-notifications#3-1-installing-your-module

Cheers, Andries

answered
0

The microflow IVK_SaveFCMSettings tries to get the key (sring) from the private key file, however that is empty. 

Make sure you have uploaded the private key from Firebase when you created the service account, see https://docs.mendix.com/howto/mobile/setting-up-google-firebase-cloud-messaging-server

answered