getappmap / getappmap/appmap-js
Fingerprint worker error in GitHub analyze-action
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 18
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Archiving AppMaps from /home/runner/work/partners-gateway/partners-gateway
Warning: Command "appmap archive --revision ecbbb57ef7b9d2766a7a9c15224b64e7d7211962" exited with failure code 1
Warning: Analyzing AppMaps using 2 worker threads
Uncaught exception in worker thread: Error: return #7347 is missing call #7001
Error: return #7347 is missing call #7001
at Q.add (/snapshot/appmap-js/packages/models/dist/index.cjs:3:8115)
at B.add (/snapshot/appmap-js/packages/models/dist/index.cjs:3:8525)
at /snapshot/appmap-js/packages/models/dist/index.cjs:3:9705
at Array.forEach (<anonymous>)
at ge.source (/snapshot/appmap-js/packages/models/dist/index.cjs:3:9556)
at new ge (/snapshot/appmap-js/packages/models/dist/index.cjs:3:9316)
at G (/snapshot/appmap-js/packages/models/dist/index.cjs:3:12413)
at Fingerprinter.fingerprint (/snapshot/appmap-js/packages/cli/built/fingerprint/fingerprinter.js:93:49)
Warning: Note: The AppMap archive won't contain the version of @appland/appmap because process.env.npm_package_version is not available.
Building 'auto' archive from tmp/appmap
Building archive of revision ecbbb57ef7b9d2766a7a9c15224b64e7d7211962
Indexing AppMaps...
/home/runner/work/_actions/getappmap/analyze-action/v1/dist/webpack:/analyze-action/src/executeCommand.ts:84
reject(new Error(`Command failed with code ${code}`));
^
Error: Command failed with code 1
at ChildProcess.<anonymous> (/home/runner/work/_actions/getappmap/analyze-action/v1/dist/webpack:/analyze-action/src/executeCommand.ts:84:1)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
Note: In verbose: true mode this error is swallowed or shadowed by another error, so it's essential to test that the error handling works in verbose mode as well.
The error comes from fingerprinter.ts:103:
There is a parent/child mismatch for unknown reasons. Possibly something weird that the user is doing in their code; possibly a rare edge case in appmap-ruby.
When we handle this error properly and print the name of the AppMap that is causing it, the user can either fix their test case or disable AppMap for that test using the rspec tag appmap: false.
The error appears to be handled in processAppMapDir.ts:
} else if (result.error) {
warn(`${name} failed to process ${file}: ${(result.error as Error).message}`);
errors.push(result.error);
result.error.message might be undefined?
Procedure
- Reproduce this error by attempting to fingerprint an AppMap with a parent/child mismatch error.
- Run the reproduction with verbose both true and false
- Fix the error handling so that the problematic AppMap name will be printed, and the fingerprinter will continue rather than aborting.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with fingerprinter.ts:103 and the error handling in processAppMapDir.ts, then run the existing parent/child mismatch reproduction with verbose mode both true and false. Done means the problematic AppMap name is printed, the error is handled without aborting fingerprinting, and verbose mode does not hide or replace the useful error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100