Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help with HTTP mode #212

Closed
Cnzw opened this issue Mar 12, 2025 · 9 comments
Closed

Need help with HTTP mode #212

Cnzw opened this issue Mar 12, 2025 · 9 comments

Comments

@Cnzw
Copy link

Cnzw commented Mar 12, 2025

Hello,

I'm currently deploying owntracks/recorder:0.9.9 using Docker. I can successfully access the Recorder via the web interface, but I'm encountering issues when trying to use the OwnTracks app on my Android device.

I noticed that the Quicksetup guide mentions the need to configure configuration.yaml and run bootstrap.sh to set up the OwnTracks environment. However, I couldn't find any reference to these steps in the Docker repository.

Image

Image

version: "3"
services:

    otrecorder:
        image: owntracks/recorder:0.9.9
        environment:
            - TZ=Asia/Shanghai
            - OTR_PORT=0
        volumes:
            - /www/docker/owntracks/recorder:/store
        ports:
            - 8083:8083
        container_name: otrecorder
        restart: unless-stopped
@jpmens
Copy link
Member

jpmens commented Mar 12, 2025

What does the app's log say?

(Quickset is not docker)

@ckrey
Copy link
Member

ckrey commented Mar 12, 2025

The endpoint you set in the app is probably not

http://....:8083 but http://....:8083/pub

https://github.com/owntracks/recorder?tab=readme-ov-file#http-mode

@Cnzw
Copy link
Author

Cnzw commented Mar 12, 2025

What does the app's log say?

(Quickset is not docker)

The app's log -> https://mclo.gs/26NNR45

And http://....:8083/pub didn't work for me

@ckrey
Copy link
Member

ckrey commented Mar 12, 2025

Your URL seems to be wrong because the log says:

2025-03-12 16:43:04.324 W [DefaultDispatcher-worker-4] HttpMessageProcessorEndpoint: org.owntracks.android.support.interfaces.ConfigurationIncompleteException: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for 

and in your screenshot above it says:

Image

@Cnzw
Copy link
Author

Cnzw commented Mar 12, 2025

Your URL seems to be wrong because the log says:

2025-03-12 16:43:04.324 W [DefaultDispatcher-worker-4] HttpMessageProcessorEndpoint: org.owntracks.android.support.interfaces.ConfigurationIncompleteException: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for 

and in your screenshot above it says:

I was initially unsure whether to include the http prefix in the endpoint URL. However, you can see the latest log:

2025-03-12 20:03:44.025 D [main] PreferencesStore: Setting preference url to http://**.**.**.**:8083/pub (coerced to http://**.**.**.**:8083/pub)
...something...
2025-03-12 20:04:27.713 D [main] PreferencesStore: Setting preference url to http://**.**.**.**:8083 (coerced to http://**.**.**.**:8083)

@jpmens
Copy link
Member

jpmens commented Mar 12, 2025

"coerced to http://...:8083/pub"

looks very fishy. Retype the URL, make sure you 've no spaces or special characters in it.

@Cnzw
Copy link
Author

Cnzw commented Mar 12, 2025

No typo. I’ve checked the characters and ensured that the URL is accessible directly via the browser.

It seems we haven’t found the root cause yet. I’ll review the documentation and check the app logs again tomorrow. If it still doesn’t work, I’ll try switching to MQTT mode.

Thanks for your help. I will let you know the follow-up.

@Cnzw
Copy link
Author

Cnzw commented Mar 13, 2025

Hello,

I have successfully uploaded my location and can see it in the recorder now. The issue was with Google services (GMSLocationProviderClient). After analyzing the logs, I switched to the OSS version (which does not rely on Google services) and used http://**.**.**.**:8083/pub as the endpoint URL. Now OwnTracks is working properly.

I live in China, so unable to access Google services. Additionally, I noticed the coordinate offset issue with maps in China, which might be resolved by integrating a Chinese map provider like amap (iOS defaults to amap, so coordinates work correctly on iOS). Of course, this is just a suggestion. I understand that integrating new thing requires a lot of effort, and the demand for this is not high.

@Cnzw Cnzw closed this as completed Mar 13, 2025
@jpmens
Copy link
Member

jpmens commented Mar 13, 2025

Glad you got it going, and thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants