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
491 stars 59 forks source link

Empty timeline #706

Closed sylvainmetayer closed 5 years ago

sylvainmetayer commented 5 years ago

Describe the bug I just re-enabled the app after a while without using it (last version was maybe 0.1.4 or 0.2.0, I'm not sure). I did a reset of the app with the ./occ social:reset command to start from a fresh configuration.

The bug is that I can't see the activty of people I follow. I am seen as a follower of the accounts I follow.

I've tried to clear cache and force queue process to see if something changed, without any luck so far.

sudo -u www-data ./occ social:cache:refresh
sudo -u www-data ./occ social:queue:process

Status of install

$ sudo -u www-data ./occ social:check:install
$ echo $?
0

To Reproduce Steps to reproduce the behavior:

Expected behavior Only my activty is shown. I expected to see the latest activity of @nextcloud@mastodon.xyz and other account I follow.

Screenshots Capture _untitledimage

Client details:

Server details **Social app version** social v0.2.101 **Operating system**: Debian 9.9 **Web server:** Nginx **Database:** MariaDB 15.1 **PHP version:** 7.3.8 **Nextcloud version:** (see Nextcloud admin page) 16.0.4.1
Logs #### Nextcloud log (data/nextcloud.log) The second line does not seems relevant for this bug report, but appear multiple times. The first line occured when I re-enabled the app after the upgrade to latest version (0.2.101). ``` Doctrine\DBAL\Exception\NonUniqueFieldNameException: An exception occurred while executing 'ALTER TABLE oc_social_a2_stream ADD details LONGTEXT DEFAULT NULL': SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'details' {"reqId":"eq3jEALgKTXRMOtzDapn","level":3,"time":"2019-08-27T18:36:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"implode(): Invalid arguments passed at \/var\/www\/nextcloud\/apps\/logreader\/lib\/Log\/Formatter.php#93","userAgent":"--","version":"16.0.4.1"} ``` #### Browser log JS warning : ``` Erreur dans les liens source : TypeError: NetworkError when attempting to fetch resource. URL de la ressource : https://NEXTCLOUD/core/js/dist/main.js?v=b0a660a2-6 URL du lien source : main.js.map ``` Network answer of GET request to `/apps/social/api/v1/stream/home?limit=25&since=1566932393`. Same response from `/apps/social/api/v1/stream/federated?limit=25&since=1566935598` and `/apps/social/api/v1/stream/timeline?limit=25&since=1566932393` ``` {"result":[],"status":1} ```
loxK commented 5 years ago

I have the same issue since launch, so I don't use it ...

StCyr commented 5 years ago

Hi,

did you enabled debug log?

https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/logging_configuration.html?highlight=log#

If not, could you enable and send it to us?

@daita could you have a look at the DB issue?

Doctrine\DBAL\Exception\NonUniqueFieldNameException: An exception occurred while executing 'ALTER TABLE oc_social_a2_stream ADD details LONGTEXT DEFAULT NULL': SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'details'

ArtificialOwl commented 5 years ago

how do you get this error ?

StCyr commented 5 years ago

He got the error "when I re-enabled the app after the upgrade to latest version (0.2.101)" (sic)

sylvainmetayer commented 5 years ago

@StCyr I'll enable debug and try again to send detailled result tomorrow, as I have no SSH access to my server right now.

However, it seems the bug apply only on past activity. Their was some new activity from people I follow, and it showed up in my feed this morning. I can't see their activity from before I enable the app but I can see new activity it seems.

StCyr commented 5 years ago

However, it seems the bug apply only on past activity. Their was some new activity from people I follow, and it showed up in my feed this morning. I can't see their activity from before I enable the app but I can see new activity it seems.

Well, maybe it's not a bug? I don't know enough about ActivityPub to give a definitive answer but I can easily imagine that activities can't get registered when the application is disabled.

ArtificialOwl commented 5 years ago

I can easily imagine that activities can't get registered when the application is disabled.

Exactly.

sylvainmetayer commented 5 years ago

Ok, that would explain about past activity not shown.

I have no more details in the logs with debug, just some info like the one below

{"reqId":"RxG34n76V2wJ2axz1VcH","level":1,"time":"2019-09-01T12:10:52+00:00","remoteAddr":"x.x.x.x","user":"--","app":"social","method":"POST","url":"/apps/social/inbox","message":"[<<] shared-inbox: {\"@context\":\"https://www.w3.org/ns/activitystreams\",\"id\":\"https://mastodon.social/users/USER#delete\",\"type\":\"Delete\",\"actor\":\"https://mastodon.social/users/USER\",\"to\":[\"https://www.w3.org/ns/activitystreams#Public\"],\"object\":\"https://mastodon.social/users/USER\",\"signature\":{\"type\":\"RsaSignature2017\",\"creator\":\"https://mastodon.social/users/USER#main-key\",\"created\":\"2019-09-01T12:10:41Z\",\"signatureValue\":\"SIGNATURE KEY\"}}","userAgent":"http.rb/3.3.0 (Mastodon/2.9.2; +https://mastodon.social/)","version":"16.0.4.1","id":"5d6bb54cc4824"}

Maybe this is out of this issue but is their a way to display all the activity of an user ? Currently, when I go on /apps/social/@nextcloud@mastodon.xyz for example, I only get the choice to see the username and profile picture, with the follow/unfollow button but I do not get any of the user's activity.

nextcloud

StCyr commented 5 years ago

Maybe this is out of this issue but is their a way to display all the activity of an user ? Currently, when I go on /apps/social/@nextcloud@mastodon.xyz for example, I only get the choice to see the username and profile picture, with the follow/unfollow button but I do not get any of the user's activity.

Yes, it's out of the issue :-)

But, you're right, their should be a way imho. And, there aren't any atm.

I think this functionality hasn't been implemented yet due to security concerns (you may get redirected you to malicious websites). That would be great if @daita could tell us more :-)

As a workaround for the time being, if you want to see the activity of a (non-local) user, you have to browse to the server (in your case mastodon.xyz) and find the user (in your case @nextcloud)

ArtificialOwl commented 5 years ago

i'll have a look, however this is not the reason for empty timeline. You should reinstall from scratch; try this to uninstall everything and reinstall the last version of social:

./occ social:reset –uninstall
StCyr commented 5 years ago

i'll have a look, however this is not the reason for empty timeline. You should reinstall from scratch; try this to uninstall everything and reinstall the last version of social:

./occ social:reset –uninstall

@daita, if I have understand correctly, his timeline is not empty anymore...

sylvainmetayer commented 5 years ago

Yes, my timeline is not empty anymore.

I'll wait for the functionality to see a user profile to be implemented but we can close this issue now. Thanks a lot ! :)