cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
14.06k stars 1.56k forks source link

Error when inviting members #2677

Closed lyandr closed 7 years ago

lyandr commented 7 years ago

Hello,

i installed cachet on cloud foundry successfully. But the only things that don't work is when i try to invite a new member: each time i entered an email address and click on invite button i stay on the same page with the following error message: "Whoops. The invite could not be sent, please try again. The emails must be a valid email address."

The test mail and mails for subscriptions work so for me it is not a mail configuration issue. Or maybe i didn't undesrtand the purpose of this fonctionnality :s

Cachet version: 2.4.0-dev Php: 5.6.30

Phelzier commented 7 years ago

I too experience the same issue with Cachet 2.4.0-dev and php 5.6.31

ConnorVG commented 7 years ago

What email addresses did you try?

Phelzier commented 7 years ago

I've tried any email address. My work, my colleagues, my personal. No matter what address I enter, it says "The emails must be a valid email address.". The format is correct xxx@yyy.zzz. Don't want to put email addresses on a public forum.

ConnorVG commented 7 years ago

Yeah I understand, I don't need an exact email just a solid comparison. Could you attain an error log?

Edit: don't forget to redact your email if so.

Phelzier commented 7 years ago

I can add users manually and the email address is accepted and works with the notification engine.

Phelzier commented 7 years ago

Nothing in settings > log. No laravel log for 4 days, do I need to enable a higher level of logging?

Edie: Set debug to true in app.php

jbrooksuk commented 7 years ago

Are emails being sent? It could be that you have the QUEUE_DRIVER setting to database or redis but nothing is running the queue.

Phelzier commented 7 years ago

Hi James,

Please see .env config below. I've hidden some identifiable information.

Thanks, Ben

APP_ENV=production
APP_DEBUG=false
APP_URL=http://localhost
APP_KEY=base64:******************************

DB_DRIVER=mysql
DB_HOST=localhost
DB_UNIX_SOCKET=null
DB_DATABASE=cachet
DB_USERNAME=**************
DB_PASSWORD=********************
DB_PORT=null
DB_PREFIX=null

CACHE_DRIVER=apc
SESSION_DRIVER=file
QUEUE_DRIVER=sync

CACHET_BEACON=true
CACHET_EMOJI=false
CACHET_AUTO_TWITTER=true

MAIL_DRIVER=smtp
MAIL_HOST=smtp.uk.v***********.***
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ADDRESS=UKITStatus@v******c.***
MAIL_NAME=null
MAIL_ENCRYPTION=null

REDIS_HOST=null
REDIS_DATABASE=null
REDIS_PORT=null

GITHUB_TOKEN=null

NEXMO_KEY=null
NEXMO_SECRET=null
NEXMO_SMS_FROM=Cachet
jbrooksuk commented 7 years ago

Well, you need to set MAIL_NAME I believe. Try that.

Phelzier commented 7 years ago

I have added some text in to Mail_Name field, still no joy :(

Mail leaves Cachet if I do test: image

But sending invite still fails: image

optsysonl commented 7 years ago

Same problem here. Using normal email address.

Phelzier commented 7 years ago

At least it's not just me, that makes me happier that I didn't screw something up lol

jbrooksuk commented 7 years ago

This is so weird... I just tried out on 2.3 and It worked fine, both from the dashboard and invitation page.

screen shot 2017-08-27 at 11 48 27

screen shot 2017-08-27 at 11 47 47

paulnus commented 7 years ago

Same problem here on a new install.

Your demo site doesn't work either. https://dev.cachethq.io/dashboard/team/invite

EDIT

Just to clarify, these are the Team invites.

jbrooksuk commented 7 years ago

Just to clarify, these are the Team invites.

Ah right! I'll investigate this shortly.

Diogo-Ferreira commented 7 years ago

Got the same problem and was able to fix it quickly by removing the rule in

app\Bus\Commands\User\InviteUserCommand.php

public $rules = [
        #'emails' => 'required|array|email',
    ];

Apparently, there's some problem with de validation rule.

jbrooksuk commented 7 years ago

Fixed in v2.4

Phelzier commented 7 years ago

Nice work guys, working now. :)