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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.