I want to uninstall a app i created in my ERPNext but there is a issue

I created a custom app “crmpro” in frappe bench > apps. when i tried to install it in my site. there i got some error like “module crmpro is not found”. then i tried to uninstall the app.
I used this command : bench --site tech.local uninstall-app crmpro

but again i got some error, here im shared my log

:~/frappe-bench/apps$ bench --site tech.local uninstall-app crmpro
Uninstalling App crmpro from Site tech.local…
All doctypes (including custom), modules related to this app will be deleted. Are you sure you want to continue? [y/N]: y
Backing up…
Deleting Module ‘CRMPro’

  • removing Module Def ‘CRMPro’…
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
    Traceback (most recent call last):
    File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 559, in connect
    sock = self._connect()
    File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 615, in _connect
    raise err
    File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 603, in _connect
    sock.connect(socket_address)
    ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 407, in call
result = fn(*args, **kwargs)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 387, in get_redis_conn
_redis_queue_conn = RedisQueue.get_connection()
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/redis_queue.py”, line 39, in get_connection
conn.ping()
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 1378, in ping
return self.execute_command(‘PING’)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 898, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 1192, in get_connection
connection.connect()
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 563, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:11000. Connection refused.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/commands/site.py”, line 903, in uninstall
remove_app(app_name=app, dry_run=dry_run, yes=yes, no_backup=no_backup, force=force)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/installer.py”, line 390, in remove_app
drop_doctypes = _delete_modules(modules, dry_run=dry_run)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/installer.py”, line 435, in _delete_modules
frappe.delete_doc(“Module Def”, module_name, ignore_on_trash=True, force=True)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/init.py”, line 1259, in delete_doc
return frappe.model.delete_doc.delete_doc(
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/model/delete_doc.py”, line 150, in delete_doc
frappe.enqueue(
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/init.py”, line 2171, in enqueue
return frappe.utils.background_jobs.enqueue(*args, **kwargs)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 104, in enqueue
q = get_queue(queue, is_async=is_async)
File “/home/frappeadmin/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 346, in get_queue
return Queue(generate_qname(qtype), connection=get_redis_conn(), is_async=is_async)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 324, in wrapped_f
return self(f, *args, **kw)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 404, in call
do = self.iter(retry_state=retry_state)
File “/home/frappeadmin/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 361, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7fb3b1806b00 state=finished raised ConnectionError>]

I think, you bench stop. so when uninstall the app from any site then bench should be started.

bench --site tech.local uninstall-app crmpro --force

Thank you its actually worked for me but when i again created the app and try to install it in my site i got this error.

:~/frappe-bench$ bench --site tech.local install-app crm_pro

Installing crm_pro…
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11000. Redis reported error: Error 111 connecting to 127.0.0.1:11000. Connection refused.
An error occurred while installing crm_pro: RetryError[<Future at 0x7f3d6e061570 state=finished raised ConnectionError>]
Traceback (most recent call last):
File “env/lib/python3.10/site-packages/redis/connection.py”, line 559, in connect
sock = self._connect()
File “env/lib/python3.10/site-packages/redis/connection.py”, line 615, in _connect
raise err
File “env/lib/python3.10/site-packages/redis/connection.py”, line 603, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “env/lib/python3.10/site-packages/tenacity/init.py”, line 407, in call
result = fn(*args, **kwargs)
File “apps/frappe/frappe/utils/background_jobs.py”, line 387, in get_redis_conn
_redis_queue_conn = RedisQueue.get_connection()
File “apps/frappe/frappe/utils/redis_queue.py”, line 39, in get_connection
conn.ping()
File “env/lib/python3.10/site-packages/redis/client.py”, line 1378, in ping
return self.execute_command(‘PING’)
File “env/lib/python3.10/site-packages/redis/client.py”, line 898, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File “env/lib/python3.10/site-packages/redis/connection.py”, line 1192, in get_connection
connection.connect()
File “env/lib/python3.10/site-packages/redis/connection.py”, line 563, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:11000. Connection refused.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 400, in install_app
_install_app(app, verbose=context.verbose, force=force)
File “apps/frappe/frappe/installer.py”, line 310, in install_app
sync_jobs()
File “apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py”, line 173, in sync_jobs
clear_events(all_events)
File “apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py”, line 240, in clear_events
frappe.delete_doc(“Scheduled Job Type”, event.name)
File “apps/frappe/frappe/init.py”, line 1259, in delete_doc
return frappe.model.delete_doc.delete_doc(
File “apps/frappe/frappe/model/delete_doc.py”, line 150, in delete_doc
frappe.enqueue(
File “apps/frappe/frappe/init.py”, line 2171, in enqueue
return frappe.utils.background_jobs.enqueue(*args, **kwargs)
File “apps/frappe/frappe/utils/background_jobs.py”, line 104, in enqueue
q = get_queue(queue, is_async=is_async)
File “apps/frappe/frappe/utils/background_jobs.py”, line 346, in get_queue
return Queue(generate_qname(qtype), connection=get_redis_conn(), is_async=is_async)
File “env/lib/python3.10/site-packages/tenacity/init.py”, line 324, in wrapped_f
return self(f, *args, **kw)
File “env/lib/python3.10/site-packages/tenacity/init.py”, line 404, in call
do = self.iter(retry_state=retry_state)
File “env/lib/python3.10/site-packages/tenacity/init.py”, line 361, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f3d6e061570 state=finished raised ConnectionError>]

The app “crm_pro” is created inside my frappe bench > apps. but when i try to install it in my site this error appeared.

If the bench is in development mode and the site is running using the bench serve command with a specific port, this issue occurs. However, if the site is running using the bench start command, the issue does not occur.

My site is in development mode and im using bench start to run my site.

And i checked the about option in my ERPNext site. which is located on top right corner of the page near administrator profile. it shows the crm_pro(Custom app) under installed apps in my site.

I’m not sure what’s happening in your case. I’ve been working in development mode for the last three years, and this error usually occurs if the bench is stopped, and bench serve command is used. I’m not sure what’s causing the issue for you.

Have a look at this, custom app is created under installed apps. is it now ok. or may cause any issue in future.

Depend on custom app. You know how to create customizations or develop an app. I have some understanding, but not as much as you. :sweat_smile:

1 Like

Sir actually im a beginner for this overall frappe platform. so my doubt is when is install the app to my site it shows redis 111 error but inside the site, the app is created so only im confused. anyway thank you.