Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-15776

Push Registration fails (QR code invalid) to register

    Details

    • Sprint:
      AM Sustaining Sprint 70, AM Sustaining Sprint 71
    • Story Points:
      5

      Description

      Bug description

      Push registration fails to work after upgrading to 6.5.2.2 (working fine on 6.5.2.1).  With message debug enable and when the QR code is registered this is seen in CoreSystem

       CoreSystem
      ==========
      frRest:12/13/2019 02:36:11:859 PM SGT: Thread[http-nio-8080-exec-7,5,main]: Tran
      sactionId[4e09f01f-07f3-4516-96a8-e6bd2f1baff1-2025]
      ERROR: A runtime exception occurred during the CREST request handling
      java.lang.IllegalStateException: Exception from invocation expected to be handle
      d by promise
              at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.ja
      va:100)
              at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:65)
              at org.forgerock.json.resource.AnnotatedActionMethods.invoke(AnnotatedActionMethods.java:43)
              at org.forgerock.json.resource.AnnotatedActionMethods.invoke(AnnotatedActionMethods.java:31)
              at org.forgerock.json.resource.AnnotatedRequestHandler.handleAction(AnnotatedRequestHandler.java:81)
      ....
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:96)
              ... 108 more
      Caused by: java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;
              at com.ctc.wstx.evt.CompactStartElement.getAttributes(CompactStartElement.java:94)
              at com.amazonaws.transform.StaxUnmarshallerContext.nextEvent(StaxUnmarshallerContext.java:214)
              at com.amazonaws.services.sns.model.transform.CreatePlatformEndpointResultStaxUnmarshaller.unmarshall(CreatePlatformEndpointResultStaxUnmarshaller.java:40)
              at com.amazonaws.services.sns.model.transform.CreatePlatformEndpointResultStaxUnmarshaller.unmarshall(CreatePlatformEndpointResultStaxUnmarshaller.java:28)
              at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:107)
              at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:40)
              at com.amazonaws.http.response.AwsResponseHandlerAdapter.handle(AwsResponseHandlerAdapter.java:70)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleResponse(AmazonHttpClient.java:1554)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1272)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1056)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
              at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
              at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
              at com.amazonaws.services.sns.AmazonSNSClient.doInvoke(AmazonSNSClient.java:2270)
              at com.amazonaws.services.sns.AmazonSNSClient.invoke(AmazonSNSClient.java:2246)
              at com.amazonaws.services.sns.AmazonSNSClient.executeCreatePlatformEndpoint(AmazonSNSClient.java:615)
              at com.amazonaws.services.sns.AmazonSNSClient.createPlatformEndpoint(AmazonSNSClient.java:591)
              at org.forgerock.openam.services.push.sns.utils.SnsPushResponseUpdater.setCommunicationId(SnsPushResponseUpdater.java:112)
              at org.forgerock.openam.services.push.sns.utils.SnsPushResponseUpdater.updateCommunicationId(SnsPushResponseUpdater.java:84)
              at org.forgerock.openam.services.push.sns.utils.SnsPushResponseUpdater.updateResponse(SnsPushResponseUpdater.java:66)
              at org.forgerock.openam.services.push.sns.SnsRegistrationPredicate.perform(SnsRegistrationPredicate.java:73)
              at org.forgerock.openam.services.push.dispatch.MessageDispatcher.handlePushResponseLocally(MessageDispatcher.java:206)
              at org.forgerock.openam.services.push.dispatch.MessageDispatcher.handle(MessageDispatcher.java:122)
              at org.forgerock.openam.services.push.PushMessageResource.handle(PushMessageResource.java:102)
              at org.forgerock.openam.services.push.sns.SnsMessageResource.register(SnsMessageResource.java:82)
              ... 113 more
      

      or pay attention to

      Caused by: java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;
              at com.ctc.wstx.evt.CompactStartElement.getAttributes(CompactStartElement.java:94)
              at com.amazonaws.transform.StaxUnmarshallerContext.nextEvent(StaxUnmarshallerContext.java:214)
              at com.amazonaws.services.sns.model.transform.CreatePlatformEndpointResultStaxUnmarshaller.unmarshall(CreatePlatformEndpointResultStaxUnmarshaller.java:40)
      

      How to reproduce the issue

      Details steps outlining how to recreate the issue (remove this text)

      1. Setup Push registration and test it works on 6.5.2.1
      2. Upgrade to 6.5.2.2
      3. Failure is seen (QR is invalid) when trying to register push.
      4. Best to enable message debug to see all the errors
      Expected behaviour
      Push registration works
      
      Current behaviour
      Push registration does not work anymore
      

      Work around

      Maybe remove openam/WEB-INF/lib/woodstox-core-asl-4.3.0.jar

      --- a/openam-server-only/pom.xml
      +++ b/openam-server-only/pom.xml
      @@ -161,6 +161,7 @@
       WEB-INF/lib/jaxb-libs-1.0.6.jar,
       WEB-INF/lib/jaxb-xjc-1.0.6.jar,
       WEB-INF/lib/jaxp-api-1.4.2.jar,
      + WEB-INF/lib/woodstox-core-asl-4.3.0.jar,
       </packagingExcludes>
       <archive>
       <manifestEntries>
      

      Cause

      Cause by the Jackson dependencies changes upgrade and the Woodstox dependencies due to Jackson upgrade. See  to https://github.com/FasterXML/woodstox/issues/46 if there is old woodstox.

        Attachments

        1. pushissue.mp4
          1.48 MB
          C-Weng C
        2. Video MP4 (1680x898).mp4
          2.31 MB
          Adam Heath

          Activity

            People

            • Assignee:
              adam.heath Adam Heath
              Reporter:
              chee-weng.chea C-Weng C
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: