YunoHost-Apps / friendica_ynh

Friendica package for YunoHost
http://friendi.ca/
Other
11 stars 13 forks source link

Friendica, fresh install, how to connect #64

Closed sthaydn closed 2 years ago

sthaydn commented 2 years ago

Hi everyone,

I have a fresh yunohost install and wanted to try Friendica (again). Still, no chance to login as administrator. How does it exactly work?

Yunohost says: "For admin rights: When installation is complete, you will need to visit your domain page and login with the admin account username and password which was entered at the time of installation process. You can then create your profile and access the admin panel."

I have tried this several times with variants like email address as username, but it only restarts the page.

Has this still something to do with LDAP auth?

Regards,

Stefan

sthaydn commented 2 years ago

Does it work for you guys?

tio-trom commented 2 years ago

It was a very weird process for me too. See https://github.com/YunoHost-Apps/friendica_ynh/issues/43#issuecomment-778690087

sthaydn commented 2 years ago

Thanks for the hint.

I have tried this workaround again, but still no connection to the outer world possible. I see "422...host validation error...webfinger..." when trying to connect from Mastodon.

sthaydn commented 2 years ago

Now I also understand. It isn't a workaround, it is the actual setup mechanism. :-D

So when installing friendica inside yunohost and choosing the "admin account", this only means the mailadress will be stored somewhere waiting for a user to REGISTER with this email to become administrator. Are we two the only ones not getting that right?! :-D

But, still no chance for me to connect to other accounts outside my friendica install. Have tried this several times now with different settings (e. g. language set to en) and have no clue what is wrong here.

tio-trom commented 2 years ago

Yah the setup is very weird. Or at least the readme is. As for not being able to connect this is indeed weird. Try to see the logs. Also post about it to friendica's github. Friendica yunohost is not active at all form my experience, so it is not likely to get help here.

isAAAc commented 2 years ago

juste made a PR to make it more clear in the readme.md

https://github.com/isAAAc/friendica_ynh/pull/1

isAAAc commented 2 years ago

https://github.com/YunoHost-Apps/friendica_ynh/pull/65

sthaydn commented 2 years ago

Thanks. That sure will help others.

sthaydn commented 2 years ago

Yah the setup is very weird. Or at least the readme is. As for not being able to connect this is indeed weird. Try to see the logs. Also post about it to friendica's github. Friendica yunohost is not active at all form my experience, so it is not likely to get help here.

How did you manage to get it working? I have a dedicated domain with ssl, let's say: friendica.domain.com. Yunohost its main domain is domain.com, also mails are account@domain.com. account1@domain.com is the user who is set for installing friendica, language is set to de.

After installing I visit friendica.domain.com, register a new user account1 with account1@domain.com and login with this user. All seems fine, but no connection to other users in the fediverse possible.

sthaydn commented 2 years ago

This is what the log shows when trying to connect to another account: 2021-12-22T20:39:10Z index [NOTICE]: http error {"url":"https:\/\/freindal.hallertau.social\/dfrn_notify\/sthaydn","code":400,"error":"","callstack":"GuzzleResponse::__construct, HTTPClient::request, HTTPClient::post, Salmon::slapper, Contact::createFromProbeForUser, follow_process, follow_post, LegacyModule::runModuleFunction, LegacyModule::post, call_user_func, Module::run, App::runFrontend"} - {"file":"GuzzleResponse.php","line":71,"function":"checkSuccess","uid":"b29c9b","process_id":26370} 2021-12-22T20:39:10Z index [DEBUG]: debug {"info":{"Server":["nginx"],"Date":["Wed, 22 Dec 2021 20:39:10 GMT"],"Content-Type":["text\/html; charset=UTF-8"],"Content-Length":["194"],"Connection":["keep-alive"],"X-Account-Management-Status":["none"]}} - {"file":"GuzzleResponse.php","line":72,"function":"checkSuccess","uid":"b29c9b","process_id":26370} 2021-12-22T20:39:10Z index [DEBUG]: Request stop. {"url":"https:\/\/freindal.hallertau.social\/dfrn_notify\/sthaydn","method":"post"} - {"file":"HTTPClient.php","line":155,"function":"request","uid":"b29c9b","process_id":26370} 2021-12-22T20:39:10Z index [INFO]: slapper for https://freindal.hallertau.social/dfrn_notify/sthaydn returned 400 [] - {"file":"Salmon.php","line":212,"function":"slapper","uid":"b29c9b","process_id":26370} 2021-12-22T20:39:10Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"ff714d","process_id":26368} 2021-12-22T20:39:10Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"ca84e1","process_id":26370} 2021-12-22T20:39:10Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"1f98da","process_id":26368} 2021-12-22T20:39:10Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"1f98da","process_id":26368} 2021-12-22T20:39:10Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"abb37e","process_id":26370} 2021-12-22T20:39:20Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [INFO]: Path "/tmp/spezl.hallertau.social" is not writable for user friendica [] - {"file":"System.php","line":298,"function":"isDirectoryUsable","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [DEBUG]: Request start. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get"} - {"file":"HTTPClient.php","line":65,"function":"request","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [INFO]: Local link {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","callstack":"HTTPClient::get, Summary::checkSelfHostMeta, Summary::content, call_user_func, Page::initContent, Page::run, App::runFrontend"} - {"file":"HTTPClient.php","line":68,"function":"request","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [DEBUG]: http request config. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get","options":{"headers":{"User-Agent":"Friendica 'Siberian Iris' 2021.09-1434; https:\/\/spezl.hallertau.social"},"on_headers":{}}} - {"file":"HTTPClient.php","line":140,"function":"request","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [NOTICE]: Curl redirect. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","to":"https:\/\/hallertau.social\/yunohost\/sso\/?r=aHR0cHM6Ly9zcGV6bC5oYWxsZXJ0YXUuc29jaWFsL2luZGV4LnBocD9wYWdlbmFtZT0vLndlbGwta25vd24vaG9zdC1tZXRh","method":"GET"} - {"file":"HTTPClientFactory.php","line":66,"function":"Friendica\\Factory\\{closure}","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [DEBUG]: Request stop. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get"} - {"file":"HTTPClient.php","line":155,"function":"request","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [DEBUG]: accounts {"accounts":[["Normales Konto","2"],["Automatisch folgendes Konto (Marktschreier)",0],["\u00d6ffentliches Forum-Konto",0],["Automatische Freunde-Seite",0],["Blog-Konto",0],["Privates Forum-Konto",0]]} - {"file":"Summary.php","line":205,"function":"content","uid":"9970c6","process_id":26368} 2021-12-22T20:39:20Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"d00c41","process_id":26370} 2021-12-22T20:39:20Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"0f7f45","process_id":26368} 2021-12-22T20:39:23Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"a8de1d","process_id":26370} 2021-12-22T20:39:23Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"f7293a","process_id":26368} 2021-12-22T20:39:23Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"cd0e2b","process_id":26370} 2021-12-22T20:39:27Z index [DEBUG]: DELETE FROMsessionWHERE (expire< 1640205567) {"callstack":"Database::gc, session_start, Native::start, Dice::Dice\\{closure}, Dice::create, Dice::Dice\\{closure}"} - {"file":"Database.php","line":1242,"function":"delete","uid":"485992","process_id":26368} 2021-12-22T20:39:27Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"485992","process_id":26368}

tio-trom commented 2 years ago

Well if you are logged as admin then see your settings maybe....if all works from the admin perspective, then try to share your ID with another external account see if it works to be followed. Share it here I'll try to follow you. Also, open an issue on the Friendica's github page to get more help with this. But I see no reason why it should not connect to the fediverse.

sthaydn commented 2 years ago

It is sthaydn@spezl.hallertau.social .

Thanks.

tio-trom commented 2 years ago

I cannot connect but I suspect it is because your spezl.hallertau.social URL is only accessible via YNH users. Make it public from the yunohost settings.

Groups / users currently allowed to access this app:
visitors, all_users.
sthaydn commented 2 years ago

Good finding. It was indeed not in the visitors group. But after that I get a 504 now. Have deinstalled friendica, did another install, added friendica to visitiors, have registered the admin, now it is very slow and I often get an 504 nginx error. Also rebootet the whole system.

sthaydn commented 2 years ago

Interesting. When not allowing visitors again, friendica is fast again. Very strange.

tio-trom commented 2 years ago

Yeah I think this ynh package is not setup properly or something. You have to increase some server values see https://github.com/YunoHost-Apps/friendica_ynh/issues/63 - if I have more time I can send you more about this, but I think the default server configs are too low for this ynh install, and your server can't handle it...

sthaydn commented 2 years ago

Thank you. I have done some settings and it seems to run better now. I even managed to get a connection to another friendica account. But can't write a private message.

EDIT: It only took some time to send that message. Friendica to Friendica seems to work now.

A connection to mastodon still doesn't work, "unknown network type". The user also has type "unkn" when browsing the directory.

sthaydn commented 2 years ago

This is what's inside the log:

2021-12-23T19:08:42Z index [NOTICE]: http error {"url":"sthaydn@stubn.hallertau.social","code":400,"error":"","callstack":"GuzzleResponse::__construct, HTTPClient::request, HTTPClient::get, HTTPSignature::fetchRaw, HTTPSignature::fetch, ActivityPub::fetchContent, Processor::fetchMissingActivity, Item::fetchByLink, follow_remote_item, follow_content, LegacyModule::runModuleFunction, LegacyModule::content, call_user_func, Page::initContent, Page::run, App::runFrontend"} - {"file":"GuzzleResponse.php","line":71,"function":"checkSuccess","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [DEBUG]: debug {"info":{"Server":["nginx"],"Date":["Thu, 23 Dec 2021 19:08:42 GMT"],"Content-Type":["text\/html"],"Content-Length":["166"],"Connection":["close"]}} - {"file":"GuzzleResponse.php","line":72,"function":"checkSuccess","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [DEBUG]: Request stop. {"url":"sthaydn@stubn.hallertau.social","method":"get"} - {"file":"HTTPClient.php","line":155,"function":"request","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [INFO]: Fetched for user 0 from sthaydn@stubn.hallertau.social returned 400 [] - {"file":"HTTPSignature.php","line":462,"function":"fetchRaw","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [NOTICE]: Activity was not fetchable, aborting. {"url":"sthaydn@stubn.hallertau.social"} - {"file":"Processor.php","line":782,"function":"fetchMissingActivity","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [INFO]: Invalid url {"url":"sthaydn@stubn.hallertau.social"} - {"file":"Diaspora.php","line":1148,"function":"fetchByURL","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [INFO]: Link not found {"uid":0,"uri":"sthaydn@stubn.hallertau.social"} - {"file":"Item.php","line":3274,"function":"fetchByLink","uid":"7d75c5","process_id":1189} 2021-12-23T19:08:42Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"95d7dd","process_id":1190} 2021-12-23T19:08:42Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"d62162","process_id":1174} 2021-12-23T19:08:46Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"750599","process_id":1178} 2021-12-23T19:08:46Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"62d93a","process_id":1192} 2021-12-23T19:08:46Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"32aa72","process_id":1193} 2021-12-23T19:08:46Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"9ba151","process_id":1194} 2021-12-23T19:08:46Z index [DEBUG]: index.php: page not found. {"request_uri":"\/%7B$thumb%7D","address":"2a02:8106:219:a700:35c7:3287:37d2:8e67","query":"pagename=\/{$thumb}"} - {"file":"Module.php","line":264,"function":"run","uid":"9ba151","process_id":1194} 2021-12-23T19:08:47Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"aad10a","process_id":1195} 2021-12-23T19:08:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"884e1a","process_id":1183} 2021-12-23T19:08:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"eabe91","process_id":1182} 2021-12-23T19:08:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"2cb8b2","process_id":1175} 2021-12-23T19:08:58Z index [DEBUG]: index.php: page not found. {"request_uri":"\/%7B$thumb%7D","address":"2a02:8106:219:a700:35c7:3287:37d2:8e67","query":"pagename=\/{$thumb}"} - {"file":"Module.php","line":264,"function":"run","uid":"2cb8b2","process_id":1175} 2021-12-23T19:08:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"34e06a","process_id":1179} 2021-12-23T19:09:01Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:01Z index [DEBUG]: Request start. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get"} - {"file":"HTTPClient.php","line":65,"function":"request","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:01Z index [INFO]: Local link {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","callstack":"HTTPClient::get, Summary::checkSelfHostMeta, Summary::content, call_user_func, Page::initContent, Page::run, App::runFrontend"} - {"file":"HTTPClient.php","line":68,"function":"request","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:01Z index [DEBUG]: http request config. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get","options":{"headers":{"User-Agent":"Friendica 'Siberian Iris' 2021.09-1434; https:\/\/spezl.hallertau.social"},"on_headers":{}}} - {"file":"HTTPClient.php","line":140,"function":"request","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:01Z index [DEBUG]: Request stop. {"url":"https:\/\/spezl.hallertau.social\/.well-known\/host-meta","method":"get"} - {"file":"HTTPClient.php","line":155,"function":"request","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:01Z index [DEBUG]: accounts {"accounts":[["Normales Konto","1"],["Automatisch folgendes Konto (Marktschreier)",0],["\u00d6ffentliches Forum-Konto",0],["Automatische Freunde-Seite",0],["Blog-Konto",0],["Privates Forum-Konto",0]]} - {"file":"Summary.php","line":205,"function":"content","uid":"8f9b24","process_id":1186} 2021-12-23T19:09:02Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"4fa659","process_id":1196} 2021-12-23T19:09:02Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"fa2549","process_id":1201} 2021-12-23T19:09:05Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"3b7ccb","process_id":1199} 2021-12-23T19:09:05Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"6001e2","process_id":1209} 2021-12-23T19:09:05Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"0baa5e","process_id":1217} 2021-12-23T19:09:08Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":479,"function":"getSigner","uid":"10a1a3","process_id":1197}

tio-trom commented 2 years ago

A connection to mastodon still doesn't work, "unknown network type". The user also has type "unkn" when browsing the directory.

I have not seen this error....

sthaydn commented 2 years ago

As the initial issue seems to be fixed, I will close this one. For the connection problem I will investigate further and open a new issue if necessary.