maxkomarychev / react-native-ultimate-config

Config that works
MIT License
261 stars 31 forks source link

v3.0.0 - v3.3.1 Android cannot load url in webview #49

Closed hanifmhd closed 3 years ago

hanifmhd commented 3 years ago

Describe the bug

I just upgraded lib to the latest version, v3.3.1. Then i run yarn rnuc .env, but it cannot load webview url, always return error. I try to install all lib version, only v2.2.0 that can run url in webview.

Steps to Reproduce

  1. create webview react native project
  2. create env file with values, for example: ANDROID_URL=https://google.com
  3. run yarn rnuc .env

Expected behavior

load that url in webview

Stacktraces, logs, screenshots

error [TypeError: Network request failed]

Screen Shot 2021-03-23 at 11 42 26

Environment

Integration option

Env file

Example of env file that is causing problems

ANDROID_URL=https://google.com

OS

Packages

Run react-native info and post below:

System:
    OS: macOS 11.3
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 41.53 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.6.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.6.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Additional context

Add any other context about the problem here.

maxkomarychev commented 3 years ago

hi @hanifmhd ,

I am sorry you are having troubles but I can not reproduce this problem with fresh react-native project.

Have you followed migration guide for version 3 ? I would also recommend going over the quickstart guide in order to make sure your integration is correct. Given available information I would speculate you are missing setBuildConfig in your MainApplication.java.

If the error still exists I would ask you to share a demo project which demostrates this problem.

thanks.

hanifmhd commented 3 years ago

hi @hanifmhd ,

I am sorry you are having troubles but I can not reproduce this problem with fresh react-native project.

Have you followed migration guide for version 3 ? I would also recommend going over the quickstart guide in order to make sure your integration is correct. Given available information I would speculate you are missing setBuildConfig in your MainApplication.java.

If the error still exists I would ask you to share a demo project which demostrates this problem.

thanks.

hi @maxkomarychev ,

Thank you so much for your guidance, i just read the changelog and there is additional configuration for v3 above. I missed the quickstart guide about setBuildConfig.

Right now, it's working well on Android and iOS, appreciate your help. Thank you.