nextcloud / social

🎉 Social can be used for work, or to connect to the fediverse!
https://apps.nextcloud.com/apps/social
GNU Affero General Public License v3.0
488 stars 59 forks source link

Cant post, webfinger seems not to be working #1734

Open roelfrenkema opened 1 year ago

roelfrenkema commented 1 year ago

Describe the bug When I look for my account @admin@nextcloudto.roelfrenkema.com on an mastodon or friendica server I get a request but nothing happens. I am not found on the instances.

To Reproduce Steps to reproduce the behavior:

Go to any mastodon or friendica server and look up @admin@nextcloudto.roelfrenkema.com

Expected behavior That I am found in the search.

Screenshots If applicable, add screenshots to help explain your problem.

Client details:

Server details **Social app version:** **Operating system**: **Web server:** **Database:** **PHP version:** **Nextcloud version:** (see Nextcloud admin page)
Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
roelfrenkema commented 1 year ago

I did some reseach and there seems to be a problem with the webfinger. Compared one of Nextcloud top one to one of Mastodon . I currently suspect this to be the reason I cannot get any posts out either.

BTW: the finger on nextcloud was also escaped which is not showing in the example

` 1.

curl 'https://nextcloudto.roelfrenkema.com/.well-known/webfinger?resource=acct:admin@nextcloudto.roelfrenkema.com'

{"subject":"admin@nextcloudto.roelfrenkema.com","aliases":["https:\/\/nextcloudto.roelfrenkema.com\/apps\/social\/@admin","https:\/\/nextcloudto.roelfrenkema.com\/index.php\/u\/admin"],"links":[{"rel":"self","type":"application\/activity+json","href":"https:\/\/nextcloudto.roelfrenkema.com\/apps\/social\/@admin"},{"rel":"http:\/\/webfinger.net\/rel\/profile-page","type":"text\/html","href":"https:\/\/nextcloudto.roelfrenkema.com\/index.php\/u\/admin"},{"rel":"http:\/\/ostatus.org\/schema\/1.0\/subscribe","template":"https:\/\/nextcloudto.roelfrenkema.com\/index.php\/apps\/social\/ostatus\/follow\/?uri={uri}"}]}#

2.

curl 'https://mastodon.social/.well-known/webfinger?resource=acct:yaahaa@mastodon.social'

{"subject":"acct:yaahaa@mastodon.social","aliases":["https://mastodon.social/@yaahaa","https://mastodon.social/users/yaahaa"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://mastodon.social/@yaahaa"},{"rel":"self","type":"application/activity+json","href":"https://mastodon.social/users/yaahaa"},{"rel":"http://ostatus.org/schema/1.0/subscribe","template":"https://mastodon.social/authorize_interaction?uri={uri}"}]}#
`

srijansaxena11 commented 1 year ago

I still don't understand what is the issue. Posting is working fine for me. And so is web finger. Do you see any error in console? Also what version of app are you using?

roelfrenkema commented 1 year ago

To start with there is no error in the console. Obviously everything looks fine.

But if we have a look with curl we see that in the subject field the 'acct' part is missing.

Also I am not sure how the other side reacts to the escapes in the return JSON.

As said a curl finger will reveal this. I believe the other side is silently dropping the request.

I am on RC1

srijansaxena11 commented 1 year ago

webfinger without acct in response has no impact on posting anything. also it is weird that you are unable to post and there is no error. There should be something either in console or nextcloud logs. because i am able to post on same rc1.

roelfrenkema commented 1 year ago

I think I just had a little breakthrough with the webfinger. On friendica The url address ( being: https://nextcloudto.roelfrenkema.com/index.php/apps/social/@admin/ ) is recognised, not on mastodon. trying to connect the nextcloud account gives 2 errors

The network type couldn't be detected. Contact can't be added.

The profile address specified does not provide adequate information. No compatible communication protocols or feeds were discovered. Unable to match @-style identity address with a known protocol or email contact. Use mailto: in front of address to force email check.

srijansaxena11 commented 1 year ago

Again I am confused. How is any of this related to posting anything at all? And what have Mastodon and/or Friendica got to do anything with posting on Nextcloud Social?

Danie10 commented 1 year ago

@srijansaxena11 they all use the ActivityPub protocol, so all three can follow, reply, and have their posts seen across those networks. Webfinger seems to work from other networks, but I'm also waiting this thread as my NextCloud Social instance has the same error. Webfinger is broken, and although posts show locally, they are not being seen by my Mastodon account.

roelfrenkema commented 1 year ago

Again I am confused. How is any of this related to posting anything at all? And what have Mastodon and/or Friendica got to do anything with posting on Nextcloud Social?

Am I on the right app? This is supposed to connect to the fediverse of which Friendica and Mastodon are a part. I am confused now.

roelfrenkema commented 1 year ago

@srijansaxena11 they all use the ActivityPub protocol, so all three can follow, reply, and have their posts seen across those networks. Webfinger seems to work from other networks, but I'm also waiting this thread as my NextCloud Social instance has the same error. Webfinger is broken, and although posts show locally, they are not being seen by my Mastodon account.

Dani could you try and connect to my next loud instance from your nextcloud instance. @admin@nextcloudto.roelfrenkema.com

Danie10 commented 1 year ago

Yes a post made on NextCloud Social should be seen, followed, liked from Mastodon or any other Fediverse network using ActivityPub. And on NextCloud Social an account there must likewise see Mastodon and other accounts. This was certainly how it was working when I started using it. Unless that has all changed, and it is now stand-alone without ActivityPub. But I've not seen any communication about such a change.

The whole point of using Social was that it was an ActivityPub node running under NextCloud.

roelfrenkema commented 1 year ago

Looks like we hooked up Andie no notification or request or anything. But at least it's a start. Did you get the message I sent you?

Danie10 commented 1 year ago

@roelfrenkema I've tried a public mention post now for you, but I tried to my own Mastodon account 2 days ago and nothing seems to be replicating. I think Webfinger is needed for remote servers to recognise the account. So I'm waiting for some solution to try as I spent 2 whole days trying all sorts of different things and nothing worked. It used to work before so I don't want to keep it at, and I end up breaking my NextCloud instance. But Webfinger and NodeInfo are issues - possibly even related to the NextCloud code itself. Just that Social makes use of Webfinger whole most other NextCloud apps don't need it.

roelfrenkema commented 1 year ago

Nope nothing came in. And yes my idea too is the the webfinger is not properly formatted. I think the acct is necessary and the escapes should be removed from the response. The curl request can help debugging this. Strange though. I had hoped that as we are connected now I would have received you message. Incoming usually is no problem. So it all boils down to outgoing.

srijansaxena11 commented 1 year ago

What if I add "acct:" to subject? Does anyone want to try out with this?

roelfrenkema commented 1 year ago

Sure I pull it as soon as your ready

srijansaxena11 commented 1 year ago

How about #1740 ? I created a Telegram group for now if people are interested: https://t.me/nextcloud_social

roelfrenkema commented 1 year ago

Not for me thanks. Maybe after the war.

srijansaxena11 commented 1 year ago

I tried adding acct: to subject. It doesn't change anything. I still cannot find my social on mastodon and cannot follow from friendica.

srijansaxena11 commented 1 year ago

Are you people able to follow local accounts on the same instance?

srijansaxena11 commented 1 year ago

On friendica my social URL is somehow of localhost: image

srijansaxena11 commented 1 year ago

Everything working fine now