YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
87 stars 27 forks source link

No admin mail received after installation, can not login to PeerTube. #323

Closed chbmeyer closed 2 years ago

chbmeyer commented 2 years ago

Describe the bug

I installed PeerTube and didn't receive a mail with instructions and password. For this reason I can not "enable LDAP authentication" and peertube is useless.

Some days ago ( 2022-03-08 00:31 ) I installed it successfully and received the mail ("peertube has just been installed! "), too. But for some reason I deinstalled and reinstalled PeerTube on my YNH, so of course the password is not valid anymore.

The prosody vs. metronome issue bites me too (and kills my default ynh_XMPP Server), but this is an already existing bugreport.

Context

Steps to reproduce

I installed PeerTube without a related error, but there are some warnings while installing node dependencies:

2022-04-04 22:54:41,479: DEBUG - ++ /opt/node_n/bin/n --version
2022-04-04 22:54:41,486: DEBUG - + dpkg --compare-versions v8.0.1 lt 8.0.1
2022-04-04 22:54:41,489: WARNING - dpkg: warning: version 'v8.0.1' has bad syntax: version number does not start with digit

After that PeerTube runs fine and I try to login from PeerTube webinterface, but I don't have credentials.

Logs

I don't want to share the installation log files with YunoShare, because it leaks usernames. This is the stuff before the usernames:

2022-04-04 22:54:34,351: DEBUG - Nothing to update in LDAP
2022-04-04 22:54:34,352: DEBUG - Permission 'peertube.main' updated
2022-04-04 22:54:34,579: DEBUG - To view the log of the operation 'Update URL related to permission 'peertube'', use the command 'yunohost log show 20220404-205434-permission_url-peertube'
2022-04-04 22:54:35,041: DEBUG - The permission database has been resynchronized
2022-04-04 22:54:35,324: DEBUG - SSOwat configuration regenerated
2022-04-04 22:54:35,578: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./50-opensondage" peertube <here are lots of usernames> ... 

These are the DEBUG - warnings later in the Logs:

2022-04-04 22:55:47,560: DEBUG - [1/5] Validating package.json...
2022-04-04 22:55:47,566: DEBUG - [2/5] Resolving packages...
2022-04-04 22:55:48,138: DEBUG - [3/5] Fetching packages...
2022-04-04 22:56:14,988: DEBUG - [4/5] Linking dependencies...
2022-04-04 22:56:14,990: DEBUG - warning "@aws-sdk/client-s3 > @aws-sdk/middleware-sdk-s3@3.50.0" has unmet peer dependency "@aws-sdk/signature-v4-crt@^3.31.0".
2022-04-04 22:56:14,995: DEBUG - warning " > @typescript-eslint/eslint-plugin@5.11.0" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
2022-04-04 22:56:14,996: DEBUG - warning " > eslint-config-standard-with-typescript@21.0.1" has incorrect peer dependency "@typescript-eslint/eslint-plugin@^4.0.1".
2022-04-04 22:56:14,997: DEBUG - warning " > eslint-config-standard-with-typescript@21.0.1" has incorrect peer dependency "eslint@^7.12.1".
2022-04-04 22:56:14,998: DEBUG - warning " > eslint-config-standard-with-typescript@21.0.1" has incorrect peer dependency "eslint-plugin-promise@^4.2.1 || ^5.0.0".
2022-04-04 22:56:14,998: DEBUG - warning "eslint-config-standard-with-typescript > @typescript-eslint/parser@4.33.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0 || ^7.0.0".
2022-04-04 22:56:14,998: DEBUG - warning "eslint-config-standard-with-typescript > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
2022-04-04 22:56:14,998: DEBUG - warning "eslint-config-standard-with-typescript > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint-plugin-promise@^4.2.1 || ^5.0.0".
2022-04-04 22:56:14,999: DEBUG - warning "swagger-cli > @apidevtools/swagger-cli > @apidevtools/swagger-parser@10.0.3" has unmet peer dependency "openapi-types@>=7".
2022-04-04 22:56:15,024: DEBUG - warning Workspaces can only be enabled in private projects.
2022-04-04 22:56:21,971: DEBUG - [5/5] Building fresh packages...
2022-04-04 22:56:22,844: DEBUG - $ test -n "$NOCLIENT" || (cd client && yarn install --pure-lockfile)
2022-04-04 22:56:23,051: DEBUG - yarn install v1.22.18
2022-04-04 22:56:23,217: DEBUG - [1/4] Resolving packages...
2022-04-04 22:56:23,953: DEBUG - [2/4] Fetching packages...
2022-04-04 22:56:46,648: DEBUG - [3/4] Linking dependencies...
2022-04-04 22:56:46,668: DEBUG - warning " > bootstrap@4.6.1" has unmet peer dependency "jquery@1.9.1 - 3".
2022-04-04 22:56:46,669: DEBUG - warning " > bootstrap@4.6.1" has unmet peer dependency "popper.js@^1.16.1".
2022-04-04 22:56:46,670: DEBUG - warning " > primeng@13.1.1" has unmet peer dependency "primeicons@^5.0.0".
2022-04-04 22:56:46,926: DEBUG - [4/4] Building fresh packages...

There is another logfile that could explain something, this is the "tail" of /var/log/peertube/peertube.log. Since it says something about node_modules, too, it could be something related to the node thing during installation:

Error: Can't send mail - all recipients were rejected: 451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure
    at SMTPConnection._formatError (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
    at SMTPConnection._actionRCPT (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:1626:28)
    at SMTPConnection.<anonymous> (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:1579:30)
    at SMTPConnection._processResponse (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:947:20)
    at SMTPConnection._onData (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
    at Socket.SMTPConnection._onSocketData (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
    at Socket.emit (node:events:526:28)\n    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)","message":"Can't send mail - all recipients were rejected: 451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure","code":"EENVELOPE","response":"451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure","responseCode":451,"command":"RCPT TO","rejected":["my_user@maindomain.tld"],"rejectedErrors":[{"stack":"Error: Recipient command failed: 451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure
    at SMTPConnection._formatError (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
    at SMTPConnection._actionRCPT (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:1612:24)
    at SMTPConnection.<anonymous> (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:1579:30)
    at SMTPConnection._processResponse (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:947:20)
    at SMTPConnection._onData (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
    at Socket.SMTPConnection._onSocketData (/var/www/peertube/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
    at Socket.emit (node:events:526:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)","message":"Recipient command failed: 451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure","code":"EENVELOPE","response":"451 4.3.0 <webmaster@peertube.maindomain.tld>: Temporary lookup failure","responseCode":451,"command":"RCPT TO","recipient":"my_user@maindomain.tld"}]},"level":"error","message":"Error in email sender.","label":"peertube.maindomain.tld:443","timestamp":"2022-04-04T21:25:08.153Z"}

Thank you for your attention Christian

chbmeyer commented 2 years ago

Hello there,

I found the problem and solved it, so I'll close this issue, too.

There has been a problem with Mailman3. After I removed Mailman3 from yunohost sending and receiving of mails works again.


However:

I don't know where the bug report for the warning from above belongs to. It is caused by /usr/share/yunohost/helpers.d/nodejs which calls /opt/node_n/bin/n --version. The output of that command is 'v8.0.1' and not like expected.

So I simply changed (in /opt/node_n/bin/n) the line VERSION="v8.0.1" to VERSION="8.0.1" and the warning is gone, too.

Thanks a lot Christian