Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-1268

ListenerURL returns Hostname.local instead of LocalHostname.local

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 3.1.0
    • 3.0
    • LiteCore
    • Security Level: Public
    • None
    • Build Team 2020 Sprint 18, LiteCore 94
    • 3

    Description

      Edit: After Ming Ho helped me with information to reproduce the issue, updating the description

      When the mac machine has HostName as well as LocalHostname, API returns `<hostname>+.local` as listener URL

      Steps:
      1. `scutil --set LocalHostName`, set it to LocalHostName
      2. `scutil --set HostName`, set it to HostName

      couchbase-lite-ios 20:09:40 $ scutil --set LocalHostName
      LocalHostName [JayMachine]: LocalHostName
      couchbase-lite-ios 20:09:53 $ scutil --get LocalHostName
      LocalHostName
      couchbase-lite-ios 20:14:59 $ scutil --set HostName
      HostName [JayHostName]: HostName
      couchbase-lite-ios 20:15:17 $ scutil --get HostName
      HostName
      

      3. Start the listener in iPhone simulator on same mac
      4. Check `listener.url` contains `wss://hostname.local:4985/db`

      2020-09-08 20:11:44.917955-0700 CBL_EE_Tests[61514:2035910] *** URL: (
          "wss://HostName.local:4985/otherdb",
          ..... 
      )
      

      5. Check the System Preferences > Sharing , you will see the <localhost>.local as local network name.

      Expected result:
      `listsner.url` should contain `wss://LocalHostName.local:4985/otherdb` instead of `wss://HostName.local:4985/otherdb`

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              callum.birks Callum Birks
              Jayahari.Vavachan Jay Vavachan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty