Trac version upgrade to V1.2 causes mail notification function to fail

26 views
Skip to first unread message

Mingxing Tian

unread,
Dec 16, 2016, 1:17:58 AM12/16/16
to Trac Users
I used the 1.0.13 version before the upgrade, where the mail notification service is normal, whenever the task status changes will be notified to the relevant colleagues. But after the upgrade, colleagues can not receive e-mail messages.

There is a strange phenomenon, the account will exist in the login will prompt, need to verify e-mail address. And colleagues can find their own mailbox verification code, so as to complete the e-mail address authentication. This also shows that a mailbox configuration should be successful.

To enable you to help me find a problem, I will log level down, the following record of a single task list to add a comment after the log, under normal circumstances should have to send mail notification action.

To facilitate query log files, I upload files through attachments.



User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Package版本
Trac1.2
Babel2.3.4
Genshi0.7 (without speedups)
GIT1.7.1
mod_wsgi3.2 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
MySQLserver: "5.5.49-log", client: "5.1.73", thread-safe: 1
MySQLdb1.2.3c1
Pygments2.1.3
Python2.6.6 (r266:84292, Jul 23 2015, 15:22:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]
pytz2016.4
setuptools30.2.0
Subversion1.6.11 (r934486)
Textile2.3.6
jQuery1.11.3
jQuery UI1.11.4
jQuery Timepicker1.5.5
trac.log

RjOllos

unread,
Dec 17, 2016, 10:39:06 PM12/17/16
to Trac Users


I don't see any notification-related activity in your log message. For comparison, here are the log messages seen when updating a ticket with the preference //Never notify: I update a ticket//.

19:23:21 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/ticket/32'">
19:23:21 Trac[main] DEBUG: Chosen handler is <Component trac.ticket.web_ui.TicketModule>
19:23:21 Trac[session] DEBUG: Retrieving session for ID u'user1'
19:23:21 Trac[main] DEBUG: Negotiated locale: None -> en_US
19:23:21 Trac[mail] INFO: Email address w/o domain: somebody
19:23:21 Trac[api] DEBUG: Ignoring (user1 [1]) for 'never' on rule (TicketUpdaterSubscriber) for (email)
19:23:21 Trac[web_ui] DEBUG: Side effect for ConfigurableTicketWorkflow
127.0.0.1 - - [17/Dec/2016 19:23:21] "POST /proj-1.1-2/ticket/32 HTTP/1.1" 303 -
19:23:21 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/ticket/32'">
19:23:21 Trac[main] DEBUG: Chosen handler is <Component trac.ticket.web_ui.TicketModule>
19:23:21 Trac[session] DEBUG: Retrieving session for ID u'user1'
19:23:21 Trac[main] DEBUG: Negotiated locale: None -> en_US

Do you have a Notification preferences tab at path /prefs/notification? If so, could you send a screen capture?


 

I'm assuming your [components] section is as described in (1), and your [notification] section is as described in (2). If different, please send.

(1) https://groups.google.com/d/msg/trac-users/4tVRBotYrZs/dh7pTH2yCAAJ
(2) https://groups.google.com/d/msg/trac-users/4tVRBotYrZs/qHeVNMnmCQAJ

- Ryan

Auto Generated Inline Image 1
Message has been deleted

Mingxing Tian

unread,
Dec 19, 2016, 1:47:44 AM12/19/16
to Trac Users


在 2016年12月18日星期日 UTC+8上午11:39:06,RjOllos写道:
I've found the problem because I didn't add the rules, I thought the default rule was ok, but by comparing your example, I finally found the reason. So, thank you very much. 

Mingxing Tian

unread,
Dec 19, 2016, 2:35:17 AM12/19/16
to Trac Users


在 2016年12月18日星期日 UTC+8上午11:39:06,RjOllos写道:

But I still find a problem, when the mail format select "text/html", there will be an exception thrown.

2016-12-19 15:31:38,858 Trac[mail] WARNING: EmailDistributor caught exception while formatting ticket to text/html for email: <class 'trachtmlnotification.notification.HtmlNotificationModule'>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/notification/mail.py", line 338, in distribute
    outputs[fmt] = formatter.format(transport, fmt, event)
  File "build/bdist.linux-x86_64/egg/trachtmlnotification/notification.py", line 77, in format
    req = self._create_request()
  File "build/bdist.linux-x86_64/egg/trachtmlnotification/notification.py", line 160, in _create_request
    req.session = FakeSession({'dateinfo': 'absolute'})
TypeError: __init__() takes exactly 1 argument (2 given)


 

Jun Omae

unread,
Dec 19, 2016, 2:50:02 AM12/19/16
to trac-...@googlegroups.com
On Mon, Dec 19, 2016 at 4:35 PM, Mingxing Tian <mx....@qq.com> wrote:
> But I still find a problem, when the mail format select "text/html", there will be an exception thrown.
>
> 2016-12-19 15:31:38,858 Trac[mail] WARNING: EmailDistributor caught exception while formatting ticket to text/html for email: <class 'trachtmlnotification.notification.HtmlNotificationModule'>
> Traceback (most recent call last):
> File "/usr/lib/python2.6/site-packages/trac/notification/mail.py", line 338, in distribute
> outputs[fmt] = formatter.format(transport, fmt, event)
> File "build/bdist.linux-x86_64/egg/trachtmlnotification/notification.py", line 77, in format
> req = self._create_request()
> File "build/bdist.linux-x86_64/egg/trachtmlnotification/notification.py", line 160, in _create_request
> req.session = FakeSession({'dateinfo': 'absolute'})
> TypeError: __init__() takes exactly 1 argument (2 given)

It seems that the issue occurs after https://trac.edgewall.org/changeset/15075.

I just fixed it now. Please reinstall the latest of
https://trac-hacks.org/svn/trachtmlnotificationplugin/0.12.

--
Jun Omae <jun...@gmail.com> (大前 潤)

Mingxing Tian

unread,
Dec 19, 2016, 3:31:15 AM12/19/16
to Trac Users


在 2016年12月19日星期一 UTC+8下午3:50:02,Jun Omae写道:
Just re installed this plugin, including the following questions, I think you have the same repair, thank you!

RjOllos

unread,
Dec 19, 2016, 11:45:14 AM12/19/16
to Trac Users


I see. You should have found the [notification-subscriber] section added after upgrade to Trac 1.2. More information on configuring it can be found here:
https://trac.edgewall.org/wiki/TracNotification#SubscriberConfiguration

- Ryan
Reply all
Reply to author
Forward
0 new messages