Repository navigation
Unable to start the app in Windows OS #170
Description
Activity
@athifongoqa hmm, it seems that you environment is failing to load
⚡️in the app for some reason. We will update the code not to fail on any environment in future versions.A workaround I can suggest at this time is to use a Web framework along with Bolt. This means you do not use
app.start()method to spin up your app.Here is a simple example using Flask. If you prefer others, you can find many examples here: https://github.com/slackapi/bolt-python/tree/v1.1.1/examples
requirements.txt
slack_bolt>=1.1.1,<1.2 Flask>=1.1app.py
from flask import Flask, request from slack_bolt import App from slack_bolt.adapter.flask import SlackRequestHandler app = App() @app.command("/hello") def hello(ack): ack("Hi!") flask_app = Flask(__name__) handler = SlackRequestHandler(app) @flask_app.route("/slack/events", methods=["POST"]) def slack_events(): return handler.handle(request) if __name__ == "__main__": # app.start(3000) flask_app.run(port=3000, debug=True)
How to run
pip install -r requirements.txt export SLACK_SIGNING_SECRET=*** export SLACK_BOT_TOKEN=xoxb-*** python app.py
- addedbugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested
on Dec 5, 2020 Two things:
- I am not all too familiar with what 'exporting' the signing secret and token actually means but I used
set SIGNING_SECRETin the terminal bc apparentlyexportis for Mac & Linux. Did I understand this correctly? If not, please advise further. Apologies if it is a silly question. - I am now getting an error message with regards to not having an argument for App(), it seems.
- I am not all too familiar with what 'exporting' the signing secret and token actually means but I used
1
Yes, you can use
setcommand for configuring env variables on Windows OS.2
This is related to question 1. Once you set both
SLACK_BOT_TOKENandSLACK_SIGNING_SECRETin env variables, the app should successfully spin up.So apparently
exportworks better on Windows thanset. Literally just changed that and all seems to be working fine now, thank you! I may be back soon for other issues in future haha! Keep well, Seratch!- added a commit that references this issue
on Dec 8, 2020 Hi, I'm also seeing this issue when trying to use this on Ubuntu 18.04, could we get the same fix for Linux?
@christheodosius Thanks for reporting this. We'll improve this at #309
@christheodosius Thanks for reporting this. We'll improve this at #309
Fantastic, thank you so much!
- changed the title
[-]Unable to start the app[/-][+]Unable to start the app in Windows OS[/+]on Mar 4, 2022

Good day, I'm trying to follow along with the Bolt for Python documentation on https://slack.dev/bolt-python/tutorial/getting-started. For some reason, it won't run. Please advise, thank you.
The
slack_boltversionslack-bolt==1.1.1
slack-sdk==3.1.0
slackclient==2.9.3
Python runtime version
Python 3.8.6
OS info
Microsoft Windows [Version 10.0.18363.1198]
Steps to reproduce:
(Based off steps given in the documentation)
Expected result:
For the app to let me know that it’s up and running.
Actual result:
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.