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

client/js: Occasional error: TypeError: Cannot read properties of undefined (reading 'key') #147

Open
CedarMist opened this issue Jul 5, 2023 · 2 comments

Comments

@CedarMist
Copy link
Member

CedarMist commented Jul 5, 2023

This happened when merging from a branch into main.

The tests completed OK on the branch, but after merging into main it fails.

See: https://github.com/oasisprotocol/sapphire-paratime/actions/runs/5465401574/attempts/1

The second attempt succeeds.

Maybe it's worth re-trying the fetch runtime public key function? Or having some other way of safely erroring.

     TypeError: Cannot read properties of undefined (reading 'key')
      at /home/runner/work/sapphire-paratime/sapphire-paratime/clients/js/src/cipher.ts:294:30
      at Generator.next (<anonymous>)
      at fulfilled (/home/runner/work/sapphire-paratime/sapphire-paratime/clients/js/lib/cjs/cipher.cjs:28:58)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
@CedarMist CedarMist changed the title Occasional error: TypeError: Cannot read properties of undefined (reading 'key') client/js: Occasional error: TypeError: Cannot read properties of undefined (reading 'key') Jul 5, 2023
@lukaw3d
Copy link
Member

lukaw3d commented Aug 2, 2023

Does this ever happen outside tests? My first thought would be that waiting for containers to initialize is inaccurate

@CedarMist
Copy link
Member Author

CedarMist commented Aug 2, 2023

Yup it does, I encounter it sometimes in the browser when using sapphire-dev, but haven't narrowed down exactly what happens. The worst thing is it's intermittent, so I need to have a debug mode version of sapphire-paratime client that will log more information about the requests being made and the responses etc. so I can determine if there's a strategy to avoid this in future or the origin of the problem.

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

No branches or pull requests

2 participants