Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Browser pubsub Firefox workaround not working around? #3226

Closed
achingbrain opened this issue Aug 14, 2020 · 5 comments
Closed

Browser pubsub Firefox workaround not working around? #3226

achingbrain opened this issue Aug 14, 2020 · 5 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding

Comments

@achingbrain
Copy link
Member

This function claims to start a pubsub subscription moving by sending some data but running the tests with DEBUG=ipfs* shows the following:

LOG: '%cipfs-http-client:pubsub:subscribe %cFailed to publish empty message%c +4ms', 'color: #6633CC', 'color: inherit', 'color: #6633CC', HTTPError: argument "data" is required

HTTPError: argument "data" is required

    at Object.errorHandler [as handleError] (file:/Users/alex/Documents/Workspaces/ipfs/js-ipfs/packages/ipfs-http-client/src/lib/core.js:87:15)
    at async Client.fetch (file:/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/ipfs-utils/src/http.js:153:9)
    at async eval (file:/Users/alex/Documents/Workspaces/ipfs/js-ipfs/packages/ipfs-http-client/src/pubsub/publish.js:22:17)
    at async eval (file:/Users/alex/Documents/Workspaces/ipfs/js-ipfs/packages/ipfs-http-client/src/pubsub/subscribe.js:30:9)

So go-IPFS is rejecting the empty message. Needs more analysis but this workaround may not be working around any more.

@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding labels Aug 14, 2020
@StationedInTheField
Copy link

Uncaught (in promise) Error: argument "data" is required
    at main-es2015.a39af3eb25375ecc866b.js:1
    at Object.publish (main-es2015.a39af3eb25375ecc866b.js:1)
    at main-es2015.a39af3eb25375ecc866b.js:1

@achingbrain
Copy link
Member Author

@StationedInTheField aside from the error message itself, are you seeing problems with pubsub - dropped messages etc?

@StationedInTheField
Copy link

StationedInTheField commented Aug 26, 2020

I'm still investigating, I found that 2-3/10 messages are delayed, also between two browsers on the same machine but couldn't find the cause yet.

achingbrain added a commit that referenced this issue Aug 27, 2020
go-IPFS errors when sending empty pubsub messages so if the subscribe
call has not returned a result within a second, assume it's ok.

Fixes #3226
@achingbrain
Copy link
Member Author

Possibly related: #2662

@achingbrain
Copy link
Member Author

Closing as this issue is very stale.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants