Bench update error with patch v10_0

Hi !
I’m trying to bench update my dev instance hosted on vagrant VM, but bench update fails with following error :

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm WARN frappe@ No description
Backing up sites...
Patching sites...
Migrating erpnext.vm
Executing frappe.patches.v10_0.refactor_social_login_keys in erpnext.vm (d56cb677eaab3383)
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 94, in <module>
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 18, in main
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/", line 222, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 31, in migrate
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/patches/v10_0/", line 49, in execute
    social_login_keys = frappe.get_doc("Social Login Keys", "Social Login Keys")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 638, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 66, in get_doc
    controller = get_controller(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 36, in get_controller
    module = load_doctype_module(doctype, module_name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 187, in load_doctype_module
    raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Social Login Keys (frappe.integrations.doctype.social_login_keys.social_login_keys Error: No module named social_login_keys.social_login_keys)

I have a custom app that I disabled in case it was responsible of this error, but it doesn’t change anything

If someone know what to do, please tell me

We have fixed this issue, please run bench update again.

Thanks @saurabh6790
I’m sorry it doesn’t work… is it because i’m on vagrant-box ? I did multiple bench update, even tried to shutdown VM, reload it then bench update, but no chance…
What can I do ?
Thanks again

frappe@erpnext:~/frappe-bench$ bench version
erpnext 10.0.5
frappe 10.0.6

Edit :
git pull succeeds, I do have the patch you just commited in apps/frappe/frappe/patches/v10_0/

	frappe.reload_doc("integrations", "doctype", "social_login_key", force=True)

	if not frappe.db.exists('DocType', 'Social Login Keys'):

But it doesn’t change anything :frowning:

I finally changed branch to master (I don’t really need to be on the dev branch). It resolves my issue.