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

(sync) ignore non-existent message? #114

Merged
merged 1 commit into from
Jun 9, 2023
Merged

(sync) ignore non-existent message? #114

merged 1 commit into from
Jun 9, 2023

Conversation

mistermoe
Copy link
Contributor

@bobbilee19 encountered the following error:

Sync failed due to error:  TypeError: Cannot read properties of undefined (reading 'descriptor')
    at _SyncApi.getDwnMessageType_fn (file:///Users/bobbilee/TBD/web5-app/node_modules/@tbd54566975/web5-user-agent/dist/esm/main.mjs:1072:21)
    at _SyncApi.<anonymous> (file:///Users/bobbilee/TBD/web5-app/node_modules/@tbd54566975/web5-user-agent/dist/esm/main.mjs:886:95)
    at Generator.next (<anonymous>)
    at fulfilled (file:///Users/bobbilee/TBD/web5-app/node_modules/@tbd54566975/web5-user-agent/dist/esm/main.mjs:46:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

i don't have a reliable way to reproduce this error, but this PR introduces a best-guess fix that also happens to address a TODO. I'm pretty sure the added check will fix the bug because getDwnMessageType is only called in 1 place

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #114 (49f8e7b) into main (dd83cec) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   65.97%   66.05%   +0.08%     
==========================================
  Files          31       31              
  Lines        3447     3456       +9     
  Branches      195      195              
==========================================
+ Hits         2274     2283       +9     
  Misses       1171     1171              
  Partials        2        2              
Components Coverage Δ
crypto 0.00% <ø> (ø)
dids 48.61% <ø> (ø)
web5 81.32% <ø> (ø)
web5-agent 0.00% <ø> (ø)
web5-proxy-agent 0.00% <ø> (ø)
web5-user-agent 79.63% <100.00%> (+0.14%) ⬆️

@frankhinek frankhinek added the bug Something isn't working label Jun 7, 2023
@mistermoe
Copy link
Contributor Author

published an alpha release that @bobbilee19 pulled into her project and is no longer encountering the errors that she was seeing previously

@mistermoe
Copy link
Contributor Author

link to relevant part of discord discussion here

@frankhinek frankhinek merged commit 5a8e8e3 into main Jun 9, 2023
@frankhinek frankhinek deleted the fix/sync branch June 9, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants