Core: Swiftmailer error when signing up

Created on 31 Dec 2018  路  4Comments  路  Source: flarum/core

Bug Report

Current Behavior
This issue didn't start until Beta 8 was released and I created a local Beta 8(.1) install VIA my WAMP setup. I believe this is a Windows related issue only because of Googling the error that was logged in the Flarum logs which the user had the same exact error I got (see here). Although, not related to Flarum, Flarum does use Laravel components (and the package linked earlier).

What happens basically is that when I sign up as a new user, the test user I signed up with gets created but Flarum still throws up a "Oops! Something went wrong. Please reload the page and try again." along with a 500 error in the console (see screenshots).

I've attached the related Flarum log below in reference to this error.

flarum-2018-12-31.log

Note, that I'm using the default mail driver set during installation but as soon as I switch to the log driver, the error never pops up again.

Make sure you're using a Windows OS/VM or else you won't be able to reproduce this bug (doesn't happen on Linux distros or Mac OS as I have already tested on both).

Steps to Reproduce

  1. Assure that your Flarum->AdminCP->Mail->SMTP Server->Driver setting is set to mail
  2. Now, logout of your Flarum local session.
  3. Click the "Sign Up" link on the top right of the page.
  4. Enter random dummy user information.
  5. Click on the "Sign Up" button.
  6. An error should be thrown but the new test user will be registered.
  7. You can also double-check by clicking on the ""Sign Up button again or check your DB.

Expected Behavior
I should be able to register a new user without any errors being thrown all up in my face 馃暫

Screenshots
image

Environment

  • Flarum version: 0.1.0-beta.8.1
  • Website URL: localhost
  • Webserver: Apache
  • Hosting environment: Local
  • PHP version: 7.2.13
  • Browser: Google Chrome Version 71.0.3578.98 (Official Build) (64-bit)

Note: I've purposely disabled most of the bundled extensions just to test a few cases/theories.

Flarum core 0.1.0-beta.8.1
PHP version: 7.2.13
Loaded extensions: Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, readline, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, wddx, xmlreader, xmlwriter, openssl, curl, fileinfo, gd, get
text, gmp, intl, imap, ldap, mbstring, exif, mysqli, Phar, pdo_mysql, pdo_sqlite, soap, sockets, xmlrpc, xsl
+---------------------+-----------------+--------+
| Flarum Extensions   |                 |        |
+---------------------+-----------------+--------+
| ID                  | Version         | Commit |
+---------------------+-----------------+--------+
| flarum-lang-english | v0.1.0-beta.8   |        |
| flarum-mentions     | v0.1.0-beta.8.1 |        |
+---------------------+-----------------+--------+
Base URL: http://strangerbeta8point1.test
Installation path: C:\wamp64\www\strangerbeta8point1.test

Possible Solution

I assume this is stemming from Swiftmailer as a user confirmation email is typical sent after registration to confirm their account. That email never gets sent out because of this issue and error from Swiftmailer.

Additional Context
N/A

Most helpful comment

Yes.

Technically, this is incorrect configuration by the user - but the usability, especially error reporting, is quite bad, so we want to improve it.

Let's track this in #1169.

All 4 comments

This probably means that sendmail is not installed / can not be ofund on your system. Which makes sense, as it seems to be a Windows machine. Please use SMTP.

This also occurs when the mailing from address is not a valid email address, i.e. just noreply@.
Can't remember if that has been reported, though.

Yes.

Technically, this is incorrect configuration by the user - but the usability, especially error reporting, is quite bad, so we want to improve it.

Let's track this in #1169.

you can use for local https://mailtrap.io

you will have your own information to use it in flarum :
SMTP
Host: smtp.mailtrap.io
Port: 25 or 465 or 2525
Username: 19ed45454545146
Password: aafd45hjkc5c421
Auth: PLAIN, LOGIN and CRAM-MD5
TLS: Optional

Was this page helpful?
0 / 5 - 0 ratings