You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native无法启动iOS/Android模拟器,报SSL23_GET_SERVER_HELLO未知协议错误

Fixing React Native ADB SSL Protocol Error After Switching Computers

Hey there, I’ve run into this exact same SSL-related ADB error when moving my React Native project to a new workstation—total headache at first, but these steps got me back up and running:

1. Reset ADB’s SSL Connection First

More often than not, this error comes from a wonky ADB connection state. Let’s reset it completely:

  • Open your terminal and run these commands one by one:
    adb kill-server
    adb start-server
    adb reconnect offline
    
    This restarts the ADB daemon and forces a fresh connection handshake, which usually fixes the "unknown protocol" mismatch.

2. Disable Proxy Interference

New computers often have default proxy/VPN settings that mess with ADB’s unencrypted connections. Here’s how to fix it:

  • Shut down any active proxy tools, VPNs, or system-wide proxy settings first.
  • Then clear proxy environment variables in your terminal temporarily:
    unset HTTP_PROXY
    unset HTTPS_PROXY
    unset http_proxy
    unset https_proxy
    
    If this works, make sure to add adb to your proxy tool’s exclusion list so it doesn’t get blocked again.

3. Check OpenSSL Version & ADB Compatibility

The error mentions OpenSSL’s s23_clnt.c file, which points to a version mismatch between OpenSSL on your new computer and ADB:

  • First, check your OpenSSL version:
    openssl version
    
    If you’re running OpenSSL 3.x, some older ADB builds struggle with its stricter SSL protocols. Try either:
    • Updating ADB to the latest version via Android Studio’s SDK Manager (go to SDK Tools > Android SDK Platform-Tools and hit "Update")
    • Or temporarily force OpenSSL to use a compatible configuration:
      export OPENSSL_CONF=/dev/null
      
      Then restart ADB and try your React Native command again.

4. Verify Device/Emulator Connection

For physical devices:

  • Unplug and re-plug your device, then make sure you tap "Allow USB Debugging" on the device’s popup.
  • Run adb devices to confirm your device shows up as device (not unauthorized or offline).

For emulators:

  • Close all running emulators, then launch one directly from Android Studio’s AVD Manager before running npm run android.

5. Wipe React Native’s Cache

Cross-computer project caches can cause weird connection glitches too. Reset it with:

npm start -- --reset-cache

Once the cache is cleared, try launching your iOS or Android project again.

If none of these work, double-check that your new computer has the correct Android SDK environment variables set—make sure ANDROID_HOME is pointing to your SDK folder, and that $ANDROID_HOME/platform-tools is added to your system PATH so ADB is globally accessible.

内容的提问来源于stack exchange,提问作者Muthu Selvan SR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:32:49