<h2 dir="auto">Checklist</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.1.0 (latentcall) kombu:4.1.0 py:3.6.3
            billiard:3.5.0.3 py-amqp:2.2.2
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:rpc:///

BROKER_URL: 'amqp://guest:********@rabbit:5672//'
CELERYD_PREFETCH_MULTIPLIER: 10
CELERY_ENABLE_UTC: True
CELERY_QUEUES: [&lt;unbound Queue high-pri -&gt; &lt;unbound Exchange ''(direct)&gt; -&gt; high-pri.#&gt;,
 &lt;unbound Queue low-pri -&gt; &lt;unbound Exchange ''(direct)&gt; -&gt; low-pri.#&gt;]
CELERY_RESULT_BACKEND: 'rpc:///'
CELERY_RESULT_SERIALIZER: 'json'
CELERY_TASK_SERIALIZER: 'json'
CELERY_TIMEZONE: None
CELERY_WORKER_DIRECT: True
Queue: &lt;class 'kombu.entity.Queue'&gt;
os: &lt;module 'os' from '/usr/local/lib/python3.6/os.py'&gt;"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.1.0 (latentcall) kombu:4.1.0 py:3.6.3
            billiard:3.5.0.3 py-amqp:2.2.2
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:rpc:///

BROKER_URL: 'amqp://guest:********@rabbit:5672//'
CELERYD_PREFETCH_MULTIPLIER: 10
CELERY_ENABLE_UTC: True
CELERY_QUEUES: [&lt;unbound Queue high-pri -&gt; &lt;unbound Exchange ''(direct)&gt; -&gt; high-pri.#&gt;,
 &lt;unbound Queue low-pri -&gt; &lt;unbound Exchange ''(direct)&gt; -&gt; low-pri.#&gt;]
CELERY_RESULT_BACKEND: 'rpc:///'
CELERY_RESULT_SERIALIZER: 'json'
CELERY_TASK_SERIALIZER: 'json'
CELERY_TIMEZONE: None
CELERY_WORKER_DIRECT: True
Queue: &lt;class 'kombu.entity.Queue'&gt;
os: &lt;module 'os' from '/usr/local/lib/python3.6/os.py'&gt;
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
</ul>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">Here is a minimal test to reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from celery import Celery, group
app = Celery('tasks')

@app.task
def pre():
  print('in pre')
  return 30

@app.task
def post1(arg1=None):
  print('arg1={}'.format(arg1))
  return arg1 + 1e1

@app.task
def post2(arg2=None):
  print('arg2={}'.format(arg2))
  return arg2 + 1e2

@app.task
def post3(arg3=None):
  print('arg3={}'.format(arg3))
  return arg3 + 1e3

@app.task
def post4(arg4=None):
  print('arg4={}'.format(arg4))
  return arg4 + 1e4

def wf():
  return pre.s() | group([post1.s(), post2.s() | group([post3.s(), post4.s()])])"><pre class="notranslate"><code class="notranslate">from celery import Celery, group
app = Celery('tasks')

@app.task
def pre():
  print('in pre')
  return 30

@app.task
def post1(arg1=None):
  print('arg1={}'.format(arg1))
  return arg1 + 1e1

@app.task
def post2(arg2=None):
  print('arg2={}'.format(arg2))
  return arg2 + 1e2

@app.task
def post3(arg3=None):
  print('arg3={}'.format(arg3))
  return arg3 + 1e3

@app.task
def post4(arg4=None):
  print('arg4={}'.format(arg4))
  return arg4 + 1e4

def wf():
  return pre.s() | group([post1.s(), post2.s() | group([post3.s(), post4.s()])])
</code></pre></div>
<p dir="auto">Run <code class="notranslate">wf().apply_async()</code></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto"><code class="notranslate">post2</code> receives the arguments from <code class="notranslate">pre.s()</code>.</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto"><code class="notranslate">post2</code> receives no arguments</p>
<p dir="auto">In the <a href="http://docs.celeryproject.org/en/latest/userguide/canvas.html#the-primitives" rel="nofollow">Documentations</a> says:</p>
<blockquote>
<p dir="auto">Groups and chords accepts partial arguments too, so in a chain the return value of the previous task is forwarded to all tasks in the group...</p>
</blockquote>
<p dir="auto">but it doesn't if group contain chain.</p>
<p dir="auto"><strong>Steps to reproduce</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ct.py
from __future__ import absolute_import, unicode_literals
from celery import Celery

app = Celery(
    'ct',
    broker='amqp://guest@localhost//',
    backend='cache+memcached://127.0.0.1:11211/'
)

@app.task
def inc(x):
   x += 1
   return x

@app.task
def nothing(x):
   return x

if __name__ == '__main__':
    app.start()"><pre class="notranslate"><code class="notranslate"># ct.py
from __future__ import absolute_import, unicode_literals
from celery import Celery

app = Celery(
    'ct',
    broker='amqp://guest@localhost//',
    backend='cache+memcached://127.0.0.1:11211/'
)

@app.task
def inc(x):
   x += 1
   return x

@app.task
def nothing(x):
   return x

if __name__ == '__main__':
    app.start()
</code></pre></div>
<p dir="auto">Start worker:<br>
<code class="notranslate">python ct.py worker -l info</code></p>
<p dir="auto">In python console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from ct import inc, nothing
&gt;&gt;&gt; from celery import group, chain
&gt;&gt;&gt; t = chain(inc.s(),group(chain(nothing.s(), inc.s()), inc.s()))
&gt;&gt;&gt; r = t.delay(0)
&gt;&gt;&gt; "><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; from ct import inc, nothing
&gt;&gt;&gt; from celery import group, chain
&gt;&gt;&gt; t = chain(inc.s(),group(chain(nothing.s(), inc.s()), inc.s()))
&gt;&gt;&gt; r = t.delay(0)
&gt;&gt;&gt; 
</code></pre></div>
<p dir="auto">In <code class="notranslate">celery</code> log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2017-04-10 12:43:36,126: INFO/MainProcess] Received task: ct.inc[5c1beeff-d785-4d81-af2c-35a5bba839ab]  
[2017-04-10 12:43:37,257: WARNING/PoolWorker-1] /home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py:542: RuntimeWarning: Exception raised outside body: TypeError('nothing() takes exactly 1 argument (0 given)',):
Traceback (most recent call last):
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py&quot;, line 424, in trace_task
    parent_id=uuid, root_id=root_id,
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 987, in apply_async
    args=args, kwargs=kwargs, **options))
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 1063, in _apply_tasks
    **options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 567, in apply_async
    dict(self.options, **options) if options else self.options))
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 597, in run
    first_task.apply_async(**options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 221, in apply_async
    return _apply(args, kwargs, **options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/task.py&quot;, line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
TypeError: nothing() takes exactly 1 argument (0 given)

  exc, exc_info.traceback)))
[2017-04-10 12:43:37,262: ERROR/PoolWorker-1] Task ct.inc[5c1beeff-d785-4d81-af2c-35a5bba839ab] raised unexpected: TypeError('nothing() takes exactly 1 argument (0 given)',)
Traceback (most recent call last):
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py&quot;, line 424, in trace_task
    parent_id=uuid, root_id=root_id,
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 987, in apply_async
    args=args, kwargs=kwargs, **options))
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 1063, in _apply_tasks
    **options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 567, in apply_async
    dict(self.options, **options) if options else self.options))
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 597, in run
    first_task.apply_async(**options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py&quot;, line 221, in apply_async
    return _apply(args, kwargs, **options)
  File &quot;/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/task.py&quot;, line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
TypeError: nothing() takes exactly 1 argument (0 given)"><pre class="notranslate"><code class="notranslate">[2017-04-10 12:43:36,126: INFO/MainProcess] Received task: ct.inc[5c1beeff-d785-4d81-af2c-35a5bba839ab]  
[2017-04-10 12:43:37,257: WARNING/PoolWorker-1] /home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py:542: RuntimeWarning: Exception raised outside body: TypeError('nothing() takes exactly 1 argument (0 given)',):
Traceback (most recent call last):
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py", line 424, in trace_task
    parent_id=uuid, root_id=root_id,
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 987, in apply_async
    args=args, kwargs=kwargs, **options))
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 1063, in _apply_tasks
    **options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 567, in apply_async
    dict(self.options, **options) if options else self.options))
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 597, in run
    first_task.apply_async(**options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 221, in apply_async
    return _apply(args, kwargs, **options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/task.py", line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
TypeError: nothing() takes exactly 1 argument (0 given)

  exc, exc_info.traceback)))
[2017-04-10 12:43:37,262: ERROR/PoolWorker-1] Task ct.inc[5c1beeff-d785-4d81-af2c-35a5bba839ab] raised unexpected: TypeError('nothing() takes exactly 1 argument (0 given)',)
Traceback (most recent call last):
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/trace.py", line 424, in trace_task
    parent_id=uuid, root_id=root_id,
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 987, in apply_async
    args=args, kwargs=kwargs, **options))
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 1063, in _apply_tasks
    **options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 567, in apply_async
    dict(self.options, **options) if options else self.options))
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 597, in run
    first_task.apply_async(**options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/canvas.py", line 221, in apply_async
    return _apply(args, kwargs, **options)
  File "/home/vagrant/ct-env/local/lib/python2.7/site-packages/celery/app/task.py", line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
TypeError: nothing() takes exactly 1 argument (0 given)
</code></pre></div>
<p dir="auto"><strong>Expecting result</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; r.get()
[2, 2]"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; r.get()
[2, 2]
</code></pre></div>
<p dir="auto"><strong>Celery info</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery -A ct report

software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:2.7.9
            billiard:3.5.0.2 py-amqp:2.1.4
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:cache+memcached://127.0.0.1:11211/

broker_url: u'amqp://guest:********@localhost:5672//'
result_backend: u'cache+memcached://127.0.0.1:11211/'
"><pre class="notranslate"><code class="notranslate">celery -A ct report

software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:2.7.9
            billiard:3.5.0.2 py-amqp:2.1.4
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:cache+memcached://127.0.0.1:11211/

broker_url: u'amqp://guest:********@localhost:5672//'
result_backend: u'cache+memcached://127.0.0.1:11211/'

</code></pre></div>
<p dir="auto"><strong>Notes</strong></p>
<p dir="auto">Work fine with Celery 3.x</p>