Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Error when joining thread for first time #641

Open
oznekenzo opened this issue Nov 1, 2019 · 8 comments
Open

Error when joining thread for first time #641

oznekenzo opened this issue Nov 1, 2019 · 8 comments
Assignees
Labels
bug Something isn't working needs replication
Milestone

Comments

@oznekenzo
Copy link
Contributor

Am seeing an error when an account tries to join a new thread for the first time. I believe this is regardless of whether the account has opened the space associated with the thread before. This error goes away and user is able to join thread on the second try. This is preventing the user from posting to their wall on first login.

Am getting this error:
Screen Shot 2019-11-01 at 2.03.09 PM.png

@oznekenzo oznekenzo added the bug Something isn't working label Nov 1, 2019
@oznekenzo
Copy link
Contributor Author

Correction! It seems it does work if the user has opened the corresponding space before

@oznekenzo
Copy link
Contributor Author

Correction to the correction! Seems it happens some of the time if you've already opened the space, but every time if the space hasn't been opened before.

@oed
Copy link
Member

oed commented Nov 4, 2019

This might be because the space DID is not replicated on the pinning-node yet. Are you opening the thread with the current user as the firstModerator? Can you share the code?

@oznekenzo
Copy link
Contributor Author

Yes - I'm opening the thread with the current user as the first moderator.
Code:

const space = await box.openSpace(followingSpaceName);
const opts = {
  firstModerator: myAddress,
};
const wallThread = await space.joinThread(myProfileWall, opts);
const wallPosts = await wallThread.getPosts();
wallThread.onUpdate(() => updateMyWall());

@oed
Copy link
Member

oed commented Nov 4, 2019

As a workaround I would recommend doing this instead:

const space = await box.openSpace(followingSpaceName);
const opts = {
  firstModerator: space.DID,
};
const wallThread = await space.joinThread(myProfileWall, opts);
const wallPosts = await wallThread.getPosts();
wallThread.onUpdate(() => updateMyWall());

@oznekenzo
Copy link
Contributor Author

@oed I'm seeing the error despite using space.DID instead of eth addr

@oznekenzo
Copy link
Contributor Author

Update: Although the error persists and results in the same log and prevents fetching the thread, there was a bug in the dapp that prevented fetching the same thread on onSyncDone. The thread is successfully fetched the second time around in onSyncDone on (still first signin), so there is less urgency to solve this issue, if there is one.

@dazuck dazuck modified the milestones: Sprint 4, Sprint 40 May 14, 2020
@oed
Copy link
Member

oed commented May 19, 2020

I'm currently unable to replicate this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs replication
Projects
None yet
Development

No branches or pull requests

3 participants