-
Notifications
You must be signed in to change notification settings - Fork 15
empty Object returns as an error when integrating with js-ipfs #31
Comments
This empty object might be the result of the server returning an error object and JSON.stringify turning it into an empty object. |
I'm running the npm version, but I can try the latest one.
…On Mon, Sep 18, 2017, 2:42 PM Maciej Krüger ***@***.***> wrote:
This empty object might be the result of the server returning an error
object and JSON.stringify turning it into an empty object.
I will look into the error later.
Btw are you running the latest version on master or npm?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA45Q9xWRLBVKCViMq3ZMc6sv9Vc6FLzks5sjmU3gaJpZM4PaR_9>
.
|
I think the error could be caused by using |
@ya7ya I've solved the empty object bug. Now it should return a string or an error (in the latest git version) |
@mkg20001 Thanks dude, I'll check it out. and yes I was using the peerId in the constructor as instructed 👍 |
Should have been fixed. Reopen if it regresses. |
Hey @mkg20001 , Thanks for the cool module, I noticed the following when trying to use this with
js-ipfs
,it returns an err when triggering
listen
, the err is just an empty object{}
and I traced it back to the callback function onthis.io.emit('ss-join', maStr, pubKeyStr, (err, sig) => {
if you simply ignore that empty object error
if (err && Object.keys(err).length !== 0)
, it works but i'm not sure thats a proper fix , and alsosig
returnedundefined
.Thanks for your help, I appreciate the hard work 👍
The text was updated successfully, but these errors were encountered: