I followed the server-via-docker setup and entered as URL 192.168.1.1000:8005
.
If I go to localhost:8005 on the server, and enter the family that I put into the phone, it says that family doesn't exist.
If I go manually to /view/dashboard/myfamily
, it loads the page but says at the top. You need to add learning data first: group 'mygroup' does not exist
, despite me having learned 5 locations already.
If in the app I press the link shown at the top, I get to FIND dashboard
, it shows myfamily / mydevice
, but the Location guesses
just shows the logo with the orange square circling around.
In the adb logcat
I see:
03-26 14:15:19.572 10394 10507 E Volley : [524] NetworkDispatcher.processRequest: Unhandled exception java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley : java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley : at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:171)
03-26 14:15:19.572 10394 10507 E Volley : at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:120)
03-26 14:15:19.572 10394 10507 E Volley : at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87)
03-26 14:15:19.572 10394 10507 E Volley : Caused by: java.net.MalformedURLException: Protocol not found: 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley : at java.net.URL.<init>(URL.java:176)
03-26 14:15:19.572 10394 10507 E Volley : at java.net.URL.<init>(URL.java:125)
03-26 14:15:19.572 10394 10507 E Volley : at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:92)
03-26 14:15:19.572 10394 10507 E Volley : at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:131)
03-26 14:15:19.572 10394 10507 E Volley : ... 2 more
03-26 14:15:19.592 10394 10394 E ScanService: com.android.volley.VolleyError: java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.644 10394 10521 D ScanService: started wifi scan
03-26 14:15:19.644 10394 10521 D ScanService: started discovery
03-26 14:15:20.703 10394 10394 D ScanService: timer off, trying to send data
So there are 3 problems here:
- The
Server
field in the Android app really needs a protocol, like http://
, in the front, otherwise the whole thing won't work. It would be nice if the app could tell you that.
- The app does not correctly propagate this
MalformedURLException
up to the GUI, and continues anyway, thus suggesting to the user that everything is running when in fact nothing is running.
- The app does not do exception handing correctly in general. There are catch-all exceptions in many places, such as:
They these locations use code like
} catch (Exception e) {
Log.e(TAG, e.toString());
}
Catching all exceptions is a well-known antipattern in Java; turning all exceptions into mere warnings and then continuing makes for bad UX because the program cannot work that way.
I suspect that this error is triggering the code path where the exception is thrown here and this catch-all` catches it and the app continues despite error.