git ssb


Dominic / patchbay

lite client invite redirect fails

Closedev opened this issue on 11/11/2016, 6:13:45 PM

lite client invite redirect fails

I often get this error when testing the lite client invites on a server that isn't connected to the main network: TypeError: Argument 1 of Node.replaceChild is not an object.

This is also confusing from a user experience, because while the key has been generated and the client is connected, the page doesn't redirect to '/', so people just end up using the invite code again and then they get could not connect to sbot.

I've fixed this on the lite client I hand out with a

    h('p', {innerHTML: 'If the page doesn\'t redirect, navigate to <a href="/">Home</a>'})

But that's a band-aid. It'd be best for the page to redirect after the invite is accepted.

%uOJbCNGC8vd+zUK8p0zGthw5hMCpibl3D0zmW2EyRCU=.sha256 ev · 11/11/2016, 7:36:22 PM

Actually, it should probably forward to /setup now that we have that, right?

%vSZ0dsIUKyVXPJ79eG/3TiyPRqvXA/eNMN3SZLnXm4o=.sha256 Dominic · 11/12/2016, 1:07:09 AM

yeah, although setting up a lite client is a bit simpler because you don't need to do a sync and thus don't need the progress bar, etc

%oUMr+4LveKbIRPF9WKLiUCpooepx1STmqSJy7RoIHm4=.sha256 ev · 11/30/2016, 3:16:08 PM

Turns out I already have an issue for this, as mentioned on the call. Lite client redirect fails after the follow/following step. cc: @dominic

I think this has something to do with legacy hypertabs. The page directs to /#null, which confuses people during on-boarding.

Visual in animated gif form:

%bw1QRzugNqJYaX7p0Ot4FTHwOASJs3xWCQxTZmY8uMI=.sha256 cel · 11/30/2016, 3:43:28 PM

looks likes the redirect happens here:

git grep -n 'location.hash ='
modules_basic/invite.js:97:        location.hash = data.redirect

it expects the invite to have a redirect part. checking ssb-refs, it looks like this is supposed to be a part following a '#' in the invite code. perhaps try appending to the invite urls a '#<msgid>' for some "welcome message"

%CXtM5w+7Ra7SsYlHUs4Iw04bdAK5fuSRE0b+azTDxSs=.sha256 ev · 11/30/2016, 4:48:35 PM

@cel I tried appending a #<msgid>, but then I got this error. The invite is not processed.

Argument 1 of Node.replaceChild is not an object.


I'm going to see if I can just change data.redirect to '/', and see if it'll forward.

%RDyZYAphUEaWhqm436CsklLK05mdL6U0G8SxMErXnI0=.sha256 @QgiZV03zfhPHSjVO4ja… · 11/30/2016, 5:01:04 PM

Yes! Fixed the redirect.

ev mentioned this issue in This pull fixes the redirect in the lite…
%O3IcYp5KdvMqUoRFbBKhkwk+1xAGp6uDX4mKsy+uBrE=.sha256 Dominic closed this issue · 12/1/2016, 12:42:39 AM

Built with git-ssb-web