AnsweredAssumed Answered

Inbound email : job looping on "running" because of query failed and wrong encoding

Question asked by Gaelle Fernandez on Jan 14, 2016
Latest reply on Oct 23, 2017 by Patrick Métrailler

Hello everybody !

 

Today  I came to a really strange error in my sugarcrm.log

Let me explain ..

 

What i want :

I want to set up a inbound email account to retrieve emails from a email address, and create cases via the standard sugar job "Verify inbound emails"

 

What i did & what happened :

I sat up the inbound email account, tried the server connexion, and it worked.

I sent emails to that email address, and Sugar took it and generated a case, in one instance of the job.

BUT

The "current" job is still in "running" status (even after like 5minutes of running). So, because it is still in running status, it does not relaunch so i can't get any other emails.

 

I looked in sugarcrm.log  and had this error :

 

Error updating table: job_queue: Query Failed: UPDATE job_queue

                    SET assigned_user_id='1',name='Vérifier les boîtes emails entrants',date_modified='2016-01-14 13:48:01',scheduler_id='ab4cbb8c-8fa9-6518-9acf-557868da58d8',execute_time='2016-01-14 13:48:01',status='done',resolution='failure',message='Warning [2]: copy(): The first argument to copy() function cannot be a directory sur\xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nWarning [2]: copy(): The first argument to copy() function cannot be a directory sur xA0 la ligne 3695\nEchec inattendu, veuillez vérifier les logs PHP et sugarcrm.log\n',target='function::pollMonitoredInboxes',requeue=0,failure_count=1,job_delay=0,client='CRONefa70bed4f2e5a75a907f99f7f153ca3:15370'

                     WHERE  job_queue.id = '1b6ecaab-5354-2455-92c0-5697a7204be0' AND deleted=0: MySQL error 1366: Incorrect string value: '\xA0 la l...' for column 'message' at row 1

 

So, if i read it well, Sugar wanted to update the job_queue and mark it done but failed, because of a warning saying that the copy function is getting an argument error.

But the update query failed because of a wrong encodage thing.

Yes, false encodage, because i got this in my log, and i don't know what it is exactly:

 

So, first :

- Why is it an encodage/formatting error on a Warning in Sugar? How can i correct it ?

Secondly :

- Why is the first argument of copy wrong, and how can i change it, even if my email has been retrieved ?

 

Thanks a lot for your help and time, i'm not good for inbound emails....

Outcomes