Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

hit this today #70

Open
mafintosh opened this issue Dec 6, 2021 · 1 comment
Open

hit this today #70

mafintosh opened this issue Dec 6, 2021 · 1 comment

Comments

@mafintosh
Copy link
Collaborator

/home/ubuntu/hypermirror/node_modules/hypercore/lib/replicator.js:443
this.upgrading.resolve()
^

TypeError: Cannot read property 'resolve' of null
at RequestPool._onupgrade (/home/ubuntu/hypermirror/node_modules/hypercore/lib/replicator.js:443:20)
at async Replicator.ondata (/home/ubuntu/hypermirror/node_modules/hypercore/lib/replicator.js:805:7)

@Octalbyte
Copy link

@mafintosh

this.upgrading is null unless one of two specific lines are run. There are lines 319 and 379.
319 is inside the function _updateUpgrade. I think the error might be in 379. The two lines above it have the comment:

// TODO: if the peer fails, we need to resolve the promise as well woop woop
// so we need some tracking mechanics for upgrades in general.

My guess is something went wrong with

  1. The UpgradeLock constructor. But I can't really think of a way a constructor so simple my run into an error and return null.
  2. The conditions to set this.upgrading, which are in lines 318 and 362-390 (a lot of TODO notes in that area).

Is there a way to replicate the error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants