I am having an issue where the pushResourcesToPeer is not completing or throwing an error.
Added some code to the pushing logic:
await Promise.all( Array.from(peerIdsToPush).map(async (peerId, syncDebugId) => { let lastProgress: SyncingProgress | undefined = undefined const addrs = addrsForPeer.get(peerId) if (!addrs) { updatePeerStatus(peerId, 'error', 'No addresses found for peer') } try { const pushProgress = grpcClient.resources.pushResourcesToPeer({ addrs, resources: [pushResourceUrl], }) for await (const progress of pushProgress) { console.log( `== publish ${syncDebugId} == progress`, JSON.stringify(toPlainMessage(progress)), ) updatePeerStatus( peerId, 'pending', `Pushing ${progress.blobsDownloaded}/${progress.blobsDiscovered}`, ) lastProgress = progress } console.log(`== publish ${syncDebugId} == DONE =====`) updatePeerStatus(peerId, 'success', 'Done') } catch (error) { console.error( `== publish ${syncDebugId} == Error pushing to peer`, peerId, error, ) updatePeerStatus(peerId, 'error', (error as Error).message) } console.log(`== publish ${syncDebugId} == lastProgress`, lastProgress) // if (lastProgress?.peersFailed ?? 0 > 0) { // updatePeerStatus(peerId, 'error', 'Failed to push to site.') // } }), )The code is not formatting correctly in seed. Here it is in main:
Basically, we should eventually hit the log that says DONE, or we should hit the log that says "Error pushing to peer" but we don't hit either. The last log statement looks like this:
== publish 0 == progress {"peersFound":1,"peersSyncedOk":0,"peersFailed":0,"blobsDiscovered":82,"blobsDownloaded":0,"blobsFailed":0}Notice: 1 peer found but 0 fails and 0 ok!!
Here is a screenshot that will hopefully provide more context
I am trying to push this document, and it is failing, so at the moment the dev gateway does not have my latest changes: https://dev.hyper.media/hm/z6MkrHrucC37SHrDnA2kGM26YKsqCuS8mYJtHW1dDoYgWsgA?v=bafy2bzacebxc35qsbbda4se64jr6zzrelc5k4g73bwwfhrcdmocrodmoltb5m&l
BTW this is after I went offline and online a few times, so maybe the remote gateway daemon is in a bad state. I have tried restarting the local app+daemon and I get the same result every time.