         }
       }
     }
-    return db.open(db_open_option)
+    # db.js promise is not real promise
+    _false_db_p = db.open(db_open_option)
+    return new Promise (resolve, reject) =>
+      resolve(_false_db_p)
 
   get_db_server_promise: () =>
-    console.log('return @db_server_promise')
+    console.log('return real promise @db_server_promise')
     return @db_server_promise
 
   close_db: () =>

    # sync scroll
    scrollSyncor.syncScroll(vm.ace_editor, $('#md_html_div'))

    # make new note
    noteManager.make_new_note().then(
      (note) =>
        vm.change_current_note(guid=note.guid, title=note.title, md=note.md)
        console.log('New note made: ' + JSON.stringify(note))
      (error) =>
        alert('make_new_note() failed!')
    ).catch (error) => alert('make new note failed!')

    # get note list
    vm.refresh_all_notes()

    KEYBOARD_HANDLER: 'settings.keyboard_handler'
    SHOW_GUTTER: 'settings.show_gutter'
    ACE_THEME: 'settings.ace_theme'
    CURRENT_NOTE_GUID: 'settings.current_note.guid'

  # --------------------------------------------------------
  # Editor Keyboard Handler Settings
