Closed chakanish closed 5 years ago
I have the same error. Using botpress CE 11.3.0 Running ok in localhost, but not running in Heroku. Heroku Logs says:
18:30:46.060 Launcher Error starting Botpress [VError, Fatal error loading module "MODULES_ROOT/.wh.basic-skills": Cannot find module '/botpress/modules/.cache/modulee3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855']
2019-01-23T18:30:46.062286+00:00 app[web.1]: ----- STACK -----
2019-01-23T18:30:46.062288+00:00 app[web.1]: VError: Fatal error loading module "MODULES_ROOT/.wh.basic-skills": Cannot find module '/botpress/modules/.cache/module__e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
2019-01-23T18:30:46.062290+00:00 app[web.1]: at /snapshot/build-linux/out/bp/bootstrap.js:0:0
2019-01-23T18:30:46.062292+00:00 app[web.1]: at Generator.next (
............................................................
Help Please
@chakanish @Voxelart Which version exactly did you use to deploy on Heroku? (Docker image, or pushing from your local installation?) Can you show us the relevant part of your botpress.config file ?
Hi Allardy, thak you so much for your fast response. I don't know what you mean by what version am I using for deploy on Heroku. Do you reffer to the botpress version? In my case, locally I am using botpress CE 11.3.0 ( botpress-ce-v11_3_0-linux-x64 ), I have downladed it from your webpage --> https://s3.amazonaws.com/botpress-binaries/botpress-ce-v11_3_0-linux-x64.zip
This is the content I have in my Dockerfile: FROM botpress/server:ce-v11_3_0 WORKDIR /botpress CMD ["./bp"]
For all this I am using the guide you have in your web for botpress 11.3.0 --> https://botpress.io/docs/deploy/hosting/
The OS I am using is CentOS 7. I have also tried using Linux Mint 19.1 Tessa , but Heroku is giving the same error in both cases.
My Heroku CLI version is --> heroku/7.19.4-beta.2a7fcad linux-x64 node-v11.3.0
I have tried using in my pc the node versions 10.15.0 and 11.7.0 via NVM and same heroku error :(
This is the configuration tha appears in my botpress.config.json file
{ "$schema": "../../botpress.config.schema.json", "httpServer": { "host": "localhost", "port": 3000, "backlog": 0, "bodyLimit": "100kb", "cors": { "enabled": true } }, "database": { "type": "sqlite", "location": "%BOTPRESS_DIR%/data/storage/core.sqlite", "host": "localhost", "port": 5432, "user": "postgres", "password": "", "database": "botpress_test" }, "ghost": { "enabled": false }, "dialog": { "janitorInterval": "10s", "timeoutInterval": "2m", "sessionTimeoutInterval": "30m" }, "logs": { "expiration": "2 weeks", "janitorInterval": "30s" }, "modules": [ { "location": "MODULES_ROOT/analytics", "enabled": true }, { "location": "MODULES_ROOT/basic-skills", "enabled": true }, { "location": "MODULES_ROOT/builtin", "enabled": true }, { "location": "MODULES_ROOT/channel-web", "enabled": true }, { "location": "MODULES_ROOT/nlu", "enabled": true }, { "location": "MODULES_ROOT/qna", "enabled": true } ], "licenseKey": "paste your license key here", "sendUsageStats": true, "dataRetention": { "policies": {} }, "jwtSecret": "~tv9R14XGIf7mAaD31B1XUL4463YfkeSHdEI7tvh" }
At this momment I am using ok botpress 10.5 in heroku. I have deployed it using Git and had no problem. botpress 10.5 runs ok in heroku.
I only have problems deploying botpress 11.3.0 :(
I don know if you need more info... Just let me know! Thank you so much :)
@Voxelart can you confirm that your modules/
directory is NOT git versioned and not part of the docker image?
Hi @slvnperron
I can't confirm you if modules/
is or is NOT git versioned, since this is my first contact with git repositories and heroku ( I am using those because I needed them for running your beutiful program )
Anyways, I have investigated what do you mean by "git versioned" and I found in internet a command
that seems to lists the git versioned files (I don't know if this is correct or not !) I found it here: https://stackoverflow.com/questions/16067048/how-to-list-all-not-versioned-files-and-directories-in-a-git-working-copy
This is the result:
$ git ls-files -o fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If it helps, here you have some screenshots of my file directory showing also the hiddent files.
Botpress chatbot route folder -->
About Dockers Image....
It's also the first time I use Dockers images and I don't know much about how to use it, so I don't know if modules/
is part of the docker image or not.
For deploying botpress 11 I have used your guide https://botpress.io/docs/deploy/hosting/ and done steap by steap what it say.
How can I know if modules/
directory is or NOT is git versioned and not part of the docker image?
Thank you so much for helping me :)
@Voxelart I just tried to deploy that image and i'm getting exactly the same result as you. Weird thing is that I don't get that error using the same image on my local docker instance, and I didn't have that error when I deployed on Heroku in the past month.
We're getting ready to ship 11.4, so we'll make sure that it correctly deploys on Heroku, we'll keep you updated
Thank so much @allardy for your update :) I Will be waiting for Botpress 11.4 and hope this time I can have it running in Heroku :+1:
@Voxelart @chakanish just to let you know that 11.4 is out. It should fix this issue, please let me know
Hi @EFF
I don't know if I am doing somethig whrong, but it still don't work's to me.
Since you haven't published botpress 11.4 in your webpage, I have downloaded the zip file from the github repository and I have followed the quick start guide you have published here in git where you tell us to run these shell commands:
yarn
yarn build
yarn start
After doing this, botpress runs ok in my local machine as you can see in this screenshot:
But the problem with herocu in my case continues. These are the steaps I have done for deploying botpress in heroku: -I have created a Dockerfile containing this lines:
FROM botpress/server:v11_4_0
WORKDIR /botpress
CMD ["./bp"]
And them, I have run this shell commands in the botpress folder:
heroku login
heroku container:login
heroku container:push web -app mychatbotapp
heroku container:release web -app mychatbotapp
Doing that, when I try to run botpress in the browser I get an error and error like this: And the heroku CLI log give me the same error as allways, as you can see in the next image:
The OS I am using for this test is Linux Mint 19.1 Tessa 64 bits
If it helps, this is a screenshot of the root botpress 11.4 folder:
And this is a screenshot of the modules folder:
If any news about this issue, please, let me know. Thank you so much for your interest in helping us.
@Voxelart thanks for letting me know, we'll look at the issue right away !
@Voxelart The issue is fixed on the master branch. We've found out that Heroku no longer automatically delete files marked as such, so those deleted files were detected incorrectly by BP. That issue wasn't visible when running Docker locally since it handles them differently.
We've found another issue on heroku which prevents you from talking with the bot. We'll release an official docker image when this is fixed, but if you want to test, you can use the docker image 2019-01-30-heroku_test2
We'll keep you updated.
Hi @allardy I just want to let you know that finally, I was able ok to get botpress running in Heroku by using the Docker image 2019-01-30-heroku_test2 as you suggested. I'm so happy. Thank you so much :)
If someone more is facing the same problem, let me tell you that you only have to point your docker image to use the 2019-01-3 version, and you can do that by writing this in your Dockerfile:
FROM botpress/server:2019-01-30-heroku_test2
WORKDIR /botpress
CMD ["./bp"]
Here you have some screenshots where you can see that now it works ok in Heroku :)
Thank you so much for your interest and support :)
@Voxelart @chakanish Both issues were fixed in the latest release: v11_4_1 . Let us know if you have any other issue !
Closing this, feel free to reopen if you still experience the issue with >= 11.4.1
Getting the following error when running botpress app on Heroku. Botpress running from local
Launcher Error starting Botpress [VError, Fatal error loading module "MODULES_ROOT/.wh.basic-skills": Cannot find module '/botpress/modules/.cache/module__e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'