FlaskSocketIO – RuntimeError: Working outside of application context. To solve this, set up an application context with app.app_context() Flask flyf35 — 8 April 2023 · Comments off Solution with app.app_context(): emit('notification_response', resp, namespace='/', broadcast=True)