Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2668

Maximum call stack size exceeded error with useUnifiedTopology and ipv6

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.5.9
    • Component/s: None
    • Labels:

      Using mongodb version 3.5.9, on node 12.18.0, on OSX, with mongo running locally bound to the ipv6 loopback (::1)

       

      The following correctly connects:

      > MongoClient.connect('mongodb://[::1]/test')
      

      However, if you set "useUnifiedTopology" to true, it fails:

      > MongoClient.connect('mongodb://[::1]/test', { useUnifiedTopology: true })
      Uncaught RangeError: Maximum call stack size exceeded
          at Domain.enter (domain.js:294:35)
          at MongoClient.EventEmitter.emit (domain.js:504:10)
          at NativeTopology.<anonymous> (/Users/mkuehl/projects/losant-platform/node_modules/mongodb/lib/operations/connect.js:716:19)
          at NativeTopology.emit (events.js:315:20)
          at NativeTopology.EventEmitter.emit (domain.js:505:15)
          at Server.<anonymous> (/Users/mkuehl/projects/losant-platform/node_modules/mongodb/lib/core/utils.js:23:71)
          at Server.emit (events.js:315:20)
          at Server.EventEmitter.emit (domain.js:505:15)
      

      If I create an entry in my /etc/hosts file that resolves to "::1", the connect call will work. So it only seems to be an error with direct usage of an ipv6 address combined with useUnifiedTopology.

            Assignee:
            Unassigned Unassigned
            Reporter:
            michael@losant.com Michael Kuehl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: