Bug 983150 - [abrt] exo-0.10.2-4.fc19: exo-compose-mail-1:98:<module>:TypeError: cannot concatenate 'str' and 'list' objects
Summary: [abrt] exo-0.10.2-4.fc19: exo-compose-mail-1:98:<module>:TypeError: cannot co...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: exo
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b74290055f5a7a88ec5ceba3195...
: 1174264 1177900 (view as bug list)
Depends On:
Blocks: 1171366
TreeView+ depends on / blocked
 
Reported: 2013-07-10 15:48 UTC by kianby
Modified: 2015-03-21 17:17 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1204396 (view as bug list)
Environment:
Last Closed: 2015-02-18 13:59:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.19 KB, text/plain)
2013-07-10 15:48 UTC, kianby
no flags Details
File: environ (3.08 KB, text/plain)
2013-07-10 15:48 UTC, kianby
no flags Details
strace output (919.43 KB, text/plain)
2013-09-28 23:30 UTC, Steven Stern
no flags Details
Patch to fix mailto parsing (721 bytes, patch)
2014-11-21 20:49 UTC, Ralph Bean
no flags Details | Diff

Description kianby 2013-07-10 15:48:35 UTC
Description of problem:
I have clicked on this link in Firefox: href="service?subject=Contact ICP DAS Sales Dept."

Version-Release number of selected component:
exo-0.10.2-4.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -tt /usr/lib64/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird service?subject=Contact%20ICP%20DAS%20Sales%20Dept.
core_backtrace: fe72697e06f8ec2173938c6a94b917dca5f42268 0x62 <module> /usr/lib64/xfce4/exo-1/exo-compose-mail-1 -
executable:     /usr/lib64/xfce4/exo-1/exo-compose-mail-1
kernel:         3.9.9-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
exo-compose-mail-1:98:<module>:TypeError: cannot concatenate 'str' and 'list' objects

Traceback (most recent call last):
  File "/usr/lib64/xfce4/exo-1/exo-compose-mail-1", line 98, in <module>
    command += ",subject='" + subject + "'"
TypeError: cannot concatenate 'str' and 'list' objects

Local variables in innermost frame:
parse_url: <function parse_url at 0x7fa03ac5ac80>
attachments: []
cc: []
subject: ['Contact ICP DAS Sales Dept.']
mailto: {'to': ['service'], 'subject': ['Contact ICP DAS Sales Dept.']}
binary: '/usr/bin/thunderbird'
style: 'mozilla-remote'
urllib: <module 'urllib' from '/usr/lib64/python2.7/urllib.pyc'>
__package__: None
to: ['service']
raw_mailto: 'service?subject=Contact%20ICP%20DAS%20Sales%20Dept.'
command: "xfeDoCommand(composeMessage,to='service',cc='',bcc='',attachment=''"
__doc__: None
body: ''
__builtins__: <module '__builtin__' (built-in)>
__file__: '/usr/lib64/xfce4/exo-1/exo-compose-mail-1'
args: []
sys: <module 'sys' (built-in)>
__name__: '__main__'
bcc: []
urlparse: <module 'urlparse' from '/usr/lib64/python2.7/urlparse.pyc'>
posix: <module 'posix' (built-in)>
os: <module 'os' from '/usr/lib64/python2.7/os.pyc'>

Comment 1 kianby 2013-07-10 15:48:40 UTC
Created attachment 771723 [details]
File: backtrace

Comment 2 kianby 2013-07-10 15:48:44 UTC
Created attachment 771724 [details]
File: environ

Comment 3 Kevin Fenzi 2013-07-10 16:59:22 UTC
Can you update to this scratch build version: 

http://koji.fedoraproject.org/koji/taskinfo?taskID=5592330

and retry the same link? 

Thanks!

Comment 4 kianby 2013-07-11 07:43:08 UTC
Hi, 

I have updated exo to version 0.10.2-6.fc19 but I get the same error: exo-compose-mail-1:98: <module>:TypeError: cannot concatenate 'str' and 'list' objects. 

Let me know if I can do additional tests.

Comment 5 Kevin Fenzi 2013-07-11 15:35:06 UTC
Oops. My fault. The patch wasn't applied right. ;( 

Can you get this one: 

http://koji.fedoraproject.org/koji/taskinfo?taskID=5594799

and then 'yum reinstall' it or 'yum downgrade' and then 'yum upgrade' it and retest?

Sorry for the trouble.

Comment 6 kianby 2013-07-11 15:59:25 UTC
It works! Good job. 

Thx

Comment 7 Steven Stern 2013-09-19 15:43:52 UTC
Got exo crash when clicking on a mailto link in Chrome under XFCE.

Comment 8 Kevin Fenzi 2013-09-19 15:55:24 UTC
(In reply to Steven Stern from comment #7)
> Got exo crash when clicking on a mailto link in Chrome under XFCE.

Was it this same crash? What fedora version? What exo version?

Comment 9 Steven Stern 2013-09-19 15:58:22 UTC
exo-0.10.2-5.fc19.x86_64

Fedora 19

google-chrome-stable-29.0.1547.76-223446.x86_64

from the command line while Thunderbird is already running

$ exo-open --launch MailReader

(process:5511): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

Comment 10 Kevin Fenzi 2013-09-19 16:39:44 UTC
And the mail reader doesn't open?

Does the exo-open command return?

Comment 11 Steven Stern 2013-09-19 16:46:26 UTC
From the command line, it will start Thunderbird. I got here because ABRT popped when I clicked on a mailto link in Chrome. For reasons unknown, mailto links in Chrome do not work for me under XFCE, but do work under Gnome.

Comment 12 Kevin Fenzi 2013-09-19 21:22:12 UTC
Can you run chrome from a terminal, click on a mailto link and provide the output back from the terminal?

Comment 13 Steven Stern 2013-09-19 22:39:45 UTC
$ google-chrome
[10761:10761:0919/173551:ERROR:profile_sync_service.cc(1242)] History Delete Directives, Sync Error: Delete directives not supported with encryption.
[7:34:0919/173553:ERROR:platform_thread_linux.cc(99)] Failed to set nice value of thread to -10
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[10910:10910:0919/173601:ERROR:sandbox_linux.cc(130)] InitializeSandbox() called with multiple threads in process gpu-process

(process:10935): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

(process:10969): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components

(process:11017): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components

(process:11061): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

(process:11110): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components

(process:11157): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components

(process:11204): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components

(process:11248): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

When I keep clicking the link, I get the warning open -- "Thunderbird is already running, but is not responding."  However, it appears that it's not.

$ ps -ef |grep bird
sdstern  11304 10728  0 17:36 pts/0    00:00:00 grep --color=auto bird

Comment 14 Kevin Fenzi 2013-09-21 20:36:11 UTC
What does 'xdg-email foo' do from a terminal?

Comment 15 Steven Stern 2013-09-21 20:38:35 UTC
With Thunderbird closed:

$ xdg-email foo
[sdstern@sds-desk-2 ~]$ 
(process:9897): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components


But no Thunderbird window opens.

Comment 16 Kevin Fenzi 2013-09-21 20:49:11 UTC
ok. Try: 

/usr/lib*/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo

Does that work?

Comment 17 Steven Stern 2013-09-22 14:33:08 UTC
$ /usr/lib*/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo

(process:21355): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

and nothing happens

Comment 18 Kevin Fenzi 2013-09-28 16:49:15 UTC
ok, can you do: 

yum install strace

strace -f -o /tmp/trace.out /usr/lib*/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo

and then attach the /tmp/trace.out file here?

Comment 19 Steven Stern 2013-09-28 23:30:09 UTC
Created attachment 804563 [details]
strace output

strace output

strace -f -o /tmp/trace.out /usr/lib*/xfce4/exo-1/exo-compose-mail-1
mozilla-remote /usr/bin/thunderbird foo

Comment 20 Kevin Fenzi 2013-09-29 17:55:32 UTC
Can you do: 

G_SLICE=always-malloc
/usr/lib*/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo

and see if it works?

Comment 21 Steven Stern 2013-09-29 18:23:03 UTC
[sdstern@sds-desk-2 ~]$ set |grep -i slice
G_SLICE=always-malloc
[sdstern@sds-desk-2 ~]$ /usr/lib*/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo

(process:8669): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
enigmail.js: Registered components
[sdstern@sds-desk-2 ~]$ ps -ef |grep bird
sdstern   8701  8608  0 13:22 pts/0    00:00:00 grep --color=auto bird

Comment 22 Kevin Fenzi 2013-09-29 19:31:08 UTC
ok, digging around I think this is really bug 986558

ie, a glib2/thunderbird issue and not anything to do with exo. 

I guess we can confirm that by you running: 

/usr/lib64/xfce4/exo-1/exo-compose-mail-1 sylpheed /usr/bin/claws-mail foo

(you would have to install claws-mail first) and if that brings up claws-mail correctly, I think this is the above bug.

Comment 23 Steven Stern 2013-09-29 20:09:34 UTC
claws-mail opens correctly

Comment 24 jamie 2013-11-01 13:57:27 UTC
Also getting this in Ferdora Core 18.

Comment 25 jamie 2013-11-01 14:03:32 UTC
Ok I tried to add myself to the mail list and seem too have taken everyone else off the list, I don't know how to fix this and I diden't know that was possibe. I am very sorry.

Comment 26 jamie 2013-11-01 14:04:14 UTC
Someone else seems too have fixed it. Thank you.

Comment 27 Cristian Ciupitu 2014-02-09 22:36:03 UTC
According to ABRT, this bug happened to me with exo-0.10.2-6.fc20 when I wanted to send an email from Firefox (it probably launched my default email client).

Comment 28 João Carlos Mendes Luís 2014-08-22 16:28:32 UTC
Just happened to me, repeatable every time, clicking in "Document as E-Mail" button in LibreOffice Calc.

In my case, I can also repeat from command line:

/usr/bin/python -tt /usr/lib64/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird 'mailto:?subject=motd&attachment=file:///etc/motd'
Traceback (most recent call last):
  File "/usr/lib64/xfce4/exo-1/exo-compose-mail-1", line 98, in <module>
    command += ",subject='" + subject + "'"
TypeError: cannot concatenate 'str' and 'list' objects


I did change the code to peek at the "subject" variable at line 98, and indeed, it is a list.  Im my case, prettyprint shows:

['motd']

BTW: I'm using exo-0.10.2-6.fc20.x86_64 as it is the lastest from fc20 stable repos.

Comment 29 Ralph Bean 2014-11-21 20:49:23 UTC
Created attachment 959966 [details]
Patch to fix mailto parsing

Comment 30 Ralph Bean 2014-11-21 20:50:22 UTC
For that /usr/lib64/xfce4/exo-1/exo-compose-mail-1 script, it looks like if no subject is passed in the mailto string, it will work as written but if someone specifies a subject, they'll hit the traceback.  The patch attached above should hopefully fix it.

Comment 31 Kevin Fenzi 2014-11-21 20:59:59 UTC
If you could try this out and see if it works, I can push an updated package. Thanks!

Comment 32 Ralf Corsepius 2014-12-14 12:47:54 UTC
(In reply to Kevin Fenzi from comment #31)
> If you could try this out and see if it works, I can push an updated
> package. Thanks!
The patch attached to #29 does not work for me, nor does it help wrt. BZ#1171366

Reproducer:
# /usr/lib64/xfce4/exo-1/exo-helper-1 --launch MailReader \
 "mailto:root@localhost?subject=test&body=foo"

Replacing mailtoparse.py with the original upstream perl implementation seems to fix at least BZ#1171366.

Comment 33 Pierre-YvesChibon 2014-12-15 15:26:18 UTC
$ python mailtoparse.py mozilla-remote /usr/bin/thunderbird 'mailto:?subject=motd&attachment=file:///etc/motd'
['motd']
motd
Traceback (most recent call last):
  File "mailtoparse.py", line 174, in <module>
    posix.execv(binary,args)
OSError: [Errno 2] No such file or directory


So the patch from #29 seems to fix the original problem with the subject (I don't have thunderbird installed so the error is expected).


> Reproducer:
> # /usr/lib64/xfce4/exo-1/exo-helper-1 --launch MailReader \
>  "mailto:root@localhost?subject=test&body=foo"

You are providing a reproducer with exo-helper-1 while the rest of the bug mentions exo-compose-mail-1.

Could you maybe provide the full traceback?

Comment 34 Kevin Fenzi 2014-12-15 15:31:31 UTC
*** Bug 1174264 has been marked as a duplicate of this bug. ***

Comment 35 Ralf Corsepius 2014-12-15 16:18:07 UTC
(In reply to Pierre-YvesChibon from comment #33)

> So the patch from #29 seems to fix the original problem with the subject (I
> don't have thunderbird installed so the error is expected).
My mailer is set to "Mozilla Thunderbird".

> > Reproducer:
> > # /usr/lib64/xfce4/exo-1/exo-helper-1 --launch MailReader \
> >  "mailto:root@localhost?subject=test&body=foo"
> 
> You are providing a reproducer with exo-helper-1 while the rest of the bug
> mentions exo-compose-mail-1.
Just "yum install thunderbird" and set 
Settings->Perferred Application to "Mozilla Thunderbird" in an xfce desktop.

> Could you maybe provide the full traceback?
No. The actual trace underneath of BZ#1171366 is a long series of calls to various sh-scripts, python-scripts and binary executable.

It ends up with the a call like the one mentioned above.

Comment 36 Kevin Fenzi 2014-12-15 16:25:20 UTC
Here I get: 

"(process:13295): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed"

and thunderbird doesn't start. However, I don't see how thats the scripts fault, it's launching thunderbird, which exits with that error. 

Are you 100% sure you have the patch from comment 29 applied?

Comment 37 Ralf Corsepius 2014-12-15 16:36:13 UTC
(In reply to Kevin Fenzi from comment #36)
> Are you 100% sure you have the patch from comment 29 applied?
No, I am not, but I am 100% sure Red Hat's (IMO, silly, religiously motivated) mailtoparse.py is the cause, because the perl implementation works perfectly.

Anyway, I can try again, but this will take some time, likely not before tomorrow).

Comment 38 Kevin Fenzi 2014-12-15 17:18:12 UTC
(In reply to Ralf Corsepius from comment #37)
> (In reply to Kevin Fenzi from comment #36)
> > Are you 100% sure you have the patch from comment 29 applied?
> No, I am not, but I am 100% sure Red Hat's (IMO, silly, religiously
> motivated) mailtoparse.py is the cause, because the perl implementation
> works perfectly.

To be clear, the motivation for re-writing this handler in python instead of perl was simply because it was the very last thing in the entire Xfce stack that needed perl. This allowed us to remove perl from the Xfce livecd and save a ton of space. There was no religion involved. 

> Anyway, I can try again, but this will take some time, likely not before
> tomorrow).

ok. Any more data welcome from folks seeing this. 

It sounds to me like this patch works but at least hear exposes a bug in thunderbird.

Comment 39 Ralf Corsepius 2014-12-15 17:34:47 UTC
(In reply to Kevin Fenzi from comment #38)
> (In reply to Ralf Corsepius from comment #37)
> > (In reply to Kevin Fenzi from comment #36)
> > > Are you 100% sure you have the patch from comment 29 applied?
> > No, I am not, but I am 100% sure Red Hat's (IMO, silly, religiously
> > motivated) mailtoparse.py is the cause, because the perl implementation
> > works perfectly.
> 
> To be clear, the motivation for re-writing this handler in python instead of
> perl was simply because it was the very last thing in the entire Xfce stack
> that needed perl. This allowed us to remove perl from the Xfce livecd and
> save a ton of space. There was no religion involved. 
OK, if you say so. I was suspecting these breakdowns to be caused by Red Hat's infamous religious crusade against Perl.

> > Anyway, I can try again, but this will take some time, likely not before
> > tomorrow).
> 
> ok. Any more data welcome from folks seeing this. 
I just spent some time on this.

> It sounds to me like this patch works but at least hear exposes a bug in
> thunderbird.
No, it apparently is mailtoparse.py and the perl implementation are incompatible:

stracing this:
/usr/lib64/xfce4/exo-1/exo-helper-1 --launch MailReader "mailto:root@localhost?subject=test&body=foo"


With fedora's exo package:
...
exo.python.txt:10092 execve("/usr/lib64/thunderbird/thunderbird", ["/usr/lib64/thunderbird/thunderbird", "xfeDoCommand(composeMessage,to='root@localhost',cc='',bcc='',attachment='',subject='test',body='foo')"], [/* 57 vars */]) = 0
...

With the original perl implementation:
...
exo.perl.txt:10204 execve("/usr/lib64/thunderbird/thunderbird", ["/usr/lib64/thunderbird/thunderbird", "-compose", "to='root@localhost',cc='',attachment='',subject='test',body='foo'"], [/* 57 vars */]) = 0
...

Note the "xfeDoCommand" ...

I saw some patches in openSUSE-13.2's exo package which I do not understand, but I'd suspect to be related to this ;)

Comment 40 Pierre-YvesChibon 2014-12-15 17:38:29 UTC
The difference is between the type mozilla and mozilla-remote.

I'm pretty sure it would work if you were using mozilla while you are apparently using mozilla-remote.

That being said, I do not know how the type is set as it is provided to mailtoparser.py

Comment 41 Ralf Corsepius 2014-12-15 18:04:40 UTC
Forgot to mention, the fedora-strace from comment #39 was with the patch from comment #29 applied.

(In reply to Pierre-YvesChibon from comment #40)
> The difference is between the type mozilla and mozilla-remote.
> 
> I'm pretty sure it would work if you were using mozilla while you are
> apparently using mozilla-remote.
It's not me who is deliberately choosing/using mozilla-remote, it's being chosen elsewhere.

Comment 42 Kevin Fenzi 2014-12-29 19:12:02 UTC
I think the problem may be that thunderbird (and the various other mozilla apps) have removed the -remote options (including the xfeDocommand stuff). 

Can you try: 

- edit /usr/share/xfce4/helpers/thunderbird.desktop
- Change the last line from: 
X-XFCE-CommandsWithParameter=/usr/lib64/xfce4/exo-1/exo-compose-mail-1 mozilla-remote %B "mailto:%s";/usr/lib64/xfce4/exo-1/exo-compose-mail-1 mozilla %B "mailto:%s";
to
X-XFCE-CommandsWithParameter=/usr/lib64/xfce4/exo-1/exo-compose-mail-1 mozilla %B "mailto:%s";

and see if the behavior changes back to working?

Comment 43 Kevin Fenzi 2014-12-31 17:30:34 UTC
*** Bug 1177900 has been marked as a duplicate of this bug. ***

Comment 44 Fedora End Of Life 2015-01-09 22:11:42 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 45 Fedora End Of Life 2015-02-18 13:59:27 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 46 mickey mouse 2015-03-21 15:57:42 UTC
Another user experienced a similar problem:

Tried to send an email from within a wine application.

Reproducible with command line
/usr/bin/python -tt /usr/lib/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird 'foo?subject=Email%20Subject&cc=&bcc=&body=Body%20of%20the%20email'

reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -tt /usr/lib/xfce4/exo-1/exo-compose-mail-1 mozilla-remote /usr/bin/thunderbird foo?subject=Email%20Subject&cc=&bcc=&body=Body%20of%20the%20email
executable:     /usr/lib/xfce4/exo-1/exo-compose-mail-1
kernel:         3.19.1-201.fc21.i686+PAE
package:        exo-0.10.2-9.fc21
reason:         exo-compose-mail-1:98:<module>:TypeError: cannot concatenate 'str' and 'list' objects
runlevel:       N 5
type:           Python
uid:            1000

Comment 47 mickey mouse 2015-03-21 17:17:45 UTC
(In reply to Kevin Fenzi from comment #42)
> I think the problem may be that thunderbird (and the various other mozilla
> apps) have removed the -remote options (including the xfeDocommand stuff). 
> 
> Can you try: 
> 
> - edit /usr/share/xfce4/helpers/thunderbird.desktop
> - Change the last line from: 
> X-XFCE-CommandsWithParameter=/usr/lib64/xfce4/exo-1/exo-compose-mail-1
> mozilla-remote %B "mailto:%s";/usr/lib64/xfce4/exo-1/exo-compose-mail-1
> mozilla %B "mailto:%s";
> to
> X-XFCE-CommandsWithParameter=/usr/lib64/xfce4/exo-1/exo-compose-mail-1
> mozilla %B "mailto:%s";
> 
> and see if the behavior changes back to working?

I have tried your solution but no luck. I have created a duplicate of this bug at #1204396.


Note You need to log in before you can comment on or make changes to this bug.