Web site works but Android app not working properly

monty6 years ago

Hello,
I have traccar running on a sbc and I have a Rasperry Pi running Apache with ssl, basically configured as per link. If I connect to the ssl site, the web page works fine and I can track devices. However, if I run the android app, I can see devices and I can retrieve messages and then see them on the map.

If I connect to the traccar server from my lan, I can see the devices on the map.

Any thoughts on what's needed?

Looking at the apache log files, there aren't any errors and the requests seem basically the same. However, the android app doesn't appear to pass a sesssion id parameter with the request.

<VirtualHost *:443>

        ProxyRequests Off
        ProxyPass /api/socket ws://10.192.168.198:8082/api/socket
        ProxyPassReverse /api/socket ws://10.192.168.198:8082/api/socket

        ProxyPass / http://10.192.168.198:8082/
        ProxyPassReverse / http://10.192.168.198:8082/
        ProxyPassReverseCookiePath / http://10.192.168.198:8082/
67.82.98.59 - - [09/Jun/2018:17:22:02 -0400] "GET /api/server?_dc=1528579320960 HTTP/1.1" 200 873 "https://sing.tpon.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0"
67.82.98.59 - - [09/Jun/2018:17:22:02 -0400] "GET /api/session?_dc=1528579321024
67.82.98.59 - - [09/Jun/2018:17:22:19 -0400] "POST /api/session HTTP/1.1" 200 4262 "-" "okhttp/3.2.0"
67.82.98.59 - - [09/Jun/2018:17:22:19 -0400] "GET /api/devices HTTP/1.1" 200 2182 "-" "okhttp/3.2.0"
Anton Tananaev6 years ago

Sorry, what is the issue again? I'm guessing that there is a typo somewhere in your comment.

monty6 years ago

So, when I connect the android app to the ssl url, the map is just blue and located at 0,0. If I click the menu, I can see my devices, if I select one and then show on map, it does nothing and just returns to showing the devices.

If I am on my lan, and change to the settings to the traccar server behind the firewall, then when I click show on map, it shows the map loaded to the devices location.

The behaviour with the web site page is the same regardless of whether I hit the https url, or the lan machine.

Obviously, I'd like the android app to function with the ssl url the same as the lan connection. In my initial trouble shooting, I can't find any errors so I'm not sure what I should be looking for.

Anton Tananaev6 years ago

Have you tried connecting from Android browser? Does it have the same issue?

monty6 years ago

Yes, it appears the android browser works fine. No devices are moving, but the page is updating with the last update received.

Anton Tananaev6 years ago

App should work exactly the same. Not sure why it doesn't. What version of Android are you using?

monty6 years ago

8.0.0, although the app has been working this way for a while. I hadn't said anything before because the web site was a reasonable alternative. It was only when I tried my lan address for some reason that I saw how the app was supposed to behave.

I thought that maybe someone else had seen this before and knew what was happening.

Anton Tananaev6 years ago

Please provide a screenshot from the app.

monty6 years ago

Here are a couple of low res screen captures showing the difference. In both cases, it can get the phone's location and show that. However, when connecting via ssl, it wont show the devices on the map.
Screen capture connected to LAN
Screen capture connected to SSL
From the android browser: browser screenshot

Anton Tananaev6 years ago

Are you serious? You are not using official Traccar app. You have to be clear about this from the start.

monty6 years ago

Doh. I hadn't looked that closely, when I went to the play store originally, it was the first app that came up.

The official app works as expected. Sorry for the trouble. Thanks for your help and the great product you have created. Again, I feel very foolish right now.