Ticket Created
over 3 years ago

CIQQA-1148

Persistent login details for SDK manager and simulator

            OS: Ubuntu 20.04

   SDK Manager: 1.0.4

Connect IQ SDK: 4.1.2

Neither the SDK manager nor the simulator (when accessing app settings) remember the login details for my garmin account. This means typing in my email and finding/copying my password from a password manager each and every time I run them. This gets rather tedious after a while - so is there a way to persist the login details or is it supposed to and there's a bug preventing it from working?

Related question: Why does the simulator require an account login to manipulate the local settings? 

On another note - the app settings window in the simulator has the odd behaviour that if you keep it open it will not allow you to make multiple changes. Instead you have to close the window and open it again.

I've recently started using Connect IQ again having not worked on my old watchface for many years and have been very pleased to find the move to VSCode and better cross-platform support - so thanks!

Parents
  • It appears that the simulator uses GTK, Webkit and libsoup. However I've been running GTK apps on KDE for over a decade and haven't come across this kind of issue before. I can't seem to find any reference to it online.

    I've spent a few hours looking into this and with some webkit debug logs switched on I was able to see the response from the garmin servers after a login - I've redacted anything that may constitute a valid session ID:

    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < HTTP/1.1 200 OK
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Soup-Debug-Timestamp: 1650924847
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Soup-Debug: SoupMessage 21 (0x5581fa3600c0)
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Date: Mon, 25 Apr 2022 22:14:07 GMT
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Type: text/html;charset=UTF-8
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Transfer-Encoding: chunked
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Connection: keep-alive
    Apr 25 23:14:07 dodeca WebKitWebProcess[162561]: 0x7fa3615f6c00 - [pageID=8, frameID=3, main=1] DocumentLoader::DocumentLoader::stopLoading: m_frame=0x7fa3a4282000
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Credentials: true
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Methods: GET,POST,OPTIONS
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Origin: https://sso.garmin.com
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Language: en
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Application-Context: casServer:prod,prod-US_Olathe,cloud:2
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-B3-Traceid: 083a4b0d090a54a7028496b96ef21d0b
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Robots-Tag: noindex
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Vcap-Request-Id: 5914a569-72c7-468e-7859-4608b9feb24e
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < CF-Cache-Status: DYNAMIC
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Expect-CT: max-age=604800, report-uri="">report-uri.cloudflare.com/.../expect-ct"
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ap%2FfJViup4ph42dLUov2j3T8FhO3%2FRHwIED%2BS%2BwgizyrkU8HONt3MJGObfAJHVw%2FxpQawP6S46XjHRV9bBwiQ2TbsEzwOgQzcwp5KU0IfOOAzfSZ8JpQijNIjaq%2FkIcm"}],"group":"cf-nel","max_age":604800}
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: CASTGC=*redacted*; Path=/sso; Secure; HttpOnly
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO=1; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GarminNoCache=true; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GarminBuyCacheKey=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO-GUID=*redacted*; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO-CUST-GUID=*redacted*; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: __cfruid=*redacted*; path=/; domain=.sso.garmin.com; HttpOnly; Secure; SameSite=None
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Server: cloudflare
    Apr 25 23:14:07 dodeca WebKitWebProcess[162561]: BackForwardCache::addIfCacheable item: 9-20, size: 2 / 2
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < CF-RAY: 701a6e00383d88bf-LHR
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Encoding: gzip
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: <
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]:

    I would guess that either the CASTGC or one of the GARMIN-SSO cookies is the actual login cookie - but interestingly none of them have expiry values. This would mean that they will not persist beyond the session so when the application is closed the cookies are lost. But by this logic the login would not persist regardless of the platform that the SDK tools are run on, however I'm assuming that others are not seeing the same issue?

Comment
  • It appears that the simulator uses GTK, Webkit and libsoup. However I've been running GTK apps on KDE for over a decade and haven't come across this kind of issue before. I can't seem to find any reference to it online.

    I've spent a few hours looking into this and with some webkit debug logs switched on I was able to see the response from the garmin servers after a login - I've redacted anything that may constitute a valid session ID:

    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < HTTP/1.1 200 OK
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Soup-Debug-Timestamp: 1650924847
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Soup-Debug: SoupMessage 21 (0x5581fa3600c0)
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Date: Mon, 25 Apr 2022 22:14:07 GMT
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Type: text/html;charset=UTF-8
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Transfer-Encoding: chunked
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Connection: keep-alive
    Apr 25 23:14:07 dodeca WebKitWebProcess[162561]: 0x7fa3615f6c00 - [pageID=8, frameID=3, main=1] DocumentLoader::DocumentLoader::stopLoading: m_frame=0x7fa3a4282000
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Credentials: true
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Methods: GET,POST,OPTIONS
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Access-Control-Allow-Origin: https://sso.garmin.com
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Language: en
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Application-Context: casServer:prod,prod-US_Olathe,cloud:2
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-B3-Traceid: 083a4b0d090a54a7028496b96ef21d0b
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Robots-Tag: noindex
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < X-Vcap-Request-Id: 5914a569-72c7-468e-7859-4608b9feb24e
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < CF-Cache-Status: DYNAMIC
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Expect-CT: max-age=604800, report-uri="">report-uri.cloudflare.com/.../expect-ct"
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ap%2FfJViup4ph42dLUov2j3T8FhO3%2FRHwIED%2BS%2BwgizyrkU8HONt3MJGObfAJHVw%2FxpQawP6S46XjHRV9bBwiQ2TbsEzwOgQzcwp5KU0IfOOAzfSZ8JpQijNIjaq%2FkIcm"}],"group":"cf-nel","max_age":604800}
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: CASTGC=*redacted*; Path=/sso; Secure; HttpOnly
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO=1; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GarminNoCache=true; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GarminBuyCacheKey=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO-GUID=*redacted*; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: GARMIN-SSO-CUST-GUID=*redacted*; Domain=garmin.com; Path=/
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Set-Cookie: __cfruid=*redacted*; path=/; domain=.sso.garmin.com; HttpOnly; Secure; SameSite=None
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Server: cloudflare
    Apr 25 23:14:07 dodeca WebKitWebProcess[162561]: BackForwardCache::addIfCacheable item: 9-20, size: 2 / 2
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < CF-RAY: 701a6e00383d88bf-LHR
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: < Content-Encoding: gzip
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]: <
    Apr 25 23:14:07 dodeca WebKitNetworkProcess[162560]:

    I would guess that either the CASTGC or one of the GARMIN-SSO cookies is the actual login cookie - but interestingly none of them have expiry values. This would mean that they will not persist beyond the session so when the application is closed the cookies are lost. But by this logic the login would not persist regardless of the platform that the SDK tools are run on, however I'm assuming that others are not seeing the same issue?

Children
  • , if you'd be willing to help us troubleshoot this please email [email protected] and we can get some additional logs from you to see what is going on. Mention this thread and ask to be redirected to me in the email.

  • Yes, the package "libsecret-1-0" is installed. I didn't install it manually so it's either part of the standard Ubuntu install, or is a dependency for something else I've installed.

  • Would you happen to have libsecret installed on this computer?

  • It looks like the "rememberMeChecked" property is set to false in the login window and also the "rememberMeShown" property is set to false which I guess hides the checkbox on that page.

    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > POST /sso/signin?service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirec
    tAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&locale=en&id=gauth-widget&cssUrl=https%3A%2F%2Fdeveloper.garmin.com%2Fdownloads%2Fconnect-iq%2Fsdk-manager-login.css&clientId=ConnectIqSdkM
    anager&rememberMeShown=false&rememberMeChecked=false&createAccountShown=true&openCreateAccount=false&displayNameShown=false&consumeServiceTicket=true&initialFocus=true&embedWidget=true&generateExtraServiceTicket=false&generateTwoExtraServiceTickets=fal
    se&generateNoServiceTicket=false&globalOptInShown=false&globalOptInChecked=false&mobile=false&connectLegalTerms=false&showTermsOfUse=false&showPrivacyPolicy=false&showConnectLegalAge=false&locationPromptShown=false&showPassword=true&useCustomHeader=fal
    se&mfaRequired=false&performMFACheck=false&rememberMyBrowserShown=false&rememberMyBrowserChecked=false HTTP/1.1
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Soup-Debug-Timestamp: 1650924846
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Soup-Debug: SoupSession 1 (0x5581f9fd0100), SoupMessage 21 (0x5581fa3600c0), SoupSocket 19 (0x5581fa3161c0)
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Host: sso.garmin.com
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Referer: sso.garmin.com/.../signin
    .com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&locale=en&id=gauth-widget&cssUrl=https%3A%2F%2Fdeveloper.garmin.com%2Fdownloads%2Fconnect-iq%2Fsdk-manager-login.
    css&clientId=ConnectIqSdkManager&rememberMeShown=false&rememberMeChecked=false&createAccountShown=true&openCreateAccount=false&displayNameShown=false&consumeServiceTicket=true&initialFocus=true&embedWidget=true&generateExtraServiceTicket=false&generate
    TwoExtraServiceTickets=false&generateNoServiceTicket=false&globalOptInShown=false&globalOptInChecked=false&mobile=false&connectLegalTerms=false&showTermsOfUse=false&showPrivacyPolicy=false&showConnectLegalAge=false&locationPromptShown=false&showPasswor
    d=true&useCustomHeader=false&mfaRequired=false&performMFACheck=false&rememberMyBrowserShown=false&rememberMyBrowserChecked=false
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Origin: https://sso.garmin.com
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Content-Type: application/x-www-form-urlencoded
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Accept-Encoding: gzip, deflate
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Accept-Language: en-US
    Apr 25 23:14:06 dodeca WebKitNetworkProcess[162560]: > Connection: Keep-Alive