Message "Unhandled rejection TypeError: Argument must be a string" is shown when is using the "mongodb" "2.2.16" version dependence in the cloud application logs

Solution Verified - Updated -

Issue

  • Message Unhandled rejection TypeError: Argument must be a string is shown when is using the mongodb 2.2.16 version dependence in the cloud application logs

The following is an example of this message error.

Unhandled rejection TypeError: Argument must be a string
    at TypeError (native)
    at Buffer.write (buffer.js:576:21)
    at serializeObjectId 

Environment

  • Red Hat Mobile Application Platform ( RHMAP ) - 3.15.1
  • mongodb
  • NodeJS

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content