ccnnde / react-native-simple-openvpn

A simple react native module to interact with OpenVPN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in Android app built with expo

master429 opened this issue · comments

Bug description:
In the expo project, I used prebuild to generate the ios and android directories. I added the corresponding configuration in the android directory according to the documentation. When running yarn run android command, it gave me an error

To Reproduce:

Expected behavior:
Builds to android devices normally

Screenshots/Videos:
image

Environment:

  • OS:MacOS
  • OS version:13.4
  • react-native version:0.72.6
  • react-native-simple-openvpn version:^2.1.0

Is this working on expo ???

@LynxSumit Give this a try and see if it works.

If your project is based on Expo, you need to eject your project by switching to the Bare workflow, in order to use this library.

@ccnnde It's not working ..... getting an error while creating a development build .
image

Simple solution:

Open the file /node_modules/react-native-simple-openvpn/vpnLib/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt and insert the following line on a new line after line number 93:

else -> throw AssertionError()

After that, rebuild the project.

@mohamad-n thank you for your solution, would you be willing to submit a PR?

@mohamad-n thank you for your solution, would you be willing to submit a PR?

Certainly, if you're interested.

@mohamad-n Yes, I would like you to submit a PR. Thank you!

@mohamad-n Yes, I would like you to submit a PR. Thank you!

#61