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

include target folder named certs or certificates gives a runtime action error #673

Open
rojoangel opened this issue May 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@rojoangel
Copy link

Describe the bug
Are there any reserved names for the target "folder" when using include to configure a runtime action?
We are experiencing the following behavior:

  • an include declared as this one works
include:
  - ["files/*.p12", "secrets/"]

but these two (targeting to certs and certificates) cause the action to yield an error when invoked

include:
  - ["files/*.p12", "certs/"]

and

include:
  - ["files/*.p12", "certificates/"]

The error we get when calling aio rt activation get XXXXXX is

 "error": "Initialization has failed due to: Error: Cannot find module '/nodejsAction/47jUsebx'\nRequire stack:\n- /nodejsAction/services/runner.js\n- /nodejsAction/services/service.js\n- /nodejsAction/routes/action.js\n- /nodejsAction/app.js\n- /nodejsAction/server.js\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)\n    at Function.Module._load (node:internal/modules/cjs/loader:804:27)\n    at Module.require (node:internal/modules/cjs/loader:1028:19)\n    at require (node:internal/modules/cjs/helpers:102:18)\n    at eval (eval at <anonymous> (/nodejsAction/services/runner.js:76:49), <anonymous>:1:1)\n    at /nodejsAction/services/runner.js:76:49\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"

To Reproduce
Steps to reproduce the behavior:

  1. Configure a generic runtime action with an include like this in app.config.yaml
include:
  - ["files/*.p12", "certs/"]
  1. Run the application with aio app run
  2. Call the action with aio rt action invoke xxxxxxxx/generic
  3. Get the invocation result with aio rt activation get UUID
    5 In the invocation details the following error can be seen:
"response": {
    "result": {
      "error": "Initialization has failed due to: Error: Cannot find module '/nodejsAction/47jUsebx'\nRequire stack:\n- /nodejsAction/services/runner.js\n- /nodejsAction/services/service.js\n- /nodejsAction/routes/action.js\n- /nodejsAction/app.js\n- /nodejsAction/server.js\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)\n    at Function.Module._load (node:internal/modules/cjs/loader:804:27)\n    at Module.require (node:internal/modules/cjs/loader:1028:19)\n    at require (node:internal/modules/cjs/helpers:102:18)\n    at eval (eval at <anonymous> (/nodejsAction/services/runner.js:76:49), <anonymous>:1:1)\n    at /nodejsAction/services/runner.js:76:49\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"
    },
    "size": 765,
    "status": "application error",
    "success": false
  },

Expected behavior
A successful rt action activation

Screenshots

Desktop (please complete the following information):

  • OS: macOs
  • Browser: chrome
  • Version
> aio --version
@adobe/aio-cli/9.2.0 darwin-arm64 node-v16.18.1

Smartphone (please complete the following information):
N/A

Additional context
Here's a repo enterprise-integration/client-cert-poc containing

  • a working include in master and
  • a failing include in the ACSP-44-broken-include branch

Here's a slack thread with a discussion about this bug: https://magento.slack.com/archives/C013UDBFBGB/p1684146514658789

@rojoangel rojoangel changed the title include target folder certs or certificates gives a runtime action error include target folder named certs or certificates gives a runtime action error May 15, 2023
@shazron shazron added the bug Something isn't working label Oct 4, 2023
@aiojbot
Copy link
Collaborator

aiojbot commented Oct 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants