You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lazy listeners do not work with Chalice local testing server #490
I want to perform operations when a member has joined a channel which takes more than 5 seconds, but I'm getting BrokenPipeError: [Errno 32] Broken pipe.
The minimal step to reproduce the same has been shown below while using the lazy listener it waits for 10 seconds before responding back.
It seems that you're using Chalice's local testing server. Can I ask you to make sure if the same situation arises without Chalice handler? To verify this, you can use App#start(), Flask adapter or any other adapters. If the issue is specific to Chalice use cases, we can narrow down the issue and may be able to resolve it more quickly.
Hi @seratch, thanks for the response.
Yes, I'm using Chalice local testing server. I tried using bolt app#start(), it worked perfectly fine. It seems the issue is specific to chalice.
changed the title [-]BrokenPipeError while responding back to a slack event in more than 3 seconds[/-][+]Lazy listeners do not work with Chalice local testing server[/+]on Oct 10, 2021
@Cyb-Nikh Thanks for sharing the result. Unfortunately, we don't have the bandwidth to resolve this issue in the short term. If you figure out how to fix this issue, your pull requests are always welcome!
As an immediate workaround, I would recommend using Flask dev server for your local development while still using Chalice for production deployments. For instance, your project structure can be:
bolt_app.py (configure App instance)
local.py (import the app from bolt_app.py and run the app with the default web server or Flask etc.)
prod.py (import the app from bolt_app.py and create Chalice handler)
With this way, you use only bolt_app.py and prod.py for production deployments.
Activity
seratch commentedon Oct 8, 2021
Hi @Cyb-Nikh, thanks for writing in!
It seems that you're using Chalice's local testing server. Can I ask you to make sure if the same situation arises without Chalice handler? To verify this, you can use
App#start(), Flask adapter or any other adapters. If the issue is specific to Chalice use cases, we can narrow down the issue and may be able to resolve it more quickly.Cyb-Nikh commentedon Oct 8, 2021
Hi @seratch, thanks for the response.
Yes, I'm using Chalice local testing server. I tried using bolt app#start(), it worked perfectly fine. It seems the issue is specific to chalice.
[-]BrokenPipeError while responding back to a slack event in more than 3 seconds[/-][+]Lazy listeners do not work with Chalice local testing server[/+]seratch commentedon Oct 10, 2021
@Cyb-Nikh Thanks for sharing the result. Unfortunately, we don't have the bandwidth to resolve this issue in the short term. If you figure out how to fix this issue, your pull requests are always welcome!
As an immediate workaround, I would recommend using Flask dev server for your local development while still using Chalice for production deployments. For instance, your project structure can be:
Appinstance)appfrombolt_app.pyand run the app with the default web server or Flask etc.)appfrombolt_app.pyand create Chalice handler)With this way, you use only
bolt_app.pyandprod.pyfor production deployments.I hope this was helpful.
Cyb-Nikh commentedon Oct 10, 2021
Thanks for the suggestion @seratch. This can be used as a temporary solution, though I would definitely try to dig further into the possible approach.