Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Following from mastodon is not possible #268

Closed
dartcafe opened this issue Dec 23, 2018 · 33 comments
Closed

Following from mastodon is not possible #268

dartcafe opened this issue Dec 23, 2018 · 33 comments
Labels
bug Something isn't working needs info
Milestone

Comments

@dartcafe
Copy link

dartcafe commented Dec 23, 2018

Describe the bug
When trying to follow https://mastodon.xyz/@nextcloud via the "Follow" button, i get an error which says
"Could not find the required redirect URL for your account", after I enter my cloud ID ("dartcafe@nc15.yagst.de").

Calling https://nc15.yagst.de/.well-known/webfinger?resource=acct:dartcafe@nc15.yagst.de gives a JSON:

{"subject":"acct:dartcafe@nc15.yagst.de","links":[{"rel":"self","type":"application\/activity+json","href":"https:\/\/nc15.yagst.de\/index.php\/apps\/social\/@dartcafe\/"}]}

Any idea, what I can do? There is no log entry, debug level.

To Reproduce
Steps to reproduce the behavior:

  1. fresh install of social 0.1.1
  2. Click on 'Follow Nextcloud on mastodon.xyz' --> Error
    grafik
  3. Switch to profile
    But it seems, that I follow nextcloud. There are no posts visible (not sure, if there should be some on my startpage).
    grafik
  4. Trying to follow from mastodon
    grafik

Social app version:
0.1.1
Operating system:
Linus
Web server:
Apache
Database:
MySQL
PHP version:
7.1
Nextcloud version: (see Nextcloud admin page)
15.0.0

@dartcafe dartcafe added the bug Something isn't working label Dec 23, 2018
@MagicFab
Copy link

Same here, I was able to reproduce this problem.
However, if someone follows me from Mastodon, I can follow them back when they show up at
https://mynextcloud/index.php/apps/social/@myuser/followers

@LeoSum8
Copy link

LeoSum8 commented Dec 27, 2018

I see a similar behavior for my nextcloud instance.

Also when I use the mastodon search function on https://mastodon.cloud, I can see the following entries in my access-log:

195.201.111.25 - - [27/Dec/2018:12:19:11 +0100] "GET /.well-known/webfinger?resource=acct:myname@mycloud.dom HTTP/1.1" 302 303
195.201.111.25 - - [27/Dec/2018:12:19:11 +0100] "GET /nextcloud/public.php?service=webfinger&resource=acct:myname@mycloud.dom HTTP/1.1" 200 202
195.201.111.25 - - [27/Dec/2018:12:19:11 +0100] "GET /nextcloud/index.php/apps/social/@myname/ HTTP/1.1" 200 1641
195.201.111.25 - - [27/Dec/2018:12:19:11 +0100] "GET /apps/social/@mynameHTTP/1.1" 404 219
195.201.111.25 - - [27/Dec/2018:12:19:11 +0100] "GET /apps/social/@mynameHTTP/1.1" 404 219

Is it possible that somehow the /nextcloud/ subfolder is lost on the way?

Like @dartcafe mentioned, manually calling the webfinger delivers the correct response

However I CAN follow users from other mastodon instances by using the nextcloud search function and then clicking FOLLOW. But I don't seem to appear in their follower list.

Also, I cannot send direct messages back and forth.

My global timeline is also completely empty, I would expect to see messages from the followed accounts from time to time.

@scuba323
Copy link

scuba323 commented Jan 1, 2019

@LeoSum8 try using

'htaccess.RewriteBase' => '/nextcloud',

In your config.php; then run

occ maintenance:update:htaccess

It worked for me using '/' (running on root dir, but subdomain)

@vasyugan
Copy link

vasyugan commented Jan 1, 2019

I see the same issue with a nextcloud instance running on nginx, obviously, there is no .htaccess here. As per the nginx config instructions, I have uncommented

    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json;
    last;
 

As webfinger seems to be what is important her, I have also sinderte the line

rewrite ^/.well-known/webfinger /public.php?service=webfinger&$1 last;
When I manually call

https://cloud.[myserver]/.well-known/webfinger?resource=acct:[user]@cloud.[myserver]

I am served a json in response which looks valid:
{"subject":"acct:[user]@cloud.[server] HTTP\/","links":[{"rel":"self","type":"application\/activity+json","href":"https:\/\/cloud.[server]\/apps\/social\/@[user]\/"}]}

Also, the profile is publicly accessible at

https://cloud.{server}/apps/social/@{user}/

Still, it is not working. What's wrong there?

@juliusknorr
Copy link
Member

@dartcafe The issue with following the nextcloud account from the social app (steps 1-3) should be fixed by #264 .

  1. Trying to follow from mastodon
    grafik

@daita Any idea how the follow from works on mastodon: I guess it needs a redirect url provided at some specific endpoint?

@Scumpeter
Copy link

Scumpeter commented Jan 4, 2019

When you compare the json output of the social app to the output of other mastodon instances [1], you'll notice that they give a lot more information. I think the part that looks the most like a subscription link is:

5  
rel "http://ostatus.org/schema/1.0/subscribe"
template "https://mastodon.xyz/authorize_interaction?uri={uri}"`

[1] https://mastodon.xyz/.well-known/webfinger?resource=acct:nextcloud@mastodon.xyz

@vasyugan
Copy link

vasyugan commented Jan 5, 2019

When you compare the json output of the social app to the output of other mastodon instances [1], you'll notice that they give a lot more information.

Indeed, you're right. But it seems for some, Nextcloud social is working, isn't it? I can't imagine they released something that is just not functional yet.

@koalajoe23
Copy link

Can also reproduce this.

Running nextcloud social on nextcloud.spinweb.de without subfolder.

Having the following in my nginx config:

`rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

location = /.well-known/carddav {
  return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
  return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/webfinger {
  return 301 $scheme://$host/public.php?service=webfinger;
}

`
Anything I could do to help track this bug down?

@ArtificialOwl
Copy link
Member

@sirl1on I think there is some documentation somewhere on how to enable the webfinger on nginx

@vasyugan
Copy link

vasyugan commented Jan 6, 2019 via email

@ArtificialOwl
Copy link
Member

Can you describe me your process of following someone ? I am not able to reproduce the bug on my side.

@vasyugan
Copy link

vasyugan commented Jan 7, 2019 via email

@ArtificialOwl
Copy link
Member

Thanks !

Can confirm that this way of following someone is not implemented (yet) into Nextcloud Social.
Please search for the remote account in your Nextcloud Social, and click on Follow.

@vasyugan
Copy link

vasyugan commented Jan 7, 2019

I don't see a follow button there. Am I overlooking something? @daita

@vasyugan
Copy link

vasyugan commented Jan 7, 2019

I see now what you mean, but first I have to bring up the user profile, and since I don't see a search function, the workaround is to manually enter the URL https://cloud.XXX/apps/social/@REMOTEUSER@REMOTEHOST/
(works for some profiles, but not for others. E.g failed to follow fsf@status.fsf.org

@ArtificialOwl
Copy link
Member

there is a searchbar at the top of the screen !

@vasyugan
Copy link

vasyugan commented Jan 7, 2019

there is a searchbar at the top of the screen !

Thanks. Seems to work only for mastodon instances. e.g searching for fsf@status.fsf.org (which is on GNU social or status.net or something) returns no results. But that's probably a different bug already.

@ArtificialOwl
Copy link
Member

also: https://status.fsf.org/.well-known/webfinger?resource=acct:fsf@status.fsf.org

I cannot see any support for ActivityPub

@vasyugan
Copy link

vasyugan commented Jan 7, 2019

also: https://status.fsf.org/.well-known/webfinger?resource=acct:fsf@status.fsf.org

I cannot see any support for ActivityPub

Not sure what ActivityPub is, but I can subscribe from other Mastodon or GNUsocial instances just fine.
Same with:

rms@gnusocial.no
fda@quitter.im
heiseonline@squeet.me
deutschlandfunk@squeet.me
anarchismhub@todon.nl
tagesschau@gs.morphtown.de

What do Mastodon and GNUsocial handle there that Nextcloud social does not?

I first thought that maybe only mastodon is supported, but todon.nl is a mastodon host, and it also doesn't interoperate with nextcloud social

@emersonkfuri
Copy link
Contributor

@daita ... Modifying webfinger.php to add rel => "http://ostatus.org/schema/1.0/subscribe", I was able to follow nextcloud@mastodon.xyz using step 4.

My mod:

diff -ru a/lib/webfinger.php b/lib/webfinger.php
--- a/lib/webfinger.php	2019-01-07 16:41:42.815526249 -0200
+++ b/lib/webfinger.php	2019-01-07 16:41:41.296517992 -0200
@@ -75,6 +75,10 @@
 			'rel'  => 'self',
 			'type' => 'application/activity+json',
 			'href' => $href
+		],
+		[
+			'rel' => 'http://ostatus.org/schema/1.0/subscribe',
+			'template' => $urlGenerator->getBaseURL() . '/apps/social/@{uri}'
 		]
 	]
 ];

@ArtificialOwl
Copy link
Member

Sorry, was working on this this morning, haven't pushed.

@ArtificialOwl
Copy link
Member

@vasyugan Please have a look to this: w3c/activitypub#228. There is no issue implementing some feature from OStatus, but we will focus on ActivityPub

@aliceinwire
Copy link

aliceinwire commented Feb 20, 2019

I get this issue

Error | Only variables should be passed by reference at /var/www/html/custom_apps/social/lib/Command/QueueProcess.php#97 |  
-- | -- | --

Warning | 500  -  {"status":-1,"exception":"OCA\\Social\\Exceptions\\RequestServerException","message":"500  -  {\"host\":\"status.fsf.org\",\"url\":\"\/.well-known\/webfinger\",\"timeout\":10,\"type\":0,\"data\":{\"resource\":\"acct:fsf@status.fsf.org\"}}"} |  
-- | -- | --

configuration:


        # The following 2 rules are only needed for the user_webfinger app.
        # Uncomment it if you're planning to use this app.
        rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

        # The following rule is only needed for the Social app.
        # Uncomment it if you're planning to use this app.
        rewrite ^/.well-known/webfinger /public.php?service=webfinger last;

        location = /.well-known/carddav {
            return 301 $scheme://$host/remote.php/dav;
        }
        location = /.well-known/caldav {
            return 301 $scheme://$host/remote.php/dav;
        }

@ArtificialOwl
Copy link
Member

still having issue with 0.2.6 ?

@aliceinwire
Copy link

let me check

@aliceinwire
Copy link

works for me.
I can follow most of my mastodon contacts now.

@aliceinwire
Copy link

but pleroma and status.fsf.org dosen't work

@ArtificialOwl
Copy link
Member

any account I can try ?

@aliceinwire
Copy link

@ArtificialOwl
Copy link
Member

thanks for those links. I will fix the issue with pleroma, however GNU social, used on status.fsf.org, appears to not being compatible with ActivityPub

@vasyugan
Copy link

vasyugan commented Jul 4, 2019 via email

@shtrom
Copy link
Member

shtrom commented Jul 5, 2019

Following Mastodon instances seems to work, but I have the same issue as reported above with status.fsf.org, as well as a mirrored.social.

I also don't seem to be able to reply to message from their Mastodon host:

@ArtificialOwl
Copy link
Member

Unfortunately, gnusocial is not using ActivityPub (yet ?)

I will close this issue for now if the only problem is to interact with instance of gnusocial (like status.fsf.org)

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

No branches or pull requests