Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http 请求 Network error #15986

Open
layne0625 opened this issue Jun 25, 2024 · 1 comment
Open

Http 请求 Network error #15986

layne0625 opened this issue Jun 25, 2024 · 1 comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@layne0625
Copy link

相关平台

React Native

使用框架: React

复现步骤

taro init react-native模板
安卓debug版本发起请求时,提示Network error,安卓已配置android:usesCleartextTraffic="true"

期望结果

debug阶段能正常发起http请求

实际结果

Possible Unhandled Promise Rejection (id: 4):
[AxiosError: Network Error]

环境信息

Taro CLI 3.6.32 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
      npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.32 => 3.6.32
      @tarojs/components: 3.6.32 => 3.6.32
      @tarojs/helper: 3.6.32 => 3.6.32
      @tarojs/plugin-framework-react: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-alipay: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-h5: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-jd: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-qq: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-swan: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-tt: 3.6.32 => 3.6.32
      @tarojs/plugin-platform-weapp: 3.6.32 => 3.6.32
      @tarojs/react: 3.6.32 => 3.6.32
      @tarojs/rn-runner: 3.6.32 => 3.6.32
      @tarojs/rn-supporter: 3.6.32 => 3.6.32
      @tarojs/runtime: 3.6.32 => 3.6.32
      @tarojs/runtime-rn: 3.6.32 => 3.6.32
      @tarojs/shared: 3.6.32 => 3.6.32
      @tarojs/taro: 3.6.32 => 3.6.32
      @tarojs/taro-loader: 3.6.32 => 3.6.32
      @tarojs/taro-rn: 3.6.32 => 3.6.32
      @tarojs/webpack5-runner: 3.6.32 => 3.6.32
      babel-preset-taro: 3.6.32 => 3.6.32
      eslint-config-taro: 3.6.32 => 3.6.32
      expo: ~47.0.3 => 47.0.14
      react: ^18.1.0 => 18.3.1
      react-native: ^0.70.1 => 0.70.15
@TheKonka TheKonka added V-3 Version - 3.x F-react Framework - React T-rn Target - 编译到 React Native labels Jun 25, 2024
This was referenced Jun 29, 2024
@zhiqingchen
Copy link
Member

可能不是 http 引起的,打印下具体的报错信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants