this post was submitted on 11 Jun 2023
5 points (100.0% liked)

Waveform

7 readers
1 users here now

A place to talk about how we organise ourselves.

founded 1 year ago
MODERATORS
 

Hi. I am excited about waveform.social.

I already use have an account at mastodon.social, which is another ActivityPub application. In theory, Lemmy and Mastodon should be able to "see" each other. It should be possible to look up a Lemmy user or community from Mastodon, see the posts, and reply to them. This will be ugly in the interfaces but it is expected to work.

If I go to mastodon.social, and I type @[email protected] into the search box, it does not recognize @[email protected] as a Fediverse address.

This is not a problem I have with other Lemmy servers. Other Lemmy servers I can at minimum look up the users and see their profiles (sometimes I cannot see the posts without following first). This makes me believe it is not a problem with the Lemmy software. Also, the problem is not limited to mastodon.social. Users on other Mastodon servers see the same problem. So this makes me believe it is not a problem with mastodon.social's moderation setup.

In a discussion on mastodon.social, we came to the conclusion this problem may be (1) on waveform.social's end, and (2) due to your frontend caching/CDN/WAF setup. Of course edge caching is a good idea. But it appears you need to configure it a certain way to be compatible with Fediverse servers. As is, waveform.social might not even be fully compatible with other Lemmy servers.

Explanation thread: https://social.treehouse.systems/@megmac/110527459896730724

Thread related to waveform.social particularly: https://mastodon.social/@[email protected]/110527420111615988 (link goes to end)

The one sentence explanation is "The webfinger URL for a user needs to know how to accept the Accept: application/activity+json header."

I do not fully understand all of these issues (my Mastodon development has been in mobile clients only) and I don't know what your server-side setup looks like. If I am describing this wrong I apologize. All I know for sure is it does not work. If you can identify that the "no visibility" problem is happening at the side of Mastodon.social or the Mastodon software, I can go raise the issue at that end. I am good at pestering the Mastodon devs :)

Thanks!

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago

@mcc another test

[–] [email protected] 0 points 1 year ago (1 children)

Interesting, I have a CDN set up for sure. Let me share what I can see:

If you actually run curl -v -H "Accept: application/activity+json" https://waveform.social/u/mcc you will get a proper json with type=Person

However if you try to access waveform.social over http (not https) I will force you to redirect to http. Is that what Meg means with a "html page"? (The response is a redirect with no content).

In short:

The bad request: curl -H "Accept: application/activity+json" waveform.social/u/mcc

The good request: curl -H "Accept: application/activity+json" https://waveform.social/u/mcc

[–] [email protected] 0 points 1 year ago (2 children)

Hey. I'm megmac over on treehouse.

I edited the post a bit since I did say http when I meant html in it, and the mastodon link-cleaning made hash of my curl command. It does appear to work correctly now using curl so I was probably doing something weird (I was trying a lot of different combos of different things to compare at the time).

Still, can't seem to see anything from waveform.social from treehouse. So maybe it's something else. Note, I'm not directly affiliated with treehouse in any way so I have no direct insight or anything. I do know there are other servers that have cdn stuff getting in the way (kbin.social was the main other one that I was looking at and is why I talked about cloudflare in that post).

[–] [email protected] 0 points 1 year ago (1 children)

As I was grepping the access logs I JUST saw something come in for @Megan. Was that you testing?

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)

Possibly.. I was also trying searching out from this server but I'm still pretty unfamiliar with Lemmy.

I did just try to search for "[email protected]" from a different server I actually am admin on (sunny.garden) though if you want something easy to grep heh.

I think it's safe to say that if you can find any reference to sunny.garden in your logs that's probably me.

[–] [email protected] 0 points 1 year ago (1 children)

Haha yeah I was grepping on "Megan" and saw hithisismegantesting.

[–] [email protected] 0 points 1 year ago (1 children)

ah cool, so it is trying to find things on your server I guess, I wonder what it doesn't like about it.

[–] [email protected] 0 points 1 year ago (1 children)

I just disabled the https redirect, does that fix anything?

[–] [email protected] 0 points 1 year ago (1 children)

In a little while I should be in a position to spelunk some logs from the other side and see if there's anything explaining what it's not seeing there.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

ok so the thing is that rails isn't just sending Accept: application/activity+json and your server is returning html for pretty much anything that isn't exactly that. I'm not sure what part of your stack would be doing that, but the bad behaviour can be seen by giving an accept header the way rails sends it which is:

curl -H 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html;q=0.1' https://waveform.social/u/megan

(note: you can take text/html out of that altogether and it'll still return html, just to avoid a red herring there)

You can also see that lemmy.ml does this correctly, if you replace the url above with https://lemmy.ml/u/lemmy for eg., so it seems that lemmy is capable of doing this correctly and it might be something at your webserver level (but I guess not your cdn if that's still off?).

[–] [email protected] 1 points 1 year ago (2 children)

Now that's interesting... it's the default nginx config that comes with lemmy that does this: https://github.com/LemmyNet/lemmy/blob/main/docker/nginx.conf#L40

I will try and change that to be slightly more lenient.

[–] [email protected] 2 points 1 year ago (1 children)

Seems to work now, was able to follow @[email protected] from treehouse :)

[–] [email protected] 1 points 1 year ago (1 children)

Good, finally. It's kind of a hack though... I don't really want my proxy to be doing regular expressions...

But oh well, I will probably let the Lemmy devs know.

[–] [email protected] 1 points 1 year ago

I think regexes are the only way to do substring matches in nginx config. It could probably be cleaner as a map than that if chain though.

[–] [email protected] 1 points 1 year ago

Change deployed

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)

I just removed my CDN to be sure, so wait for DNS to propagate and test again if you can. The correct ip should be 31.201.5.235. Let's hope this isn't going to make my bandwidth cry 😅

[–] [email protected] 1 points 1 year ago

It's about 4 hours later which unless you set a weird TTL should be enough time for DNS… I just tried @[email protected] and @[email protected] from the mastodon.social search. Neither went through. So whatever the problem is maybe it wasn't the CDN. Honestly I would suggest turning your CDN back on that could get bad real quick if you don't!! LOL

I am sorry to have set off a wild goose chase, I guess at this point what I'd recommend is escalating to either the Lemmy or Mastodon devs to ask if they know why it's not working.

load more comments
view more: next ›