Uploaded image for project: 'Identity'
  1. Identity
  2. ID-208

Failed to connect to Google Apps domain due to User.getName returning null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • None
    • None

    Description

      When connecting to Google Apps the following error is returned.

      Failed to connect to Google Apps
      Atlassian Cloud was unable to connect your Google Apps domain.

      With this stack trace.

      java.lang.NullPointerException
      at models.google.DirectoryApi$$anonfun$4.apply(GoogleUsers.scala:160)
      at models.google.DirectoryApi$$anonfun$4.apply(GoogleUsers.scala:154)
      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      at scala.collection.Iterator$class.foreach(Iterator.scala:727)
      at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
      at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      at scala.collection.AbstractTraversable.map(Traversable.scala:105)
      at models.google.DirectoryApi$$anonfun$fetchPage$1$1$$anonfun$apply$7$$anonfun$apply$8.apply(GoogleUsers.scala:178)
      at models.google.DirectoryApi$$anonfun$fetchPage$1$1$$anonfun$apply$7$$anonfun$apply$8.apply(GoogleUsers.scala:171)
      at scala.util.Try$.apply(Try.scala:161)
      at models.google.DirectoryApi$$anonfun$fetchPage$1$1$$anonfun$apply$7.apply(GoogleUsers.scala:171)
      at models.google.DirectoryApi$$anonfun$fetchPage$1$1$$anonfun$apply$7.apply(GoogleUsers.scala:171)
      at scalaz.EitherTMonad$$anonfun$point$1.apply(EitherT.scala:281)
      at scalaz.EitherTMonad$$anonfun$point$1.apply(EitherT.scala:281)
      at scalaz.FreeInstances$$anon$5.point(Free.scala:276)
      at scalaz.FreeInstances$$anon$5.point(Free.scala:275)
      at scalaz.EitherTMonad$class.point(EitherT.scala:281)
      at scalaz.EitherTInstances0$$anon$3.point(EitherT.scala:235)
      at scalaz.EitherTInstances0$$anon$3.point(EitherT.scala:235)
      at scalaz.KleisliApplicative$$anonfun$point$1.apply(Kleisli.scala:206)
      at scalaz.KleisliFunctions$$anon$17.run(Kleisli.scala:160)
      at scalaz.Kleisli$$anonfun$map$1.apply(Kleisli.scala:38)
      at scalaz.KleisliFunctions$$anon$17.run(Kleisli.scala:160)
      at scalaz.Kleisli$$anonfun$flatMap$1$$anonfun$apply$2.apply(Kleisli.scala:47)
      at scalaz.EitherT$$anonfun$flatMap$1$$anonfun$apply$4.apply(EitherT.scala:93)
      at scalaz.$bslash$div$class.fold(Either.scala:40)
      at scalaz.$bslash$div$minus.fold(Either.scala:283)
      at scalaz.EitherT$$anonfun$flatMap$1.apply(EitherT.scala:93)
      at scalaz.EitherT$$anonfun$flatMap$1.apply(EitherT.scala:93)
      at scalaz.Free$$anonfun$resume$2.apply(Free.scala:83)
      at scalaz.Free$$anonfun$resume$2.apply(Free.scala:83)
      at scalaz.Free.resume(Free.scala:81)
      at scalaz.Free.scalaz$Free$$runM2$1(Free.scala:128)
      at scalaz.Free$$anonfun$scalaz$Free$$runM2$1$1.apply(Free.scala:129)
      at scalaz.Free$$anonfun$scalaz$Free$$runM2$1$1.apply(Free.scala:129)
      at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
      at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
      at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
      at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
      at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
      at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
      at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
      at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
      at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
      at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
      at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      

      This is caused by the Google directory API returning null for com.google.api.services.admin.directory.model.User.getName(), which the Google Apps code does not handle safely.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lmiranda Luis Miranda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: