Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lib-state and lib-file support for local development #449

Open
pablomoreno61 opened this issue Jun 26, 2023 · 1 comment
Open

Add lib-state and lib-file support for local development #449

pablomoreno61 opened this issue Jun 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@pablomoreno61
Copy link

Expected Behaviour

When running my app in local, runtime actions using lib-state should be able to read/write data using lib-state.

Actual Behaviour

The following error is seen in the logs:

"code": "ERROR_BAD_ARGUMENT",
"message": "[TvmLib:ERROR_BAD_ARGUMENT] ow.auth" is required",
"stacktrace": "TvmLibError: [TvmLib:ERROR_BAD_ARGUMENT] "ow.auth" is required

Reproduce Scenario (including but not limited to)

Within a runtime action add the following code:

this.state = await init();

Steps to Reproduce

Then, run aio app run --local.

Platform and Version

  System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 96.52 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
    Yarn: Not Found
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
  Virtualization:
    Docker: 24.0.2 - /usr/local/bin/docker
  npmGlobalPackages:
    @adobe/aio-cli: Not Found

Sample Code that illustrates the problem

https://github.com/magento-commerce/aio-amazon-sales-channel/blob/main/actions-src/api/account/runtime/getAccounts.ts

Logs taken while reproducing problem

2023-06-26T10:21:28.652289386Z 2023-06-26T10:21:28.651Z [main /guest/amazon-app/api-get-accounts] error: {"message":"Cannot get accounts","error":"{\"sdk\":\"TvmLib\",\"sdkDetails\":{\"config\":{\"ow\":{\"namespace\":\"guest\"}}},\"code\":\"ERROR_BAD_ARGUMENT\",\"message\":\"[TvmLib:ERROR_BAD_ARGUMENT] \\\"ow.auth\\\" is required\",\"stacktrace\":\"TvmLibError: [TvmLib:ERROR_BAD_ARGUMENT] \\\"ow.auth\\\" is required\\n    at new <anonymous> (/nodejsAction/aRNepCyI/index.js:9288:9)\\n    at new TvmClient (/nodejsAction/aRNepCyI/index.js:10302:19)\\n    at Function.init (/nodejsAction/aRNepCyI/index.js:10365:12)\\n    at init (/nodejsAction/aRNepCyI/index.js:31258:27)\\n    at AccountRepository.getState (/nodejsAction/aRNepCyI/index.js:254:57)\\n    at AccountRepository.getAccounts (/nodejsAction/aRNepCyI/index.js:27:33)\\n    at NodeActionRunner.main [as userScriptMain] (/nodejsAction/aRNepCyI/index.js:104:50)\\n    at /nodejsAction/runner.js:112:45\\n    at new Promise (<anonymous>)\\n    at NodeActionRunner.run (/nodejsAction/runner.js:105:16)\"}"}
2023-06-26T10:21:28.652415928Z 2023-06-26T10:21:28.652Z [main /guest/amazon-app/api-get-accounts] info: {"message":"500: [TvmLib:ERROR_BAD_ARGUMENT] \"ow.auth\" is required","params":{}
@shazron shazron added the enhancement New feature or request label Jun 26, 2023
@aiojbot
Copy link

aiojbot commented Jun 26, 2023

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2332

@adobe adobe deleted a comment from aiojbot Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants