- 
    Type:Bug 
- 
    Resolution: Unresolved
- 
    Priority:Minor - P4 
- 
    None
- 
    Affects Version/s: 1.6.0
- 
    Component/s: None
- 
    None
- 
        3
- 
        None
Sometimes when I run db.printShardingStatus() in mongosh then database objects are not properly printed, I get this output:
db.printShardingStatus()
...
databases
[
  { database: [Object], collections: [Object] },
  { database: [Object], collections: {} },
  { database: [Object], collections: {} },
  { database: [Object], collections: [Object] },
  { database: [Object], collections: {} },
  { database: [Object], collections: {} },
  { database: [Object], collections: {} },
  { database: [Object], collections: {} }
]
In my settings I have config.set("inspectDepth", 12), so this should be fine.
Often (but not always) the output is correct like
databases
[
  {
    database: { _id: 'config', primary: 'config', partitioned: true },
    collections: {
      'config.system.sessions': {
        shardKey: { _id: 1 },
        unique: false,
        balancing: true,
        chunkMetadata: [
          { shard: 'shard_01', nChunks: 256 },
          { shard: 'shard_02', nChunks: 256 },
          { shard: 'shard_03', nChunks: 256 },
          { shard: 'shard_04', nChunks: 256 }
        ],
        chunks: [
          'too many chunks to print, use verbose if you want to force print'
        ],
        tags: []
      }
    }
  },
...
I did not manage it to reproduce the error.
I tried to start mongosh with and without --norc (in my .mongoshrc.js I load mongocompat snippets). I tried to delete ~/.mongodb/mongosh/config but nothing showed the wrong output intentionally.
Any idea to make the output consistent?