Giter Club home page Giter Club logo

messaging's Introduction

Botpress Messaging

npm npm

The botpress messaging server provides a standardized messaging api to communicate with the following channels :

  • Messenger
  • Slack
  • Teams
  • Telegram
  • Twilio
  • Smooch
  • Vonage

Getting started

Prerequisites

  1. Yarn v1+ (https://yarnpkg.com/)
  2. Docker (https://www.docker.com/) and docker-compose (https://docs.docker.com/compose/)
  3. Install recommended VSCode extensions
  4. Optionally install tilt

Useful Commands

The simplest way to run the setup locally would be with tilt.

> tilt up

Then open http://localhost:10350 to use the tilt UI. Tilt will start 4 processes:

  1. messaging: messaging server (port 3100)
  2. inject-build: inject script build that watches for changes
  3. inject-serve: serves the inject script built by the inject-build process (port 8080)
  4. webchat: serves a live version of the webchat that uses the inject-serve server (port 3543)

Note: The messaging client id inside the file packages/inject/example.html needs to be provider manually for now.

Otherwise, to start the messaging server, simply run

> yarn dev

To easily make API calls to the server, use the misc/api.rest file

To create a binary of the Messaging server

> yarn package

To run tests

> yarn test

Note: to run a specific test suite, add a colon followed by the name of the suite name to the command above (e.g. To run integration tests: yarn test:int)

To lint the codebase

> yarn eslint

To format the codebase

> yarn prettier

To reset the codebase to its initial state

> yarn reset

For all other commands, please refer to the scripts of the root package.json

Test Suites

For more information about the different test suites, go here.

Internal Documentation

You can read the internal documentation here

messaging's People

Contributors

abrahamlopez10 avatar allardy avatar botpress-bot[bot] avatar charlescatta avatar chsir17 avatar davidvitora avatar dependabot[bot] avatar eff avatar franklevasseur avatar hacheybj avatar laurentlp avatar michaelmass avatar ptrckbp avatar rohankokkulabp avatar samuelmasse avatar sebburon avatar slvnperron avatar spg avatar tomkcey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

messaging's Issues

Improvements

There are a couple of things that I think should be addressed:

  1. The list of channels is hardcoded in the BP repository (https://github.com/botpress/botpress/blob/sm-extmsg-7-fix-hitlnex/src/bp/core/config/config-loader.ts#L176). This list should be provided by the Messaging process. Once the messaging process is registered (https://github.com/botpress/botpress/blob/sm-extmsg-7-fix-hitlnex/src/bp/orchestrator/web-worker.ts#L61), it could query messaging to get a list of available channels, then update the botpress configuration (adding new channels to the file).

  2. Channel configuration schemas should be moved from the main repository (in channel-*/assets/config.schema.json and into this one.
    A. There should be an endpoint on messaging that can be called to obtain this schema (to use in code editor)
    B. There should also be an endpoint where you can get the default configuration from that schema (to generate the default file)

  3. Messaging displays a lot of verbose and useless logs for the user.
    A. The list of channels can be shortened to a single line. Space is wasted to display them on separate lines
    B. Endpoints are all listed but usage is not clear, and even disabled channels are displayed
    C. Logs should fit nicely with logs of other processes

  4. The process of enabling and adding channels is really not clear. You need to update the botpress.config.json file, then somehow go on the code editor to create a channel-name.json file, and copy the config from somewhere else.
    A. When you enable a channel in botpress.config.json, there should be some process which would automatically query messaging, get the default config for that channel, and create a channel-name.json file

  5. Maybe we could simplify the channel creation process. We could either merge all channel-*.json files into a single channels.json file, or in a channels property in the bot.config.json file. We could even add an "environment" variable to ease development. What do you think? This would make it really easy to develop the bot once and move the archive between dev and prod

bot.config.json or channels.json

channels: {
  prod: {
    slack: {}
    telegram: {}
}

// or 
channels: [
  {
    name: 'slack',
    enabled: true,
    env: 'prod',
    authToken: ''
  },
  {
    name: 'slack',
    env: 'dev',
    enabled: false,
   }
]
  1. Once a channel is enabled, messaging should make a basic test to let the user know if the channel is properly configured, and it should give meaningful information to the user on how to do that.
    A. When channel is enabled, display a log indicating so
    B. Perform a small test to see if the channel configuration is actually correct
    C. Either add a log or an endpoint that a user can query to get the complete URL required to configure the webhook on different services (ex: the full event / interactive URL required by slack)

  2. I think we should add a "legacy" route handler on messaging, and redirect all requests done to channel-* to the messaging process (except for channel-web). Since we removed channels from the main BP repository, all the logic (including legacy logic) should be in messaging. This will make it much easier to update channels and fix issues by having all the logic at the same place.
    A. Proxy all routes channel-* to messaging process
    B. Print a warning to the user indicating that the old route is deprecated (/mod/channel-slack/events) and display the correct route

Too many stack traces when an error occurs

I got this error message when my server restarted while discussing with the bot on slack. This log is way too long (axios traces of like 300 lines). Please just print the error message, or pick useful stuff from the axios error and only display that

image

On a side note, shouldn't it write [Messaging] Channel-Slack instead of "launcher" ?

[BUG] - Rate limit exceeded with Vonage sandbox

Describe the bug
When configuring Vonage to use the testing API (sandbox), we can easily exceed the rate limit defined by the sandbox.

To Reproduce
Steps to reproduce the behavior:

  1. Configure Vonage and make sure "useTestingApi" is set to true.
  2. Send multiple messages back to the user in one go.
  3. You will see a 429 too many requests error in the console.

Expected behavior
The messaging server should make sure that we respect the one-second rate limiter that Vonage's testing API enforces.

Screenshots

Screenshot from 2021-09-17 14-02-47

Environment (please complete the following information):

  • OS: Linux (Arch)
  • Browser Chrome
  • Browser Version 93.0.4577.82
  • Botpress Version 12.26.2
  • NodeJS 12.13

Additional context
N/A

Use a single table for user mapping

There is web_user_map to map channel web's visitor ID to Messaging UID, and you use msg_kvs to store channel-teams user ID to Messaging UID.

Channels each have their unique ID to identify a visitor. Each entry in msg_users represent an association userID - botId, why don't you add the channel's internal ID to this table instead ?

We could also add a "metadata" field which could be used to store additional data if required.

I see absolutely no reason to have a table "msg_kvs" in this service.

[BUG] Messaging doesn't show on the diagnostic report

I just realized that there's no trace of the messaging client in the diagnostic report, this might be useful to investigate weird issues or race conditions. We just had an issue where there were some "rogue processes" and this could have helped.

image

Also, can you add a name to the redis connection, with a similar naming than the other processes? The master process of the orchestrator generates an ID (process.env.SERVER_ID) which can help us associate processes together.

Having those information help us pinpoint the problem more easily

image

Cannot build repository

I know that repositories should have more autonomy, but they should still be able to be built together with all other repositories. I don't think we have a lot of clients who are able to install multiple versions of nodejs on their development computer just because we have different requirements.

I am simply unable to build everything without messing around with node versions (.nvmrc is not supported on windows). Therefore, It makes more sense to stick to the same node version for all related repositories.

Either you find a way to scale down the version requirement of messaging to the version we use everywhere else (including the builtin server in the binary), or you find a way to update the version in each repositories at the same time (including related tests).

At first glance, the module eslint-plugins-jsdoc version 36 requires a higher node version, is there any reason for that ? Can't we simply use the same version we have everywhere else and skip this requirement?

Apart from that, there is also an higher requirement for "parcel". What is this package used for? If it's for frontend, why not using webpack like every other repositories we have ?

Having independence over the codebase doesn't mean that you have to reinvent the wheel and to make things incompatible between other codebases, we should be able to work seamless between workspaces

image

Invalid bot id error is a bit cryptic

I already had a slack bot configured with the old URL. I tried to update the domain (new one for ngrok), but I forgot to update the second bot ID in the URL. Maybe needs an additional check to handle that gracefully?

https://4b1799194b02.ngrok.io/api/v1/bots/welcome-bot/mod/channel-slack/bots/main/events-callback

(theres "welcome-bot" and "main" there). The error could be more user-friendly:

image

[BUG/Feature?] Allow invalid channel names

When playing around with different configurations, I used to change the name of the channel so it wouldn't be loaded by messaging. Looks like some additional validation was added and it prevents the bot to load... do you think we can remove it ? I don't see any downside by having that, and it gives more flexibility to play around with different configurations. If messaging doesn't support an option, it could just ignore it instead of throwing an error

image

[BUG] Sync issues

When you don't follow the "happy path", it's incredibly hard to get messaging to work.

Creating a bot in one instance and move it elsewhere

  1. Spin a standalone messaging server.
  2. Spin a botpress server and set MESSAGING_ENDPOINT to that server
  3. Create a bot
  4. Export the bot
  5. Kill the server
  6. Spin a different server, with the same messaging endpoint.
  7. Import the same bot there

It should work correctly. Right now, it fails because the bot ID must be unique, but it shouldn't be the case in the future.

Reset messaging credentials

If you create a bot on a server, then remove messaging.id / messaging.token, and restart the server, it will receive a new id / token combination, but it doesn't seems to update the messaging database, because the bot doesn't work anymore.

Deleting and importing the same bot

If you export a bot, delete it, clear the id/token and re-import the bot with the same name, it will fail

[BUG] Using an external endpoint doesn't work as expected

When using an external messaging service (not spinned by botpress), there seems to be an additional configuration which is not specified.

Using the built-in messaging service (works)

  1. Start BP binary
  2. Create a bot
  3. Add channel telegram to the bot.config.json file
  4. Restart server
  5. Speak on telegram, it works

Using a different messaging endpoint (doesn't work)

  1. Start messaging binary (clean install)
  2. Set MESSAGING_ENDPOINT=http://localhost:3100
  3. Start BP binary (clean install)
  4. Create a bot
  5. Add channel telegram
  6. Restart server
  7. Getting errors on messaging: No address associated with hostname / 401 when calling BP

image

[BUG]: when an invalid appID is configured the app is crashing

When a bot is configured with teams with a non-working appID it crashed the messaging app and no bot can be talked to unless Botpress is restarted.

I fixed this by removing the config in the affected bot and an old global channel-teams.json file that was present on the server containing this appid.

Here's the error in the logs:
Screen Shot 2022-02-17 at 8 18 10 AM

This is happening using 12.26.10

Migration failure - conversations

The migration seems a bit flaky, we can expect invalid entries in the database, and it should be able to handle it.
I can provide my core.sqlite file if you want to try it out

image

[BUG] quick replies are received as text in botpress

When a user clicks a button in a single choice, the event.type sent to Botpress is 'text'.
This should be of type 'quick_reply'.
'text' should only be sent if the user wrote something instead of picking an option.

[BUG] Some events not handled correctly on telegram

Sometimes I get this weird error message. I think telegram sends events (maybe some kind of update) which doesn't have a userId and displays that. No idea how to reproduce, I just have my messaging server running and rebooting stuff / playing around

image

[BUG] Bot ID validation issue causes the server to freeze entirely

Okay, so hmm not sure how I managed to get there the first time, but I was able to reproduce easily:

  1. Create a bot from "welcome-bot", open the studio and write something to the bot (keep the tab open)
  2. Open a new tab, go on the admin panel
  3. Delete the first bot you created
  4. Create a new bot with a different name
  5. Open the studio, and write something to the bot

Basically, I ended up with those errors, and an unresponsive server which needed a reboot
image

And it ends up by
image

Not sure of the root cause (bot id validation or else).

Suggestion: Do not return channel id in webhook post back

Currently: When we capture a user's message in the webhook we receive something like the following

{
 channelId: 'asdasdas',
 clientId: 'asdasd',
 /*....*/
}

Then if you want to reply to that message you need to specify the channel and no where it says that we should use the channel name and not the id which can become confusing. It's also super tempting to use data.channel.

From what I understand, channel-id is for internal usage so it shouldn't be exposed to the user

[BUG] Web Channel | Voice Composer

v12.26.1

I was trying to use the voice composer after activating the google speech module, and I face the below issue in the logs:

09/13/2021 23:03:35.996 Mod[channel-web] [test]
HTTP (post) URL /media
Received "This type of file is not allowed: audio/webm"
Request failed with status code 400

Discord channel not working properly.

The discord channel doesn't seem to be working properly.

The problems (I think) are:

  • discord.js is outdated
  • in server/src/channels/discord/conduit.ts, at line 21, you are not specifying the bot's intents, so discord isn't sending the bot any messages. Try using this.client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] }) after updating discord.js
  • I'm not entirely certain, but I think that discord-buttons is wholly unnecessary and all the buttons can just be used via discord.js

I tried fixing this myself, but my lack of skills in node.js prevented me from doing so. If you want to see what I attempted to do, I will gladly share. The main problem I encountered was that the updated discord.js presumably uses modern javascript syntax (such as ?? and ?.) and the javascript compiler in the botpress standalone server didn't seem to like that.

I'd appreciate it if someone with more brains than I could fix this.

[BUG] Switching messaging endpoints causes massive DDOS between services

So hm, if you simply change the messaging endpoint and restart the server, when you open the webchat there's a ton of endless queries. This definitely would need some sort of protection to prevent a user to ddos the service

  1. Download botpress v12.26.1
  2. Create a bot (welcome-bot)
  3. Download messaging v0.1.13 from the official release
  4. Start the process
  5. Set MESSAGING_ENDPOINT and restart botpress. This happens:

image

If you create a bot with a remote endpoint and then remove it, it does the same thing locally
image

Ignore unknown properties when validating a payload

I got this error message and had to spend some time to find the issue.

image

Somehow I had 2 different configurations:
image

When validating the schema using Joi, please consider setting the option "ignore unknown properties" instead of rejecting the payload completely. The correct fields were also present, so the bot would have worked properly.

Allow self-signed certificates

To use messaging and slack, I have an hostname which redirect to my bp instance, but messaging refuses to connect because it's a self-signed certificate. Is there a way around?

Yes, I could use ngrok... but no, I don't want to have to reconfigure my channels everytime I want to test the bot

image

Database Map

There is a lot of new tables.
Can you make a database schema explaining the link between them, their purpose, and the source of the information? This schema could grow over time and would be very useful to understand the flow of information for new users (ex: me)

Ex:
image

Messaging crashes when there are 2 nodes

When I start 2 servers and I speak with the bot on slack, I receive no answer and I get this stack trace on the first server I started (plus, messaging crashes and restarts).

image

Also, I think this log should be a debug log instead, since it has no use for the end user

image

Not able to use facebook graph api v15

I have configured a new app in the facebook developers account and it forces me to use v15.0 API. But botpress is using v12.6. How can I upgrade my code to use the v15.0. While using the v12.6 graph API it gives the error 400 Bad request:

{
    "error": {
        "message": "Unknown path components: /me/messages",
        "type": "OAuthException",
        "code": 2500,
        "fbtrace_id": "Ay0lBm-yBJucULHbD0R5QdZ"
    }
}

Database error crashes the server

At first I had a missing field error which crashed the whole app
image

After adding the field, it crashed again for another reason...
image

I had to manually go delete the entry from the database... Please make this more reliable and error-resistant. Such errors can happen and should NOT crash the whole server

[BUG] Slack images will not work if you don`t provide a title

Botpress core version: 12.26.3

All though titles are not required for other channels when using the image content-type, if you don`t provide, it will not work in the Slack Channel and an error will be thrown:

[ERROR] web-api:WebClient:0 failed to match all allowed schemas [json-pointer:/blocks/0/title]
[ERROR] web-api:WebClient:0 missing required field: text [json-pointer:/blocks/0/title]
09/28/2021 14:20:49.466 [Messaging] app:slack Error occurred when sending a message. Error: An API error occurred: invalid_blocks
at Object.platformErrorFromResult (C:\snapshot\messaging\node_modules@slack\web-api\dist\errors.js:51:33)
at WebClient.apiCall (C:\snapshot\messaging\node_modules@slack\web-api\dist\WebClient.js:156:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async SlackCommonSender.send (C:\snapshot\messaging\packages\server\dist\channels\slack\senders\common.js)
at async SlackConduit.sendToEndpoint (C:\snapshot\messaging\packages\server\dist\channels\base\conduit.js)
at async InstanceService.sendMessageToInstance (C:\snapshot\messaging\packages\server\dist\instances\service.js)
{

to fix this you need to specify a title:

image

Since titles are not required by the content type, I believe the renderer should auto-generate one.

Mattermost Support

Follow up on botpress/v12#370
As this now has its own project, I would like to request support for the creation of a Mattermost plugin.

I understand this might be low priority for the Botpress Team, but maybe you could reference documentation or a tutorial to support a contribution for Mattermost and similar messaging vendors?

Issues making Messaging work

Hello everyone,

I'm trying to start developing a custom channel based on the custom-channel repo and from what I can understand I need to get this working locally so I can connect my custom channel and start building, but I'm having some issues making it work.

First, I don't not if it's an issue of the documentation but I couldn't start the services using Tilt the way it's documented - had to run a yarn install first (which sounds logic but maybe the step should be explicitly mentioned?)

This yarn install gives me some warnings about dependencies not satisfied, but after it Tilt can start the resources successfully:

❯ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @botpress/messaging-board@workspace:packages/board doesn't provide @parcel/core (p8ec10), requested by @parcel/config-default
➤ YN0002: │ @botpress/messaging-components@workspace:packages/components doesn't provide babel-loader (p6cd3a), requested by @storybook/addon-essentials
➤ YN0002: │ @botpress/messaging-components@workspace:packages/components [d721a] doesn't provide babel-loader (p7a0bc), requested by @storybook/addon-essentials
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (pc6b23), requested by @opentelemetry/instrumentation-aws-sdk
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (p07603), requested by @opentelemetry/instrumentation-express
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (p1080b), requested by @opentelemetry/instrumentation-http
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (p6bb08), requested by @opentelemetry/instrumentation-ioredis
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (p6bef0), requested by @opentelemetry/instrumentation-knex
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide @opentelemetry/api (p2e0b5), requested by @opentelemetry/instrumentation-pg
➤ YN0002: │ @botpress/messaging-server@workspace:packages/server doesn't provide prom-client (p34f6f), requested by @promster/types
➤ YN0002: │ @botpress/webchat-inject@workspace:packages/inject doesn't provide @parcel/core (p5db79), requested by @parcel/config-default
➤ YN0002: │ @botpress/webchat-inject@workspace:packages/inject doesn't provide typescript (pb00c9), requested by @parcel/transformer-typescript-tsc
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides mime (p5bc44) with version 3.0.0, which doesn't satisfy what @botpress/messaging-components requests
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides react (p33191) with version 17.0.2, which doesn't satisfy what @botpress/messaging-components and some of its descendants request
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides react (p4b3ac) with version 17.0.2, which doesn't satisfy what mobx-react and some of its descendants request
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides react (p61e8a) with version 17.0.2, which doesn't satisfy what react-ga requests
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides react (p18844) with version 17.0.2, which doesn't satisfy what react-intl requests
➤ YN0060: │ @botpress/webchat@workspace:packages/webchat provides react-dom (p50820) with version 17.0.2, which doesn't satisfy what @botpress/messaging-components and some of its descendants request
➤ YN0060: │ @bpinternal/trail@npm:0.1.0 provides @opentelemetry/api (pa21f3) with version 1.1.0, which doesn't satisfy what @opentelemetry/auto-instrumentations-node and some of its descendants request
➤ YN0002: │ @mdx-js/loader@npm:1.6.22 doesn't provide react (p12550), requested by @mdx-js/react
➤ YN0002: │ @parcel/optimizer-image@npm:2.2.1 doesn't provide @parcel/core (p48c9f), requested by @parcel/workers
➤ YN0002: │ @parcel/reporter-dev-server@npm:2.2.1 doesn't provide @types/express (p57ed2), requested by http-proxy-middleware
➤ YN0002: │ @parcel/transformer-image@npm:2.2.1 doesn't provide @parcel/core (p7bfaa), requested by @parcel/workers
➤ YN0002: │ @parcel/transformer-js@npm:2.2.1 doesn't provide @parcel/core (pe40b6), requested by @parcel/workers
➤ YN0002: │ @parcel/transformer-postcss@npm:2.2.1 doesn't provide postcss (p0b5da), requested by postcss-modules
➤ YN0002: │ @parcel/types@npm:2.2.1 doesn't provide @parcel/core (pfd728), requested by @parcel/fs
➤ YN0002: │ @parcel/types@npm:2.2.1 doesn't provide @parcel/core (p9b3cc), requested by @parcel/workers
➤ YN0002: │ @parcel/types@npm:2.2.1 doesn't provide @parcel/core (pe2210), requested by @parcel/cache
➤ YN0002: │ @parcel/types@npm:2.2.1 doesn't provide @parcel/core (p7a308), requested by @parcel/package-manager
➤ YN0002: │ @promster/express@npm:7.0.5 doesn't provide prom-client (pf18c2), requested by @promster/metrics
➤ YN0002: │ @promster/metrics@npm:9.1.5 [45095] doesn't provide typescript (pcf955), requested by ts-essentials
➤ YN0002: │ @promster/metrics@npm:9.1.5 [471c6] doesn't provide typescript (p7c2a9), requested by ts-essentials
➤ YN0002: │ @promster/server@npm:7.0.7 doesn't provide prom-client (p399ec), requested by @promster/metrics
➤ YN0002: │ @vonage/server-sdk@npm:2.10.7-beta-2 doesn't provide @babel/core (p3f8da), requested by @babel/eslint-parser
➤ YN0002: │ @vonage/server-sdk@npm:2.10.7-beta-2 doesn't provide eslint (pf6ac9), requested by @babel/eslint-parser
➤ YN0002: │ @vonage/server-sdk@npm:2.10.7-beta-2 doesn't provide eslint (pe1fde), requested by @babel/eslint-plugin
➤ YN0002: │ sunshine-conversations-client@npm:9.5.9 doesn't provide @babel/core (pf0dc1), requested by @babel/cli
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 649ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 1s 381ms
➤ YN0000: ┌ Link step
➤ YN0005: │ core-js@npm:3.20.0 lists build scripts, but its build has been explicitly disabled through configuration.
➤ YN0005: │ core-js-pure@npm:3.20.0 lists build scripts, but its build has been explicitly disabled through configuration.
➤ YN0000: └ Completed in 1s 848ms
➤ YN0000: Done with warnings in 4s 144ms

Once I have those resources started and in "ready" status if I open the messaging resource details I can see in the logs that the server is listening:

12/01/2022 14:01:00.058 Launcher ===========================================================================
                                                             Botpress Messaging                            
                                                                Version 1.2.7                               
                                 ===========================================================================
12/01/2022 14:01:00.191 Admin ===========================================================================
                                                         ADMIN_KEY IS NOT SET                           
                                                     ADMIN ROUTES ARE UNPROTECTED                       
                              ===========================================================================
12/01/2022 14:01:00.220 Launcher Server is listening at: http://localhost:3100/
12/01/2022 14:01:00.220 Launcher No external URL configured. Messaging Server might not behave as expected. Set the value for 'EXTERNAL_URL' to suppress this warning

But if I go to http://localhost:3100 I get this:

image

Also, if I try to open the webchat (which is located at http://127.0.0.1:3543/) I only see the "Example website
This website integrates the botpress webchat!" text without any webchat, and these errors on the console:

Live reload enabled.

127.0.0.1/:1 Uncaught SyntaxError: Unexpected token 'c', "connected" is not valid JSON
    at JSON.parse (<anonymous>)
    at ws.onmessage (runtime-79e8b212159ad102.js:109:12)

runtime-ea4cd6bdd08c17f2.js:95 WebSocket connection to 'ws://localhost:8080/' failed: 
goWOo @ runtime-ea4cd6bdd08c17f2.js:95

useObserver.ts:59 [MobX] You haven't configured observer batching which might result in unexpected behavior in some cases. See more at https://github.com/mobxjs/mobx-react-lite/#observer-batching
useObserver @ useObserver.ts:59

runtime-ea4cd6bdd08c17f2.js:95 WebSocket connection to 'ws://localhost:8080/' failed: 
goWOo @ runtime-ea4cd6bdd08c17f2.js:95

runtime-ea4cd6bdd08c17f2.js:171 undefined
ws.onerror @ runtime-ea4cd6bdd08c17f2.js:171

runtime-ea4cd6bdd08c17f2.js:175 [parcel] 🚨 Connection to the HMR server was lost
ws.onclose @ runtime-ea4cd6bdd08c17f2.js:175

index.4fdcc17c.js:12947 Uncaught (in promise) Client not found

The same thing happens if I drop Tilt and try to start it using yarn dev.

Is there anything that I'm missing? If so please let me know, I'm eager to make this work and hopefully contribute to the project in the future since we may use it intensely at work.

Thanks,

Building messaging server binaries

Hi, i am trying to build the messaging server binaries, to test with the botpress docker image.

  1. Is there any way to build the messaging server (and tools) binaries in the botpress building process when is present in the workspace?
  2. Can you post the steps and intructions to build the messaging server binaries?
  3. Can botpress use a messaging server in other container, or as remote service API as you have done with language server, NLU and duckling?

Thanks in advance.

Migration issue

I set up all channels on the previous version, then copied my data folder over to master, and started it. I had those issues. I couldn't test smooch because I don't have an account, but I hope it will be tested

  1. Telegram was working fine in the previous version, but it doesn't work anymore after the migration. I don't use a standard port, but it should still work fine, can you use the same version/setup that was used by channel-telegram so the migration is seamless?
    image

  2. Smooch fails on the first startup after the migration and requires to be rebooted again to start working
    image

  3. Migrations are executed after modules are loaded, which generates a ton of error messages... Is there a better way we could handle this ?
    image

Migration Issue: Teams

Migration went fine while using the old URL, but as soon as I use the URL that messaging recommends me, Teams doesn't work anymore.

I changed it from /api/v1/bots/welcome-bot/mod/channel-teams/api/messages to /api/v1/messaging/webhooks/welcome-bot/teams then I started getting these error messages:

image

[BUG] Error message not clear

When I speak to my bot, I get this error message continuously. I have no idea how to debug that, I tried to add LOGGING_ENABLED: true in messaging-server, but it didn't help.

Previously I would just add some logging in messaging source code, build it, then set DEV_MESSAGING_PATH, but it doesn't work since the migration to node 16 (which supports natively optional chaining, while 12 doesnT). How do you develop and debug currently?
image

Migration Issue: Twilio

Twilio was working fine before the migration, but now it says that the token is invalid, but the configuration in the bot config looks fine, so maybe it's a setup issue
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.