8 Replies Latest reply on Mar 29, 2016 1:18 AM by neha.uniyal

    App not working in UAT which is SSO configured but working fine in other environments

    neha.uniyal

      Hi

       

      We have created an app to handle the bulk content that is working perfectly fine in other Jive environments. But for our UAT environment which is SSO configured, we are experiencing limited functionality of the app. On checking the logs , we have found the following error :

      ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.oauth2.OAuth2TokenHandler - Error when processing access token request: The client ID is invalid or not registered

      We have also tried to provide the full access to the app but still no success.

      Please advise.

       

      Thanks

      Neha

        • Re: App not working in UAT which is SSO configured but working fine in other environments
          Ryan Rutan

          If you are using a native app, you can osapi. libraries to make secured calls to Jive without needing to leverage OAuth.  At this point, it's not clear how the error above correlates to the App scenario you've stated.  Could you provide some more context?

            • Re: App not working in UAT which is SSO configured but working fine in other environments
              neha.uniyal

              We have tried to make the Content Manager App for our clients which has been originally developed by Pawan Shah and his team. The complete code has been under siddharthadeshpande89/jive-content-manager · GitHub . We have installed those files in the Microsoft environment and hosted the app through Jive server. The code includes osapi calls. We have deployed the app in three instances: localhost, dev and UAT. In localhost and dev it is fully functional where the content can be transferred anywhere between group, space and projects.But in UAT which is the only instance that is SSO configured, its functions are limited as the content can be transferred only between group to project, space to group and group to group. We are getting the following errors in the logs:

              2016-03-07 03:44:37,428 [TaskEngineWorker-pool-1] [::] DEBUG com.jivesoftware.community.app.activity.poll.ActivityPollingQueueTask - #ActivityPollingQueueTask: running

              2016-03-07 03:44:37,429 [TaskEngineWorker-pool-1] [::] DEBUG com.jivesoftware.community.app.activity.poll.ActivityPollingQueueTask - #ActivityPollingQueueTask: completed: no activity

              2016-03-07 03:44:38,343 [http-nio-0.0.0.0-9200-exec-15] [-1:ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.oauth2.OAuth2TokenHandler - Error when processing access token request: The client ID is invalid or not registered: k7luzxgfs7ji2uwb9wodqkb4g96i8y5j.i

              2016-03-07 03:44:38,462 [http-nio-0.0.0.0-9200-exec-22] [-1:ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.oauth2.OAuth2TokenHandler - Error when processing access token request: The client ID is invalid or not registered: k7luzxgfs7ji2uwb9wodqkb4g96i8y5j.i

               

              We also have provided full access to the app by adding Jive Service Signature in the definition.json of the extension.zip but it has not resolved the issue.

               

              We have never faced this kind of issue in the app before. As the main difference between the instances is that the UAT is SSO configured, could that be causing this issue?

                • Re: App not working in UAT which is SSO configured but working fine in other environments

                  Hi Neha,

                   

                  I'm speaking with Lea at JiveWorld right now, and she pointed me at this question, so I just took a quick look.  It looks to me like the clientID you have saved on the middleware is out of sync with what Jive has.  Based on the nature of the error, this definitely looks like an issue with the middleware talking back to the Jive server via the API (since the app client side likely isn't using OAuth to talk to Jive).  One option here would be to try the "Reconnect to Service" and making sure you are handling ensuing request properly -- make sure you are persisting the proper client ID you receive and the proper token.  Then, later, make sure that is the proper client ID that is being attached to the request for the authorization (along with the token).  Basically, the error is saying you are sending a client ID in the authorization header, but Jive doesn't know about that client ID -- so something is out of sync.

                    • Re: App not working in UAT which is SSO configured but working fine in other environments
                      neha.uniyal

                      Hi Drew

                       

                      Thank you for looking into this case.

                      We have generated authorization code and access token for the app.

                      We have also defined the OAuth service in the Admin console.

                       

                      On defining the above also , we are getting now the following error in the logs:

                      2016-03-16 06:30:06,324 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.community.media.video.providers.DefaultVideoProvider - While retrieving key, received statusCode 'Invalid license key' with partial body 'Invalid license key'

                      2016-03-16 06:30:06,332 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.base.taskmanager.impl.LocalExecutor - Failed to execute task

                      java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

                        at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:49)

                        at com.jivesoftware.base.taskmanager.impl.TaskQueue$2.run(TaskQueue.java:515)

                        at com.jivesoftware.base.taskmanager.impl.LocalExecutor$3.call(LocalExecutor.java:143)

                        at com.jivesoftware.community.aaa.authz.SystemExecutor.executeCallable(SystemExecutor.java:42)

                        at com.jivesoftware.base.taskmanager.impl.LocalExecutor.runInSystemContext(LocalExecutor.java:139)

                        at com.jivesoftware.base.taskmanager.impl.LocalExecutor.access$2(LocalExecutor.java:126)

                        at com.jivesoftware.base.taskmanager.impl.LocalExecutor$1.run(LocalExecutor.java:92)

                        at com.jivesoftware.util.task.TaskEngineRunnable.run(TaskEngineRunnable.java:57)

                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                        at java.lang.Thread.run(Thread.java:745)

                      Caused by: java.lang.reflect.InvocationTargetException

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:606)

                        at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:46)

                        ... 12 more

                      Caused by: com.jivesoftware.community.media.video.providers.ProviderCommunicationException: Error requesting an auth token

                        at com.jivesoftware.community.media.video.providers.DefaultVideoProvider.retrieveKey(DefaultVideoProvider.java:835)

                        at com.jivesoftware.community.media.video.providers.DefaultVideoProvider.getReadKey(DefaultVideoProvider.java:863)

                        at com.jivesoftware.community.media.video.providers.DefaultVideoProvider.retrievePropertiesBySearch(DefaultVideoProvider.java:1100)

                        at com.jivesoftware.community.media.video.tasks.RepairVideoMetaDataTask.repairVideoMetaData(RepairVideoMetaDataTask.java:55)

                        at com.jivesoftware.community.media.video.tasks.RepairVideoMetaDataTask.run(RepairVideoMetaDataTask.java:41)

                        ... 17 more

                       

                      Please suggest if we are missing anything.

                       

                      Thanks

                      Neha

                       

                      Shipra Singh Lea Reznik

                        • Re: App not working in UAT which is SSO configured but working fine in other environments

                          Neha,

                           

                          I mentioned this to Lea at JiveWorld, but that video error looks likely unrelated, so something you should probably open a case for.

                           

                          As I said previously, it looks like the clientId you are sending from the middleware is out of sync with Jive.  Reconnecting the service, if you were using the Node SDK, would likely resolve this issue.  I understand you're using a custom .NET SDK though?  In your SDK, when you get a registration request for an existing instance, do you update the clientId you have persisted?

                           

                          If you can send me a direct message with your UAT URL, I might be able to look in the DB to find the clientId Jive is expecting you to be sending, which you could then compare to the value you have persisted.  Alternatively, you could capture the request that comes down when you click "Reconnect to Service" in the add-on settings and verify the clientId Jive is sending is the one you have persisted (which is likely the one showing up in the log statements above).