The app crashed when I tried to connect and disconnect the VPN by entering wrong/fake info in the app settings

in blurtopian •  3 years ago 

Project Details

Expected behavior
I expected that the app would handle the error of the wrong/fake "Server, key and DNS".

Actual behavior
When I tried to connect and disconnect the VPN by entering the wrong/fake info in the app settings, then the app crashed.

How to reproduce
Here is every possible detail to reproduce the bug.

  • Open the app.
  • Go to the app settings and enter fake info(Emojis) on the "Server, Key and DNS" fields.
  • Then try to connect and disconnect VPN several times and notice the crash.

App version: v1.4.2
Operating system: Android 10
Device: Xiaomi mi A3

Logcat

12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime: FATAL EXCEPTION: Thread-15
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime: Process: com.netbyte.vtunnel, PID: 2496
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime: java.lang.IllegalArgumentException: Invalid URL host: "😁"
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1337)
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1633)
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at okhttp3.Request$Builder.url(Request.kt:184)
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at com.netbyte.vtunnel.utils.HttpUtil.get(HttpUtil.java:25)
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at com.netbyte.vtunnel.service.IPService.deleteIp(IPService.java:59)
12-11 12:07:52.180 10321  2496  4207 E AndroidRuntime:  at com.netbyte.vtunnel.thread.MonitorThread.run(MonitorThread.java:43)

Recording Of the Bug
https://user-images.githubusercontent.com/33980813/145667611-d49fc448-c5c3-4778-806f-340b01271469.mp4

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!