This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Development troubleshooting
Development troubleshooting
In this section you will find solutions to common problems that we may encounter when developing in Aura
Introduction
The current section includes guidelines for the resolution of the most common problems that can occur when developing over aura-bot and in the Webclient channel.
Apart from the guides included here, specific problem-solving procedures for a component are included in this component documentation.
1 - Bot development troubleshooting
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"
},
2 - RCS development troubleshooting
Aura RCS development troubleshooting
Resolution of common problems, fixes and enhancements when developing a use case in aura-bridge RCS
Configuring a new channel
How to detect it
An error with the configured RCS APIKey is occurring if your RCS messages do not arrive to the destination and you find this error in your logs:
ERROR Error on controller method {
module: 'aura-push-incoming-controller',
error: 'error:1E08010C:DECODER routines::unsupported',
stck: Error: error:1E08010C:DECODER routines::unsupported
at Sign.sign (node:internal/crypto/sig:128:29)
at Object.sign (/home/id04828/auraProjects/aura-bridge/node_modules/jwa/index.js:152:45)
at Object.jwsSign [as sign] (/home/id04828/auraProjects/aura-bridge/node_modules/jws/lib/sign-stream.js:32:24)
at GoogleToken._GoogleToken_requestToken (/home/id04828/auraProjects/aura-bridge/node_modules/gtoken/build/src/index.js:235:27)
at GoogleToken._GoogleToken_getTokenAsyncInner (/home/id04828/auraProjects/aura-bridge/node_modules/gtoken/build/src/index.js:180:97)
at GoogleToken._GoogleToken_getTokenAsync (/home/id04828/auraProjects/aura-bridge/node_modules/gtoken/build/src/index.js:160:173)
at GoogleToken.getToken (/home/id04828/auraProjects/aura-bridge/node_modules/gtoken/build/src/index.js:110:102)
at JWT.refreshTokenNoCache (/home/id04828/auraProjects/aura-bridge/node_modules/google-auth-library/build/src/auth/jwtclient.js:173:36)
at JWT.refreshToken (/home/id04828/auraProjects/aura-bridge/node_modules/google-auth-library/build/src/auth/oauth2client.js:187:24)
at JWT.getRequestMetadataAsync (/home/id04828/auraProjects/aura-bridge/node_modules/google-auth-library/build/src/auth/oauth2client.js:333:28) {
library: 'DECODER routines',
reason: 'unsupported',
code: 'ERR_OSSL_UNSUPPORTED'
},
corr: '078ee5cf-2b9d-4fb6-9268-c9c5685232f8',
version: '9.7.0',
app: 'aura-bridge',
host: 'ph'
}
How to solve it
To solve this issue, the rcs.privateKey field of channel configuration
must be correctly configured in base64 format.
To obtain the correctly formatted value, you can execute the following code:
const privateKey = `-----BEGIN PRIVATE KEY-----
YOUR_PRIVATE_KEY
-----END PRIVATE KEY-----`
console.log(Buffer.from(privateKey, 'utf8').toString('base64'));