SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Debugging email
- This topic has 35 replies, 4 voices, and was last updated 1 year, 8 months ago by ramanc51.
-
AuthorPosts
-
September 24, 2019 at 1:16 pm #580ppmtParticipant
Hello,
I am having issue with sending email and would like to know what I should do to get some logs?Any log or setting that would give more info?
The email config that I use is working on my “live” box but not on the the testing one. All I get is a grey screen after I press send!
September 24, 2019 at 1:30 pm #581RRowleyParticipantTurns out to have been fixed in the master_2019.2.1_beta version. Maybe an incentive to update???
September 25, 2019 at 1:47 am #582ppmtParticipantI have downloaded the master_2019.2.1 and when I load it tells me to update the database. When I do it after a few second I get this error:
SqlPatchManager::runSqlPatch() error. See error log for more information.
in php.log I see this:
/var/www/html/tmp/log # cat php.log [25-Sep-2019 09:42:39 Europe/London] PdoDb - debugger(): ALTER TABLE <code>si_invoice_item_attachments</code> DROP INDEX <code>id</code>;ALTER TABLE <code>si_products_attributes</code> MODIFY <code>type_id</code> INT(11) UNSIGNED NULL; [25-Sep-2019 09:42:39 Europe/London] PdoDb - query(): Execute error.Array ( [0] => 42000 [1] => 1091 [2] => Can't DROP INDEX <code>id</code>; check that it exists ) [25-Sep-2019 09:42:39 Europe/London] PdoDb - backtrace: Array ( [0] => Array ( [file] => /var/www/html/Inc/Claz/SqlPatchManager.php [line] => 241 [function] => query [class] => Inc\Claz\PdoDb [object] => Inc\Claz\PdoDb Object ( [caseStmts:Inc\Claz\PdoDb:private] => [debug:Inc\Claz\PdoDb:private] => [debug_label:Inc\Claz\PdoDb:private] => [debug_microtime:Inc\Claz\PdoDb:private] => 0 [distinct:Inc\Claz\PdoDb:private] => [excludedFields:Inc\Claz\PdoDb:private] => Array ( ) [fauxPost:Inc\Claz\PdoDb:private] => [fieldPrefix:Inc\Claz\PdoDb:private] => [functions:Inc\Claz\PdoDb:private] => [groupBy:Inc\Claz\PdoDb:private] => [havings:Inc\Claz\PdoDb:private] => [joinStmts:Inc\Claz\PdoDb:private] => [keyPairs:Inc\Claz\PdoDb:private] => [lastCommand:Inc\Claz\PdoDb:private] => [limit:Inc\Claz\PdoDb:private] => 0 [noErrorLog:Inc\Claz\PdoDb:private] => [onDuplicateKey:Inc\Claz\PdoDb:private] => [orderBy:Inc\Claz\PdoDb:private] => [pdoDb:Inc\Claz\PdoDb:private] => PDO Object ( ) [pdoDb2:Inc\Claz\PdoDb:private] => PDO Object ( ) [saveLastCommand:Inc\Claz\PdoDb:private] => [selectAll:Inc\Claz\PdoDb:private] => [selectList:Inc\Claz\PdoDb:private] => [selectStmts:Inc\Claz\PdoDb:private] => [table_columns:Inc\Claz\PdoDb:private] => [table_constraints:Inc\Claz\PdoDb:private] => [table_engine:Inc\Claz\PdoDb:private] => InnoDB [table_schema:Inc\Claz\PdoDb:private] => fear_invoices [transaction:Inc\Claz\PdoDb:private] => 1 [usePost:Inc\Claz\PdoDb:private] => 1 [whereClause:Inc\Claz\PdoDb:private] => ) [type] => -> [args] => Array ( [0] => ALTER TABLE <code>si_invoice_item_attachments</code> DROP INDEX <code>id</code>;ALTER TABLE <code>si_products_attributes</code> MODIFY <code>type_id</code> INT(11) UNSIGNED NULL; ) ) [1] => Array ( [file] => /var/www/html/Inc/Claz/SqlPatchManager.php [line] => 314 [function] => runSqlPatch [class] => Inc\Claz\SqlPatchManager [type] => :: [args] => Array ( [0] => 308 [1] => Array ( [name] => Remove dup id key from invoice_item_attachments and fix products_attributes type_id data type [patch] => ALTER TABLE <code>si_invoice_item_attachments</code> DROP INDEX <code>id</code>;ALTER TABLE <code>si_products_attributes</code> MODIFY <code>type_id</code> INT(11) UNSIGNED NULL; [date] => 20190329 [source] => fearless359 ) ) ) [2] => Array ( [file] => /var/www/html/index.php [line] => 183 [function] => runPatches [class] => Inc\Claz\SqlPatchManager [type] => :: [args] => Array ( ) ) ) [25-Sep-2019 09:42:39 Europe/London] SqlPatchManager::runSqlPatch() - PdoDb - query(): Execute error. See error_log.
Whis other logs should I be looking at? si.log is empty
September 25, 2019 at 3:48 am #583RRowleyParticipantFound error that prevented new table from being created. Restore your DB to what it was prior to loading this update, download new version of SI from github and run update process again. Let me know how this works for you.
September 25, 2019 at 10:24 am #584ppmtParticipantOk. I managed to install the lastest version after a bit of timeout issue. Not sure if it is because my test machine is a bit slow but during the database upgrade I had a 504 Gateway timeout.
After reload the page I still wanted to apply the last patch (the one about the foreign key)
Eventually it worked so I could test sending email…and it still fails…I get the following message
Both pdf_string and pdf_file_name must be set or left empty
September 25, 2019 at 11:01 am #585ppmtParticipantMy bad the error above was because I forgot to copy my invoices template.
After that the error above is gone but I am back to the grey screen!
September 25, 2019 at 12:26 pm #586RRowleyParticipantNeed more info about what the “grey screen” is. Is this after selecting the email option for an invoice? Or after submitting the email for mailing? Is any error shown in the error log? What does the browser address line show?
September 26, 2019 at 2:56 am #589ppmtParticipantHere is what I do:
I click the email icon on the invoice and I get redirected to that url:
http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=1&id=1I fill in the content box and when I press Email I eventually after a some seconds get redirected to that url:
http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=2&id=1Here is the access.log from nginx.
192.168.1.100 - - [26/Sep/2019:09:51:32 +0000] "GET /index.php?module=invoices&view=email&stage=1&id=1 HTTP/1.1" 200 14257 "http://192.168.1.83:8000/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0" "-" 192.168.1.100 - - [26/Sep/2019:09:51:32 +0000] "GET /images/common/required-small.png HTTP/1.1" 200 1676 "http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=1&id=1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0" "-" 192.168.1.100 - - [26/Sep/2019:09:51:32 +0000] "GET /images/common/help-small.png HTTP/1.1" 200 1193 "http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=1&id=1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0" "-" 192.168.1.100 - - [26/Sep/2019:09:51:32 +0000] "GET /images/common/tick.png HTTP/1.1" 200 537 "http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=1&id=1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0" "-" <this is where I press Email> 172.29.0.1 - - [26/Sep/2019:09:53:40 +0000] "GET /templates/invoices/default/style.css HTTP/1.0" 200 1009 "-" "-" "-" 172.29.0.1 - - [26/Sep/2019:09:53:40 +0000] "GET /templates/invoices/logos/_default_blank_logo.png HTTP/1.0" 200 168 "-" "-" "-" 172.29.0.1 - - [26/Sep/2019:09:53:40 +0000] "GET /templates/invoices/logos/_default_blank_logo.png HTTP/1.0" 200 168 "-" "-" "-" <about 10 to 20 second delay before I get redirected to the url below with a empty grey screen> 192.168.1.100 - - [26/Sep/2019:09:54:11 +0000] "POST /index.php?module=invoices&view=email&stage=2&id=1 HTTP/1.1" 200 6097 "http://192.168.1.83:8000/index.php?module=invoices&view=email&stage=1&id=1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0" "-"
Nothing in error.log nor the php.log.
September 26, 2019 at 8:43 am #590RRowleyParticipantSounds to me like your attempt to send the email timed out. Make sure the email information in the custom.config.php file is correctly filled out. Make sure the vendor directory is current with what is in github for the project. You can also use the command window to run “composer update” from the SI directory.
Also, in the custom.config.php file, you can set the zend.logger_level to DEBUG and create a logging trail in the tmp/log/si.log file.
September 26, 2019 at 10:10 am #607ppmtParticipantI am not sure how to run the composer command as I can’t find any command like that in the SI directory.
I attached an si.log extract as for some reason I can’t paste it in he message itself.
PS: ignore the si_extract.log file. It’s the same as the txt one
Attachments:
September 26, 2019 at 10:40 am #612ppmtParticipantOk I have made some progress. I decided to install the master2010_2 version on the “production” machine.
I created a new database so I can start from scratch. During the database installation I have a 504 Gateway timeout but pressing reload allowed me to continue.
I then tested sending an email with my “production” version of SI and it worked well.
When I used the master2019_2 version then I ended with the same grey screen but this time there was a message printed. I edited the smtp host.
So there is a timeout but I am not sure why since it works for the production version.
Fatal error: Uncaught Swift_IoException: Connection to my_smtp_host:290 Timed Out in /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:166 Stack trace: #0 /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(467): Swift_Transport_StreamBuffer->readLine(0) #1 /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(358): Swift_Transport_AbstractSmtpTransport->getFullResponse(0) #2 /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(147): Swift_Transport_AbstractSmtpTransport->readGreeting() #3 /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start() #4 /var/www/simpleinvoices/simpleinvoi in /var/www/simpleinvoices/simpleinvoices-master_2019.2/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php on line 473
September 26, 2019 at 3:44 pm #613RRowleyParticipantSomething I should have asked before, what version of PHP are you on?
September 26, 2019 at 11:13 pm #614ppmtParticipantOn the production machine
PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.19-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies
and on the test machine
PHP 7.3.9 (cli) (built: Sep 12 2019 10:15:36) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
September 27, 2019 at 2:50 am #615RRowleyParticipantHave you verified the email settings in your config/custom.config.php file? Below is an example of what needs to be set. Your settings will likely vary and should be provided by your email provider.
email.host = <myemailhostname>
email.smtp_auth = true
email.username = <myusername>
email.password = ‘<mypassword>‘
email.smtpport = 26
email.secure = TLS
email.ack = false
email.use_local_sendmail = false- This reply was modified 5 years ago by RRowley.
September 27, 2019 at 5:07 am #617ppmtParticipantI have set up the section as per my host. The setting are the same as on the working machine running the old version of SI
email.host = sv4.byethost4.org
email.smtp_auth = true
email.username = myemail@mydomain.com
email.password = mypassword
email.smtpport = 290
email.secure = SSL
email.ack = false
email.use_local_sendmail = false -
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments