Problem with initial deployment: SQlite problems on Heroku


#1

in trying to deploy the welcome-bot, as-is to heroku, version 11.1, i get the following fail in the Heroku log (links modified). i tried setting up postgres as suggested in the deployment instructions, but that did not change my error. any idea what i am missing?

2018-12-13T04:32:13.679299+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-13T04:32:24.991093+00:00 heroku[web.1]: Starting process with command `./bp`
2018-12-13T04:32:29.025859+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-13T04:32:28.989354+00:00 heroku[web.1]: Process exited with status 1
2018-12-13T04:32:28.908505+00:00 app[web.1]: Knex: run
2018-12-13T04:32:28.908564+00:00 app[web.1]: $ npm install sqlite3 --save
2018-12-13T04:32:28.908566+00:00 app[web.1]: Error: /botpress/bindings/node_sqlite3.node: invalid ELF header
2018-12-13T04:32:28.908568+00:00 app[web.1]:     at Object.Module._extensions..node (internal/modules/cjs/loader.js:729:18)
2018-12-13T04:32:28.908570+00:00 app[web.1]:     at Module.load (internal/modules/cjs/loader.js:610:32)
2018-12-13T04:32:28.908572+00:00 app[web.1]:     at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
2018-12-13T04:32:28.908573+00:00 app[web.1]:     at Function.Module._load (internal/modules/cjs/loader.js:541:3)
2018-12-13T04:32:28.908575+00:00 app[web.1]:     at Module.require (internal/modules/cjs/loader.js:648:17)
2018-12-13T04:32:28.908576+00:00 app[web.1]:     at Module.require (pkg/prelude/bootstrap.js:1160:31)
2018-12-13T04:32:28.908578+00:00 app[web.1]:     at Module.module_1.default.require (/snapshot/build-linux/out/bp/sdk/rewire.js:0:0)
2018-12-13T04:32:28.908580+00:00 app[web.1]:     at require (internal/modules/cjs/helpers.js:20:18)
2018-12-13T04:32:28.908581+00:00 app[web.1]:     at Object.<anonymous> (/snapshot/build-linux/node_modules/sqlite3/lib/sqlite3.js:4:15)
2018-12-13T04:32:28.908605+00:00 app[web.1]:     at Module._compile (pkg/prelude/bootstrap.js:1255:22)
2018-12-13T04:32:28.908653+00:00 app[web.1]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
2018-12-13T04:32:28.908654+00:00 app[web.1]:     at Module.load (internal/modules/cjs/loader.js:610:32)
2018-12-13T04:32:28.908656+00:00 app[web.1]:     at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
2018-12-13T04:32:28.908658+00:00 app[web.1]:     at Function.Module._load (internal/modules/cjs/loader.js:541:3)
2018-12-13T04:32:28.908659+00:00 app[web.1]:     at Module.require (internal/modules/cjs/loader.js:648:17)
2018-12-13T04:32:28.908661+00:00 app[web.1]:     at Module.require (pkg/prelude/bootstrap.js:1160:31)
2018-12-13T04:55:29.618662+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/s/welcome-bot" host=protected-wildwood-46823.herokuapp.com request_id=3d00fb60-2a79-4d35-a19d-e4a543fd4c79 fwd="185.3.147.212" dyno= connect= service= status=503 bytes= protocol=https
2018-12-13T04:55:29.880061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=protected-wildwood-46823.herokuapp.com request_id=60e4f6fd-d432-499b-ace6-6a87c7e6c383 fwd="185.3.147.212" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2018-12-13T01:44:41.897245+00:00 app[web.1]:     at Module.load (internal/modules/cjs/loader.js:610:32)
2018-12-13T01:44:41.897246+00:00 app[web.1]:     at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
2018-12-13T01:44:41.897248+00:00 app[web.1]:     at Function.Module._load (internal/modules/cjs/loader.js:541:3)
2018-12-13T01:44:41.897249+00:00 app[web.1]:     at Module.require (internal/modules/cjs/loader.js:648:17)
2018-12-13T01:44:41.897250+00:00 app[web.1]:     at Module.require (pkg/prelude/bootstrap.js:1160:31)
2018-12-13T04:32:24.991093+00:00 heroku[web.1]: Starting process with command `./bp`
2018-12-13T04:32:29.025859+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-13T04:32:28.989354+00:00 heroku[web.1]: Process exited with status 1
2018-12-13T04:55:29.618662+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/s/welcome-bot" host=protected-wildwood-46823.herokuapp.com request_id=3d00fb60-2a79-4d35-a19d-e4a543fd4c79 fwd="185.3.147.212" dyno= connect= service= status=503 bytes= protocol=https
2018-12-13T04:55:29.880061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=protected-wildwood-46823.herokuapp.com request_id=60e4f6fd-d432-499b-ace6-6a87c7e6c383 fwd="185.3.147.212" dyno= connect= service= status=503 bytes= protocol=https

#2

@tilnow, botpress 11 isn’t considered stable yet. I suggest you to use 10.x for now.


#3

thank you. i was hoping to avoid any porting issues as ver 11 seems different form ver 10. any idea when to expect ver 11 to be stable (or this issue fixed?)


#4

possibly the problem is not version being unstable.

i read https://medium.com/@devontem/solved-invalid-elf-header-with-docker-and-bcrypt-444426d63605 and it makes me suspect that the problem is that i am using a windows machine. And this makes the sqlite nodejs have an invalid ELF header.

i tried his suggested solution and it did not help

  1. do you think he may be right?
  2. any easy workaround you can suggest?

#5

moving along, i copied the sqlite node module from the linux dist and now it runs. however when i try to connect to my chatbot, it redirects to localhost wiith a long url and fails.


#6

In addition, the bot does not now recognize any content, etc:

2018-12-14T11:43:22.128244+00:00 app[web.1]: Error: Content type “builtin_text” is not a valid registered content type ID

is this related to the redirect problem or the fact i replaced the sqlite node.


#7

update. i installed in ubuntu under windows.
bp server runs great on heroku, out of the box.

BUT

when i run the welcome-bot, it has the same feature of trying to redirect to localhost on my computer. is there some setting in the bp server i should change before i deploy it to heroku?

when i run embeded (using the example in “examples” with “localhost” replaced by app name, it fails, saying “NET::ERR_CERT_COMMON_NAME_INVALID”, which i assume may be a problem with heroku.


#8

status update:
embeded chatbot works now (when under windows i dockered the linux version to Heroku)
from browser command line, <>/s/<> does not work and redirects to local host. i need to do <>/lite/<>/?m=channel-web…