[BUG] Invalid solution with checkpoint-express
Describe the bug
Integrating @cap.js/checkpoint-express version 0.0.2 into my Express v4.21.2 application shows the challenge page and then fails with "Error. Try again". The browser console shows an "Invalid solution" error. If I refresh with Ctrl-R the challenge loads again and passes.
At the time of the failure, I have the following error logged in the console where the application is running:
Unhandled Promise rejection: Cannot read properties of undefined (reading 'split') ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read properties of undefined (reading 'split')
at dspace-angular/dist/server/main.js:13:1580412
at Generator.next (<anonymous>)
at asyncGeneratorStep (dspace-angular/dist/server/main.js:13:1575013)
at _next (dspace-angular/dist/server/main.js:13:1575316)
at dspace-angular/dist/server/main.js:13:1575512
at new ZoneAwarePromise (dspace-angular/dist/server/main.js:13:1446973)
at dspace-angular/dist/server/main.js:13:1575228
at Cap.validateToken (dspace-angular/dist/server/main.js:13:1580802)
at dspace-angular/dist/server/main.js:13:4506586
at Generator.next (<anonymous>) TypeError: Cannot read properties of undefined (reading 'split')
at dspace-angular/dist/server/main.js:13:1580412
at Generator.next (<anonymous>)
at asyncGeneratorStep (dspace-angular/dist/server/main.js:13:1575013)
at _next (dspace-angular/dist/server/main.js:13:1575316)
at dspace-angular/dist/server/main.js:13:1575512
at new ZoneAwarePromise (dspace-angular/dist/server/main.js:13:1446973)
at dspace-angular/dist/server/main.js:13:1575228
at Cap.validateToken (dspace-angular/dist/server/main.js:13:1580802)
at dspace-angular/dist/server/main.js:13:4506586
at Generator.next (<anonymous>)
Affects:
- [] Standalone mode
- [x] Widget
- [] Server
- [] WASM
- [] Solver
- [] Solver CLI
To Reproduce Steps to reproduce the behavior:
- Go to application
- Verification fails
- See error in browser console and terminal
Desktop (please complete the following information):
- OS: Any
- Browser: Chrome and Firefox tested
- Version: 142
Additional context When running the application on localhost I don't see the problem. When I run the application in production behind an nginx reverse proxy I see the problem.
checkpoints need a very big redesign to work with hooks and seeded challenges so ill probably fix this once i do that
-------- Mensagem original -------- A 8/16/25 9:23 PM, Alan Orth escreveu:
alanorth created an issue (tiagozip/cap#85)
Describe the bug Integrating @cap.js/checkpoint-express version 0.0.2 into my Express v4.21.2 application shows the challenge page and then fails with "Error. Try again". The browser console shows an "Invalid solution" error. If I refresh with Ctrl-R the challenge loads again and passes.
At the time of the failure, I have the following error logged in the console where the application is running:
Unhandled Promise rejection: Cannot read properties of undefined (reading 'split') ; Zone:
; Task: Promise.then ; Value: TypeError: Cannot read properties of undefined (reading 'split') at dspace-angular/dist/server/main.js:13:1580412
at Generator.next (
) at asyncGeneratorStep (dspace-angular/dist/server/main.js:13:1575013)
at _next (dspace-angular/dist/server/main.js:13:1575316)
at dspace-angular/dist/server/main.js:13:1575512
at new ZoneAwarePromise (dspace-angular/dist/server/main.js:13:1446973)
at dspace-angular/dist/server/main.js:13:1575228
at Cap.validateToken (dspace-angular/dist/server/main.js:13:1580802)
at dspace-angular/dist/server/main.js:13:4506586
at Generator.next (
) TypeError: Cannot read properties of undefined (reading 'split') at dspace-angular/dist/server/main.js:13:1580412
at Generator.next (
) at asyncGeneratorStep (dspace-angular/dist/server/main.js:13:1575013)
at _next (dspace-angular/dist/server/main.js:13:1575316)
at dspace-angular/dist/server/main.js:13:1575512
at new ZoneAwarePromise (dspace-angular/dist/server/main.js:13:1446973)
at dspace-angular/dist/server/main.js:13:1575228
at Cap.validateToken (dspace-angular/dist/server/main.js:13:1580802)
at dspace-angular/dist/server/main.js:13:4506586
at Generator.next (
) Affects:
- [] Standalone mode
- Widget
- [] Server
- [] WASM
- [] Solver
- [] Solver CLI
To Reproduce Steps to reproduce the behavior:
- Go to application
- Verification fails
- See error in browser console and terminal
Desktop (please complete the following information):
- OS: Any
- Browser: Chrome and Firefox tested
- Version: 142
Additional context When running the application on localhost I don't see the problem. When I run the application in production behind an nginx reverse proxy I see the problem.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.Message ID: @.***>
Thank you @tiagozip. Looking forward to that, let me know if you need any more information about our application or need testers.
@alanorth
@tiagozip
@tiagozip
checkpoints are currently in the process of being deprecated. i would recommend trying Anubis or Cloudflare instead.
Thanks @tiagozip. That's unfortunate but I understand. For what it's worth I've been testing https://git.gammaspectra.live/git/go-away as well.