lawrencemynott / zendesk-mail-migrator

4 stars 3 forks source link

Getting a error when using x-on-behalf-0f set to true #1

Open skipjac opened 12 years ago

skipjac commented 12 years ago

/home/smoore/20120229/zendesk-mail-migrator/zendeskmailmigrator/deliverymethods/basedelivery.rb:46:in post_tickets_with_user_lookup': undefined method[]' for nil:NilClass (NoMethodError) from /home/smoore/20120229/zendesk-mail-migrator/zendeskmailmigrator/deliverymethods/basedelivery.rb:36:in deliver' from /home/smoore/20120229/zendesk-mail-migrator/zendeskmailmigrator/zendeskmessagemigrator.rb:71:inmigrate' from /home/smoore/20120229/zendesk-mail-migrator/zendeskmailmigrator/zendeskmailmigrator.rb:20:in migrate' from testmail.rb:25:in

'

lawrencemynott commented 12 years ago

Hi Skip,

It looks like this is happening because there are no tickets to deliver (I'll put a check in for that so the program can exit more gracefully and give more useful info). This could have happened because no emails were able to be pulled from the server or because no emails were able to be converted into tickets. Would you be able to check in the log file for this run? It should have a couple of lines saying how many mails were retrieved and how many tickets converted, this would give a clue as to where the problem is occurring.

Thanks! Lawrence

skipjac commented 12 years ago

you can get the logs from here http://skipjack.info/ogg/zenlogs.zip

lawrencemynott commented 12 years ago

Seems like you had some success with the first few attempts (email_import_20120301_171425.log, email_import_20120301_172411.log and email_import_20120302_141207.log) then the subsequent ones all show 0 emails retrieved from the server. I've seen this happen myself when I've retrieved all the unread email from the server. In GMail I was able to "refresh" my inbox by enabling POP on all mail under the POP/IMAP settings, re-running the program then retrieved mail starting with the first received. Depending on your script and mail server settings, is that a possibility?

skipjac commented 12 years ago

Ok I will give that a try