Detox icon indicating copy to clipboard operation
Detox copied to clipboard

TELNET timeouts on Windows

Open jellyninjadev opened this issue 1 year ago • 0 comments

I am experiencing the previously closed issue. Telnet seems to be always times out on localhost:12424

  • Detox: 19.12.1
  • React Native: 0.68.2 (Expo SDK 45 dev client)
  • Node: 16.15.1
  • OS: Windows

I see that telnet-client library version is a fixed and quite behind the latest. I could not identify any related fixes since I dont understand how is telnet being used.

Originally posted by @stale[bot] in https://github.com/wix/Detox/issues/1427#issuecomment-530535783

npm run e2e -- -c android -l trace

> [email protected] e2e
> detox test

22:19:59.181 detox[25116] INFO:  [test.js] DETOX_CONFIGURATION="android" DETOX_LOGLEVEL="trace" DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1663687199169 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern "^((?!:ios:).)*$" e2e
22:20:02.373 detox[26060] TRACE: [DETOX_CREATE] created a Detox instance with config:
{
  appsConfig: {
    default: {
      type: 'android.apk',
      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=release && cd ..'
    }
  },
  artifactsConfig: {
    rootDir: 'artifacts\\android.2022-09-20 15-19-59Z',
    plugins: {
      log: {
        enabled: false,
        keepOnlyFailedTestsArtifacts: false
      },
      screenshot: {
        enabled: true,
        shouldTakeAutomaticSnapshots: false,
        keepOnlyFailedTestsArtifacts: false
      },
      video: {
        enabled: false,
        keepOnlyFailedTestsArtifacts: false
      },
      instruments: {
        enabled: false,
        keepOnlyFailedTestsArtifacts: false
      },
      timeline: {
        enabled: false
      },
      uiHierarchy: {
        enabled: false,
        keepOnlyFailedTestsArtifacts: false
      }
    },
    pathBuilder: ArtifactPathBuilder {
      _rootDir: 'artifacts\\android.2022-09-20 15-19-59Z'
    }
  },
  behaviorConfig: {
    init: {
      reinstallApp: true,
      exposeGlobals: true
    },
    cleanup: {
      shutdownDevice: false
    },
    launchApp: 'auto'
  },
  cliConfig: {
    configuration: 'android',
    loglevel: 'trace',
    useCustomLogger: true
  },
  configurationName: 'android',
  deviceConfig: {
    type: 'android.emulator',
    device: {
      avdName: 'Pixel_4_API_31'
    }
  },
  runnerConfig: {
    testRunner: 'jest',
    runnerConfig: 'e2e/config.json',
    specs: 'e2e',
    skipLegacyWorkersInjection: true
  },
  sessionConfig: {
    autoStart: true,
    sessionId: '5f64ea16-b00f-6e8a-94b8-a98832db1720',
    debugSynchronization: 10000
  }
}
22:20:02.381 detox[26060] DEBUG: [WSS_CREATE] Detox server listening on localhost:58544...
22:20:02.409 detox[26060] DEBUG: [WSS_CONNECTION, #58545] registered a new connection.
22:20:02.411 detox[26060] TRACE: [WS_OPEN] opened web socket to: ws://localhost:58544
22:20:02.415 detox[26060] TRACE: [WS_SEND] {"type":"login","params":{"sessionId":"5f64ea16-b00f-6e8a-94b8-a98832db1720","role":"tester"},"messageId":0}
22:20:02.419 detox[26060] TRACE: [WSS_GET_FROM, #58545] {"type":"login","params":{"sessionId":"5f64ea16-b00f-6e8a-94b8-a98832db1720","role":"tester"},"messageId":0}
22:20:02.419 detox[26060] TRACE: [SESSION_CREATED] created session 5f64ea16-b00f-6e8a-94b8-a98832db1720
22:20:02.420 detox[26060] TRACE: [WSS_SEND_TO, #tester] {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":false},"messageId":0}
22:20:02.421 detox[26060] TRACE: [SESSION_JOINED] tester joined session 5f64ea16-b00f-6e8a-94b8-a98832db1720
22:20:02.422 detox[26060] TRACE: [WS_MESSAGE] {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":false},"messageId":0}

22:20:02.564 detox[26060] DEBUG: [EXEC_CMD, #0] "E:\SDK\Android\emulator\emulator.EXE" -list-avds --verbose
22:20:02.603 detox[26060] TRACE: [EXEC_SUCCESS, #0] Galaxy_A7_API_31
Pixel_4_API_31
Pixel_C_API_31
pixel_5_-_api_31

22:20:02.604 detox[26060] DEBUG: [EXEC_CMD, #1] "E:\SDK\Android\emulator\emulator.EXE" -version
22:20:03.047 detox[26060] TRACE: [EXEC_SUCCESS, #1] INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
Copyright (C) 2006-2017 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator (www.qemu.org).

  This software is licensed under the terms of the GNU General Public
  License version 2, as published by the Free Software Foundation, and
  may be copied, distributed, and modified under those terms.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

INFO    | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)

22:20:03.049 detox[26060] DEBUG: [EMU_BIN_VERSION_DETECT] Detected emulator binary version { major: 31, minor: 3, patch: 10, toString: [Function: toString] }
22:20:03.049 detox[26060] DEBUG: [ALLOCATE_DEVICE] Trying to allocate a device based on "Pixel_4_API_31"
22:20:03.053 detox[26060] DEBUG: [EXEC_CMD, #2] "E:\SDK\Android\platform-tools\adb.EXE"  devices
22:20:03.090 detox[26060] DEBUG: [EXEC_SUCCESS, #2] List of devices attached
emulator-12424  device


22:20:03.094 detox[26060] TRACE: [TELNET_CONNECTING] port: 12424, host: localhost
22:20:04.616 detox[26060] ERROR: [TELNET_TIMEOUT]
22:20:04.624 detox[26060] ERROR: Error: response not received
    at Timeout._onTimeout (E:\Projects\trivia\node_modules\telnet-client\lib\index.js:169:20)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
22:20:04.664 detox[26060] INFO:  Example is assigned to undefined

the sample repo https://github.com/SenhorBardell/trivia uses detox ^19.7.1

jellyninjadev avatar Sep 20 '22 15:09 jellyninjadev