Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23736

Emulator plugin can not run emulator if user is not logged on to desktop

    Details

    • Similar Issues:

      Description

      When running a build that uses the emulator plugin to start an emulator, this happens if the Jenkins's user isn't logged on to the desktop on the machine.

      [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
      _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
      ERROR: Timeout after 5 seconds
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
      _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
      ERROR: Timeout after 5 seconds
      [android] Starting Android emulator
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5680,5681 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -no-window -noaudio
      _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
      2014-07-10 11:10:04.006 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.007 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.007 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.007 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.008 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      2014-07-10 11:10:04.009 emulator64-arm[5457:d0b] invalid CoreGraphics connection
      Failed to create Context 0x3005
      emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5680
      _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

      Nothing more happens after this.

        Attachments

          Issue Links

            Activity

            Hide
            oskard Oskar Danielsson added a comment - - edited

            Added possibly related link JENKINS-23735

            Show
            oskard Oskar Danielsson added a comment - - edited Added possibly related link JENKINS-23735
            Hide
            oldelvet Richard Mortimer added a comment -

            I don't have a OS X system to test on but it looks like ADB is trying to connect to the graphical desktop but this is presumably failing because the Jenkins slave does not have access to the desktop.

            Show
            oldelvet Richard Mortimer added a comment - I don't have a OS X system to test on but it looks like ADB is trying to connect to the graphical desktop but this is presumably failing because the Jenkins slave does not have access to the desktop.
            Hide
            oskard Oskar Danielsson added a comment -

            How do I solve this?

            Show
            oskard Oskar Danielsson added a comment - How do I solve this?
            Hide
            orrc Christopher Orr added a comment -

            Searching for that error message seems to suggest that it's not possible without logging on to the desktop.

            For example:
            https://stackoverflow.com/questions/9157980/postbuild-uiautomation-script-not-running-in-jenkins
            https://stackoverflow.com/questions/13966595/build-unity-project-with-jenkins-failed

            We run OS X slaves and the emulator runs fine, but I think we run Jenkins in the way shown in those answers.

            Show
            orrc Christopher Orr added a comment - Searching for that error message seems to suggest that it's not possible without logging on to the desktop. For example: https://stackoverflow.com/questions/9157980/postbuild-uiautomation-script-not-running-in-jenkins https://stackoverflow.com/questions/13966595/build-unity-project-with-jenkins-failed We run OS X slaves and the emulator runs fine, but I think we run Jenkins in the way shown in those answers.
            Hide
            ultraon Vitaliy Popov added a comment -
            Show
            ultraon Vitaliy Popov added a comment - https://github.com/stisti/jenkins-app - it is help me!!!
            Hide
            orrc Christopher Orr added a comment -

            So it seems that this isn't a plugin issue.

            Show
            orrc Christopher Orr added a comment - So it seems that this isn't a plugin issue.

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                oskard Oskar Danielsson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: