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

Credo agent failing to start #888

Closed
swcurran opened this issue Dec 2, 2024 · 6 comments · May be fixed by #889
Closed

Credo agent failing to start #888

swcurran opened this issue Dec 2, 2024 · 6 comments · May be fixed by #889

Comments

@swcurran
Copy link
Contributor

swcurran commented Dec 2, 2024

In the most recent test runs, the Credo agent is failing to start, resulting in all tests failing.

@nodlesh
Copy link
Contributor

nodlesh commented Dec 2, 2024

I believe that the Credo agent is actually starting, however it is taking longer to start in some instances than the 30 second timer we have set waiting to get a status. This is manifesting now because we no longer run tests if we don't get a status on an agent. In the past it would carry on and we wouldn't notice. I think we need to extend the checking of status to 60 seconds.
I've seen this a couple times with ACAPy as well.

@nodlesh
Copy link
Contributor

nodlesh commented Dec 3, 2024

I may be mistaken and the credo agent is actually not starting. I am getting a Require ESM error when building locally now. A bad library version update maybe.

@swcurran
Copy link
Contributor Author

swcurran commented Dec 4, 2024

Any luck resolving this? When I run it locally, no logs are written, so I can't see anything to debug. AFAIK, the build works fine.

@nodlesh
Copy link
Contributor

nodlesh commented Dec 4, 2024

Not yet. I'm working through the package.json trying to pin modules to previous versions but not luck.

This is the error.

Starting Credo agent ...
yarn run v1.22.22
$ /src/node_modules/.bin/ts-node src/index.ts -p 9030 -i false
/src/node_modules/@tsed/common/lib/cjs/exports.js:5
require("@tsed/logger");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /src/node_modules/@tsed/logger/lib/esm/index.js from /src/node_modules/@tsed/common/lib/cjs/exports.js not supported.
Instead change the require of index.js in /src/node_modules/@tsed/common/lib/cjs/exports.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/src/node_modules/@tsed/common/lib/cjs/exports.js:5:1) {
  code: 'ERR_REQUIRE_ESM'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So something has changed in Tsed/common or logger.

@nodlesh
Copy link
Contributor

nodlesh commented Dec 11, 2024

After working with the main Ts.ED maintainers, they have fixed a v6 peer dependancy and a v7 peer dependancy. This has fixed our immediate problem. However, I am still working with them to move the credo backchannel to Ts.ED v7 permanently so this will be less likely to happen again. So if we can get to a working v7 I will still do a PR for that. I'll only spend a few more hours on that and if we can't sort it will revert to v6 as is.
Closing this issue since credo tests behaved normally in last night's run.

@nodlesh nodlesh closed this as completed Dec 11, 2024
@swcurran
Copy link
Contributor Author

Awesome stuff — well done!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants