[SERVER-21000] Shell js objects that have been deserialised appear to be of non-existent type "BSON" Created: 19/Oct/15  Updated: 06/Dec/22  Resolved: 03/Dec/21

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 3.1.7
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Kevin Pulo Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-18531 Integrate spidermonkey as a new js-en... Closed
related to SERVER-19376 Make SpiderMonkey the default JS Engine Closed
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 Description   

Below shows it for serverStatus(), but it's the same for anything coming back from the server, eg. find().

$ /m/3.1.6/bin/mongo --norc
MongoDB shell version: 3.1.6
connecting to: test
> print(db.serverStatus())
[object Object]
>
bye
$ /m/3.1.7/bin/mongo --norc
MongoDB shell version: 3.1.7
connecting to: test
> print(db.serverStatus())
[object BSON]
> BSON
2015-10-14T23:51:54.075+1100 E QUERY    [thread1] ReferenceError: BSON is not defined :
@(shell):1:1
 
> Object
function Object() {
    [native code]
}
> var a = db.serverStatus()
> a instanceof BSON
2015-10-14T23:52:16.730+1100 E QUERY    [thread1] ReferenceError: BSON is not defined :
@(shell):1:1
 
> a instanceof Object
true
> a.pid instanceof NumberLong
true
> a.pid instanceof Object
true



 Comments   
Comment by Brooke Miller [ 03/Dec/21 ]

The shell is deprecated to external users, so please feel free to re-open if you are a core-db contributor and would like this feature for correctness testing purposes.

Generated at Thu Feb 08 03:55:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.