Categories:
Aura Bot development troubleshooting
Resolution of common problems, fixes and enhancements in Aura Bot
Developing a dialogs library aka plugin
Issues with aura-bot-common and @hapy/joi
How to detect it
As all the plugins run inside the aura-bot-platform, they must share the very same version of the libraries that are used across all the modules within the bot.
This is quite important because some of the common libraries provide a kind of singleton access to shared information, needed both during the core steps executions and during the dialogs execution. If the versions are not the same, then the instances will not be the same and the dialogs will not find the information where it is expected.
It is important to understand how the dependencies are resolved in nodejs: npm dependency resolution.
How to solve it
To avoid it, the proposal is to lay on the bot dependencies and just configured in the plugin a minimal version:
For example, if the library allows all versions starting from 1.8.3 (without a major change) and the bot provides the 1.13.7 (which is fixed in the package-lock.json of aura-bot), then both components will use the same one.
Although it is not an internal library, almost the very same issue happens with @hapy/joi. Do not change the version provided by aura-bot, or there would be unexpected issues with the schema merging and validation.
Example of package.json plugin
Each global library has specific dependencies. Developers should access to the library and check its corresponding package.json file.
Check an example for the “bill” global library
"dependencies": {
"@telefonica/aura-bot-common": "7.24.0",
"@telefonica/aura-bot-library-util": "7.26.0",
"@telefonica/aura-locale-manager": "7.22.0",
"@telefonica/aura-logging": "3.10.0",
"@telefonica/invoicing-client": "2.15.0",
"@telefonica/mobile-balance-client": "2.14.0",
"botbuilder": "~4.13.3",
"botbuilder-dialogs": "~4.13.3",
"joi": "^17.6.0",
"moment": "^2.29.3"
},
Example of aura-bot-platform package.json file
⚠️ This section has only descriptive purposes, as dependencies are established by Aura Global Team and OBs cannot modify this file.
Check an example of the package.json file
"dependencies": {
"azure-storage": "^2.10.7",
"@azure/storage-blob": "^12.12.0",
"@telefonica/authentication-api-client": "1.15.0",
"@telefonica/aura-behavior-manager": "7.26.0",
"@telefonica/aura-bot-common": "7.24.0",
"@telefonica/aura-bot-events-client": "1.13.0",
"@telefonica/aura-bot-library-util": "7.26.0",
"@telefonica/aura-channel-data-handler": "7.22.0",
"@telefonica/aura-cognitive-client": "3.15.0",
"@telefonica/aura-configuration": "7.21.0",
"@telefonica/aura-configuration-api-client": "1.10.0",
"@telefonica/aura-developer-tools": "7.26.0",
"@telefonica/aura-http-monkey-patcher": "7.14.0",
"@telefonica/aura-kpis2": "7.20.0",
"@telefonica/aura-locale-manager": "7.22.0",
"@telefonica/aura-logging": "3.10.0",
"@telefonica/aura-makeup-index-manager": "7.18.0",
"@telefonica/aura-models": "3.14.0",
"@telefonica/aura-mongo-handler": "7.12.0",
"@telefonica/aura-movistar-libraries-utilities": "7.26.0",
"@telefonica/aura-nlp-client": "3.11.0",
"@telefonica/aura-orchestrator": "2.7.0",
"@telefonica/aura-storage-file-manager": "7.18.0",
"@telefonica/aura-validate-apikey": "1.7.0",
"@telefonica/baikal-sdk": "^0.10.1",
"@telefonica/event-bus": "3.8.0",
"@telefonica/aura-file-manager-client": "1.10.0",
"@telefonica/movistar-plus-cognitive-client": "3.13.0",
"@telefonica/spleen": "^1.4.0",
"@telefonica/user-profile-client": "3.13.0",
"@telefonica/aura-bot-bill-library": "7.27.0",
"@telefonica/aura-bot-cognitive-library": "7.27.0",
"@telefonica/aura-bot-common-library": "7.27.0",
"@telefonica/aura-bot-disambiguation-library": "7.27.0",
"@telefonica/aura-bot-generic-library": "7.28.0",
"@telefonica/aura-bot-handover-library": "7.27.0",
"@telefonica/aura-bot-linking-library": "7.27.0",
"@telefonica/aura-bot-miscellaneous-library": "7.27.0",
"@telefonica/aura-bot-mocks-library": "7.27.0",
"@telefonica/aura-bot-none-library": "7.27.0",
"@telefonica/aura-bot-onboarding-library": "7.27.0",
"@telefonica/aura-bot-services-library": "7.27.0",
"@telefonica/aura-bot-tv-library": "7.27.0",
"architect": "^0.1.13",
"body-parser": "^1.19.0",
"botbuilder": "~4.13.3",
"botbuilder-core": "~4.13.3",
"botbuilder-dialogs": "~4.13.3",
"dotenv": "^8.0.0",
"express": "^4.17.1",
"express-prom-bundle": "^6.4.1",
"folder-hash": "^3.3.0",
"genversion": "^3.0.2",
"helmet": "6.1.3",
"html-to-text": "^7.0.0",
"http-status": "^1.5.0",
"http-status-codes": "^2.2.0",
"joi": "^17.6.0",
"merge-deep": "^3.0.3",
"mkdirp": "^1.0.3",
"moment": "^2.29.3",
"moment-timezone": "0.5.28",
"mongodb": "^3.5.8",
"node-cache": "^5.1.0",
"prom-client": "^13.1.0",
"replace": "^1.2.2",
"semver": "^7.3.4",
"superagent": "^8.0.4",
"uuid": "3.3.3",
"xregexp": "^4.2.4"
},