You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to use these credentials from an npm script, which is useful for initializing the application requirements (event providers/metadatas/others)
/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/ims.js:391
scope: scopes.join(',')
^
TypeError: scopes.join is not a function
at Ims.getAccessTokenByClientCredentials (/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/ims.js:391:21)
at /Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims-oauth/src/ims-oauth_server_to_server.js:77:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object._persistTokens (/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/token-helper.js:156:20)
at async testGetToken (/Users/obarcelonapa/dev/test-app-builder/scripts/ensure-event-providers.js:49:24)
For the error my assumption is that the IMS context is found and resolved correctly from the env file but it seems the scopes are not parsed as an array, so it fails when trying to join them when preparing the request to the IMS service.
Expected Behaviour
When configuring an app to use a workspace using
aio app use -m
Outh Service 2 Service credentials are persisted in.env
file.Example
It should be possible to use these credentials from an npm script, which is useful for initializing the application requirements (event providers/metadatas/others)
Actual Behaviour
It fails with the following error:
/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/ims.js:391 scope: scopes.join(',') ^ TypeError: scopes.join is not a function at Ims.getAccessTokenByClientCredentials (/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/ims.js:391:21) at /Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims-oauth/src/ims-oauth_server_to_server.js:77:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object._persistTokens (/Users/obarcelonapa/dev/test-app-builder/node_modules/@adobe/aio-lib-ims/src/token-helper.js:156:20) at async testGetToken (/Users/obarcelonapa/dev/test-app-builder/scripts/ensure-event-providers.js:49:24)
For the error my assumption is that the IMS context is found and resolved correctly from the env file but it seems the scopes are not parsed as an array, so it fails when trying to join them when preparing the request to the IMS service.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: