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

Running locally with no SSL? #2

Open
askvictor opened this issue Aug 11, 2022 · 7 comments
Open

Running locally with no SSL? #2

askvictor opened this issue Aug 11, 2022 · 7 comments

Comments

@askvictor
Copy link

I'm trying to run this on my home server, running on a 192.168.x.x IP address. The server works fine, but when I go to use the Garmin, it says "Sign in using GCM" then on my phone, it attempts to open the login page on my local server, but shows an error in the Android WebView saying "ERR_CLEARTEXT_NOT_PERMITTED". This is presumably since it's not using SSL (in fact, it's impossible to get an SSL certificate for a 192.168.x.x address). Any ideas how I might get around this? I'm not sure if the error is caused by the Garmin Connect app, or something at the watch-app end.

@askvictor
Copy link
Author

(also, I've tried deploying to Heroku, but it just gives an error when trying to use the app after it's deployed)

@ravenfeld
Copy link
Owner

I need to get back into it, the code is a little dated and works well in my home. The problem is that the code is modified for heroku, the project is on gitlab if you have a gitlab account give it to me I will add you.

@askvictor
Copy link
Author

Thanks; @askvictor on gitlab.

@askvictor
Copy link
Author

For the time being I've used the following workaround. Server is still running on my local network, but on my android, I've set up port forwarding from localhost on the android to the server port. Then in the podcast settings in Garmin IQ, I set the server address to be 127.0.0.1:PORT. Android Webview allows non-https (ie. http) connections to localhost, so the connection works. This is sufficient to get a login token, then I change the server settings (in connect IQ) back to 192.168.x.x:port, and the login token is still valid

@askvictor
Copy link
Author

Though now, the watch shows syncing and seems to get stuck there. Is there any way to get more debug info on what's happening on the watch?

@ravenfeld
Copy link
Owner

Can you try with the code on gitlab?

@ravenfeld
Copy link
Owner

To debug on the watch it's often the shit, you have to use the garmin simulator or generate a debug version and write logs in a file.
The most up to date project is on Gitlab, here it was for heroku and so there may be some discrepancies.
I also have a telegram group to discuss the project
https://t.me/+poollWnWvjYzMzQ8

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

2 participants