-
Notifications
You must be signed in to change notification settings - Fork 135
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
cli veramo execute ...
fails with Maximum call stack size exceeded
#1281
Comments
Try directly with node --stack-size=8000 ./packages/cli/bin/veramo.js execute -m packDIDCommMessage -a '{"packing":"anoncrypt","message":{"to":"did:key:z6MktEQbgrewCxg3bXkdKAqHJXSEMJVcxUhcEvkWVqyBpzYn", "body":{"hello":"world"}}}' Still results in the same error. |
Have the same error but while using
veramo version: |
This is a result of the following line in const { openapi } = await OasResolver.resolve(agent.getSchema(), null, { resolveInternal: true }) The My working theory at this stage is that there is a cycle in the schema that the OpenApi Schema resolver (oas-resolver) cannot handle. |
I have gotten The following works: node ./packages/cli/bin/veramo.js execute -m resolveDid -a '{"didUrl": "did:ens:vitalik.eth"}' If this change is made to diff --git a/packages/oas-resolver/index.js b/packages/oas-resolver/index.js
index ab2ce37..655d505 100644
--- a/packages/oas-resolver/index.js
+++ b/packages/oas-resolver/index.js
@@ -118,6 +118,7 @@ function resolveAllFragment(obj, context, src, parentPath, base, options) {
recurse(obj,{},function(obj,key,state){
if (isRef(obj, key)) {
if (typeof obj.$fixed !== 'undefined') delete obj.$fixed;
+ if (!options.preserveMiro) delete obj['x-miro'];
}
});
@@ -466,11 +467,11 @@ function loopReferences(options, res, rej) {
options.openapi = deRef(options.openapi,options.original,{verbose:options.verbose-1});
if (options.verbose>1) console.warn(common.colour.yellow+'Finished internal resolution!',common.colour.normal);
}
- recurse(options.openapi,{},function(obj,key,state){
- if (isRef(obj, key)) {
- if (!options.preserveMiro) delete obj['x-miro'];
- }
- });
res(options);
}
} Which is undoing commit: I have no idea why, after many other calls to I cloned "oas-resolver": "file:../oas-kit/packages/oas-resolver", |
caused by commit aabd716 addressing issue Mermade#152
The above commit is necessary to solve another issue. However, I found a simpler solution that just changes a single line, and have made a pull request against the diff --git a/packages/oas-resolver/index.js b/packages/oas-resolver/index.js
index ab2ce37..cb00516 100644
--- a/packages/oas-resolver/index.js
+++ b/packages/oas-resolver/index.js
@@ -466,7 +466,7 @@ function loopReferences(options, res, rej) {
options.openapi = deRef(options.openapi,options.original,{verbose:options.verbose-1});
if (options.verbose>1) console.warn(common.colour.yellow+'Finished internal resolution!',common.colour.normal);
}
- recurse(options.openapi,{},function(obj,key,state){
+ recurse(options.openapi,{identityDetection:true},function(obj,key,state){
if (isRef(obj, key)) {
if (!options.preserveMiro) delete obj['x-miro'];
} |
I also checked it locally - works for me. Could we force somehow that fix? |
As a temporary measure, you can:
You're done. You could also do: But frankly, the first one is less work. You can verify that the Note should show a relative path with |
Wow, amazing investigation and kudos for finding a fix. As you probably already figured, this is not related to the particular plugin method being executed but rather with the parsing of the schema generated by the plugins, and I suspect it might have something in common with #1235 |
veramo execute -m resolveDid ...
fails with Maximum call stack size exceeded
veramo execute ...
fails with Maximum call stack size exceeded
@mirceanis Yes, unfortunately we are relying on the maintainers of At present, I see four approaches:
|
I just tried downgrading oas-resolver to 1.1.1 and it seems to fix the issue. Thinking about it a bit more, the I'm leaning toward removing the interactivity from the Any thoughts? |
I guess the question is whether it's bloatware or not. On one side, there's this:
On the other hand, this is a plugin driven ecosystem and this feature allows plugin creators to manually investigate the operation of their plugin without the overhead of grokking and implementing the CLI themselves. FWIW I would vote for retention, after working on the coordinate-mediation v3. |
introducing Debug instead of `console.log` for logging, so that the console can be used for stdout. fixes #1281
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
introducing Debug instead of `console.log` for logging, so that the console can be used for stdout. fixes #1281
using Debug instead of `console.log` for logging, so that the console can be used for stdout. fixes #1281
using Debug instead of `console.log` for logging, so that the console can be used for stdout. fixes #1281
using Debug instead of `console.log` for logging, so that the console can be used for stdout. fixes #1281
Bug severity
4
Describe the bug
Results in:
I'm fairly confident my usage is correct due to:
#681
and this code:
To Reproduce
Steps to reproduce the behaviour:
ens
did-method toagent.yml
:Calling:
veramo execute -m resolveDid -a '{"didUrl": "did:ens:vitalik.eth"}'
Fails.
Observed behaviour
Maximum call stack size exceeded
Expected behaviour
DID resolution. The same as the result of:
Which works fine.
Details
Versions:
The text was updated successfully, but these errors were encountered: