Skip to content

Commit

Permalink
fix(android): prevent app from loading if server.url is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
theproducer authored Mar 29, 2022
1 parent 6f4d858 commit d4a0dea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/capacitor/src/main/java/com/getcapacitor/Bridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ private void loadWebView() {
try {
URL appUrlObject = new URL(appUrlConfig);
authorities.add(appUrlObject.getAuthority());
} catch (Exception ex) {}
} catch (Exception ex) {
Logger.error("Provided server url is invalid: " + ex.getMessage());
return;
}
localUrl = appUrlConfig;
appUrl = appUrlConfig;
} else {
Expand Down

0 comments on commit d4a0dea

Please sign in to comment.