Skip to content
New issue

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

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

Already on GitHub? # to your account

Sync not possible (GarminSdkError 0) while Server test is okay #42

Closed
grisumedia opened this issue Mar 1, 2022 · 10 comments
Closed

Sync not possible (GarminSdkError 0) while Server test is okay #42

grisumedia opened this issue Mar 1, 2022 · 10 comments

Comments

@grisumedia
Copy link

I have installed SubMusic on my Fenix 7 and try so sync it with my Nextcloud Music server. I use the Ampache API of the music app and my server has TLS v1.2 and v1.3 with Let's Encrypt certificates.
The server test succeeds and I am able to fetch my playlists and to show the files in a playlist. But as soon as I try to sync the playlists, sync stops at 0% and the watch shows an GarminSdkError:0.
The README.md suggests that there may be a problem with the server path, but I have checked it multiple times and I would expect that would not able to see my playlists if the configuration was wrong.
My server logs do not show anything suspicious. No errors. Is there anything I can do to find the problem? Debug logs created on the watch?

@memen45
Copy link
Owner

memen45 commented Mar 1, 2022

Hi, can you verify you have setup a wifi network on your watch? During sync, the watch switches to the built-in wifi instead of Bluetooth tethering.

Logs are not created for apps installed through connect IQ store. Can you check the Apache/nginx logs maybe?

I can debug against your server as well. Please use the 'Contact Developer' option on the connect IQ app store page if you want to!

@grisumedia
Copy link
Author

My other music app Runcasts syncs flawlessly via Wifi.
I will contact you directly. Thank you so far for the fast reply!

@memen45
Copy link
Owner

memen45 commented Mar 1, 2022

Thanks for reaching out! I could not respond through email, so here are my findings:

  • 'Dance' causes an Out of Memory error, probably due to too many songs in one playlist and/or too much metadata. The complete playlist data is loaded when the sync starts.
  • 'Chip' seems to work fine here! The songs on here are quite large, so I am not sure whether the Fenix7 storage capacity is sufficient

Can you verify and maybe try with a simple test playlist with e.g. a single song?

@grisumedia
Copy link
Author

I tried the Chip Playlist first, but no success. Now I've created a single-title playlist, but unfortunately, the results are always the same.
When I use bluetooth, I can see the GET requests on my server, but not via Wifi.
Another thing that I now tried is using another Wifi. Again, Runcast syncs, but SubMusic fails with GaminSdkError 0. I even uninstalled the app from my watch and installed it again.

@memen45
Copy link
Owner

memen45 commented Mar 1, 2022

That is very strange, never seen this before. Some random suggestions now, since I have no clue: Any interesting results when

  • About > Settings > Remove Data
  • no playlist is checked, try to sync
  • create playlist without songs, check its available offline, then try to sync
  • Choose a podcast, check its 'Newest available offline`, then try to sync
    Any logs, error messages, or still SdkError 0 for all?

@grisumedia
Copy link
Author

grisumedia commented Mar 1, 2022

I found the root of the problems after trying another server of mine which worked fine.
It looks like the cipher suites that my server allowed were not compatible to those that the watch provides. I now allow some of the weaker ciphers and now the watch is able to synchronize. Pretty interesting that this failing communication was not visible in the access or error logs.
I don't know how you were able to synchronize your watch in your test, maybe different Garmin models have different cipher suites? I would have expected that the Fenix 7 would allow state-of-the-art encryption.
Well, now my problem is solved. I'm very happy about your kind support and that I am able to share my solution with other people who may have similar problems with their watch.

@grisumedia
Copy link
Author

Anyway, if you would like to experiment with this and my server, I can easily reproduce the old state. Just let me know. :)

@memen45
Copy link
Owner

memen45 commented Mar 1, 2022

Thanks a lot for your update and glad to hear you were able to solve it! Indeed the error reporting is lacking. A while ago I ran into SSL issues and found that the Garmin SDK errors are incorrect for these, giving an immediate Timeout error, instead of the secure connection error. I used the simulator on PC to connect to your server, so probably the connection and SSL negotiation is handled by the OS. Same reason why browsing the server still worked, as the requests are then handled by your phone rather than the watch.

Interesting and thanks again for sharing your solution!

@koznov
Copy link

koznov commented Mar 19, 2022

@grisumedia can you share what type of settings you changed on server side in case of security ciphers? I'm trying to fix my connection to home server that is placed behind nginx reverse proxy and getting GarminSKDError 0 while testing and syncing. BTW: am I right that in settings of Application at Garmin IQ store I should place my password for ampache in plain text (in field API key)?

@grisumedia
Copy link
Author

@koznov My nginx uses

ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

I hope this solves your problem.
I use SubMusic in combination with Nextcloud Music and that App generates access tokens so that you don't need to use your password. But that access tokes is added as API key in plain text, yes. Maybe it works like that for Ampache, too.

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

No branches or pull requests

3 participants