Event Streaming Error :Use of sub-query or function is restricted

Hi ERPNEXT Community,

I was trying to use the Event Streaming function, I added producer and consumer details, approved the Event in the (Producer) however when I try to test the sync nothing happened I tried to check the Event Sync Log and got this error 
        Traceback (most recent call last):
      File "apps/frappe/frappe/app.py", line 68, in application
        response = frappe.api.handle()
      File "apps/frappe/frappe/api.py", line 55, in handle
        return frappe.handler.handle()
      File "apps/frappe/frappe/handler.py", line 31, in handle
        data = execute_cmd(cmd)
      File "apps/frappe/frappe/handler.py", line 68, in execute_cmd
        return frappe.call(method, **frappe.form_dict)
      File "apps/frappe/frappe/__init__.py", line 1213, in call
        return fn(*args, **newargs)
      File "apps/frappe/frappe/__init__.py", line 629, in wrapper_fn
        retval = fn(*args, **get_newargs(fn, kwargs))
      File "apps/frappe/frappe/desk/reportview.py", line 56, in get_count
        data = execute(**args)[0].get('total_count')
      File "apps/frappe/frappe/desk/reportview.py", line 61, in execute
        return DatabaseQuery(doctype).execute(*args, **kwargs)
      File "apps/frappe/frappe/model/db_query.py", line 107, in execute
        result = self.build_and_run()
      File "apps/frappe/frappe/model/db_query.py", line 124, in build_and_run
        args = self.prepare_args()
      File "apps/frappe/frappe/model/db_query.py", line 149, in prepare_args
        self.sanitize_fields()
      File "apps/frappe/frappe/model/db_query.py", line 267, in sanitize_fields
        _raise_exception()
      File "apps/frappe/frappe/model/db_query.py", line 255, in _raise_exception
        frappe.throw(_('Use of sub-query or function is restricted'), frappe.DataError)
      File "apps/frappe/frappe/__init__.py", line 444, in throw
        msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
      File "apps/frappe/frappe/__init__.py", line 423, in msgprint
        _raise_exception()
      File "apps/frappe/frappe/__init__.py", line 378, in _raise_exception
        raise raise_exception(msg)
    frappe.exceptions.DataError: Use of sub-query or function is restricted

What seems to be the problem?