remoteDS.add('',{emailAddress: '',coffee: 'espresso'});


I try following code to run from console

var remoteDS = new App.RemoteDataStore(“”);
remoteDS.add(‘’,{emailAddress: ‘’,coffee: ‘espresso’});

  1. {errmsg: “This MongoDB deployment does not support retryable… add retryWrites=false to your connection string.”, originalError: {…}, name: “MongoError”}

  2. errmsg: “This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.”

  3. name: “MongoError”

  4. originalError: {operationTime: “6842960496937664513”, ok: 0, errmsg: “Transaction numbers are only allowed on storage engines that support document-level locking”, code: 20, codeName: “IllegalOperation”, …}

  5. proto: Object


It seems I’m facing the same issue:

I try next code in the console:

var remoteDS = new App.RemoteDataStore("");
remoteDS.add('', {emailAddress: '', coffee: 'black coffee'});

And I’m getting:

1. errmsg: "This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string."
2. name: "MongoError"

Thanks for your help!

Cristian Jáuregui S.

I am facing the same issue after disabling CORS in Chrome by launching it from the command line as follows:
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=~/chromeTemp

Is there a fix for this???

This chapter and the next are rather useless if not :frowning:

same error too. The status code is 200 yet. I have tried with Chrome and Firefox. Can any instructor of the book explain why?

Same issue. I imagine they have to fix this on their end when they connect to MongoDB. Maybe it’s a MongoDB 4.2 issue since the default for retryWrites is true?

If you want to start Chapter 14, and you want to use DataStore, you can use the following to mimic the Promise and delay of Ajax calls:

(function(window) {
  'use strict';

  var App = window.App || {};
  var Promise = window.Promise;

  function DataStore() { = {};

  function promiseResolvedWith(value, sideEffect) {
    var promise = new Promise(function(resolve, reject) {
      setTimeout(function() { // Add fake network delay
        if (sideEffect) {
      }, 2000);

    return promise;

  DataStore.prototype.add = function(key, val) {
    return promiseResolvedWith(null, function() {[key] = val;
      console.log('added data');

  DataStore.prototype.get = function(key) {
    return promiseResolvedWith([key], null);

  DataStore.prototype.getAll = function() {
    return promiseResolvedWith(, null);

  DataStore.prototype.remove = function(key) {
    return promiseResolvedWith(null, function() {
      console.log('removed data');

  App.DataStore = DataStore;
  window.App = App;