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

js-bson node test failures on latest Node.js version (v21.3.0)

    • Type: Icon: Build Failure Build Failure
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: bson-6.2.0
    • Component/s: BSON
    • 0
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      https://spruce.mongodb.com/task/node_bson_linux_node_tests_latest_99cd066c7c70b43fa58985c1ac3150f6a16861bd_23_11_30_18_30_21/logs?execution=2

      js-bson is failing the node-tests-latest task on Node v21.3.0 due to missing and/or extraneous build files.

      [2023/11/30 14:09:59.698]   1) ByteUtils
      
      [2023/11/30 14:09:59.698]        randomBytes fallback case when crypto is not present
      
      [2023/11/30 14:09:59.698]          web
      
      [2023/11/30 14:09:59.698]            "before all" hook for "UUID constructor will invoke Math.random 16 times":
      
      [2023/11/30 14:09:59.698]      Error: ENOENT: no such file or directory, open '/data/mci/10b193d5010c936f40d5f0d4a7f93285/src/lib/bson.cjs'
      
      [2023/11/30 14:09:59.698]       at Object.readFileSync (node:fs:453:20)
      
      [2023/11/30 14:09:59.698]       at loadCJSModuleBSON (test/load_bson.js:41:19)
      
      [2023/11/30 14:09:59.698]       at Context.<anonymous> (test/node/byte_utils.test.ts:604:55)
      
      [2023/11/30 14:09:59.698]       at processImmediate (node:internal/timers:478:21)
      
      [2023/11/30 14:09:59.698] 
      
      [2023/11/30 14:09:59.698]   2) ByteUtils
      
      [2023/11/30 14:09:59.698]        randomBytes fallback case when crypto is not present
      
      [2023/11/30 14:09:59.698]          nodejs es module environment dynamically imports crypto
      
      [2023/11/30 14:09:59.698]            "before each" hook for "UUID constructor will use crypto randomBytes":
      
      [2023/11/30 14:09:59.698]      Error: ENOENT: no such file or directory, open '/data/mci/10b193d5010c936f40d5f0d4a7f93285/src/lib/bson.mjs'
      
      [2023/11/30 14:09:59.698]       at async open (node:internal/fs/promises:633:25)
      
      [2023/11/30 14:09:59.698]       at async Object.readFile (node:internal/fs/promises:1242:14)
      
      [2023/11/30 14:09:59.698]       at async loadESModuleBSON (test/load_bson.js:57:16)
      
      [2023/11/30 14:09:59.698]       at async Context.<anonymous> (test/node/byte_utils.test.ts:635:29)
      
      [2023/11/30 14:09:59.698] 
      
      [2023/11/30 14:09:59.698]   3) ByteUtils
      
      [2023/11/30 14:09:59.698]        randomBytes fallback case when crypto is not present
      
      [2023/11/30 14:09:59.698]          react native environment when crypto is not present
      
      [2023/11/30 14:09:59.698]            "before all" hook for "a console warning is logged with a message about how to make crypto available":
      
      [2023/11/30 14:09:59.698]      Error: ENOENT: no such file or directory, open '/data/mci/10b193d5010c936f40d5f0d4a7f93285/src/lib/bson.rn.cjs'
      
      [2023/11/30 14:09:59.698]       at Object.readFileSync (node:fs:453:20)
      
      [2023/11/30 14:09:59.698]       at loadReactNativeCJSModuleBSON (test/load_bson.js:28:19)
      
      [2023/11/30 14:09:59.698]       at Context.<anonymous> (test/node/byte_utils.test.ts:662:66)
      
      [2023/11/30 14:09:59.698]       at processImmediate (node:internal/timers:478:21)...

            Assignee:
            Unassigned Unassigned
            Reporter:
            warren.james@mongodb.com Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: