Zendesk import error

Infos:

  • Used Zammad version: 3.2.0
  • Used Zammad installation source: Installed using yum
  • Operating system: Centos 7.6.1810
  • Browser + version: Chrome (latest)

Expected behavior:

  • Import Zendesk information to newly installed zammad

Actual behavior:

  • Throws “undefined method `singularize’ for :Groups:Symbol” when trying to import Zendesk data using Zendesk migrator (check attached screenshot).

I checked /var/log/zammad/production.log and found this message:

I, [2020-02-16T03:47:01.804217 #14424-46997563006220] INFO – : Started GET “/api/v1/import/zendesk/import_status?=1581835198633" at 2020-02-16 03:47:01 -0500
I, [2020-02-16T03:47:01.809343 #14424-46997563006220] INFO – : Processing by ImportZendeskController#import_status as JSON
I, [2020-02-16T03:47:01.809402 #14424-46997563006220] INFO – : Parameters: {"
”=>“1581835198633”}
, [2020-02-16T03:47:01.832844 #14424-46997563006220] INFO – : Completed 200 OK in 23ms (Views: 0.4ms | ActiveRecord: 1.0ms)

I tried to reset the database couple of times, but the same error is still showing.

Steps to reproduce the behavior:

  • Use Zendesk Migrator after installing Zammad

1 Like

There’s no log entry in your production.log either containing “ERROR” or “WARN” ?

The error message from your screenshot should do exactly that all together with throwing an traceback that would help to find the issue.

I checked the production.log and no ERROR or WARN entries. There isn’t any traceback showing in the log either.

When opening " /api/v1/import/zendesk/import_status? =1581835198633" request in the browser, I’m seeing the same error showing in the screenshot within the JSON response.

Could you please start over again and check the logs afterwards.
There must be something that went wrong and the hint should live in the logfile.

You’re welcome to send me your production.log via private message after wards, if you please.

I started the import from scratch. I checked the production.log and found this:

I, [2020-02-18T13:37:08.847342 #17867-47187476594380] INFO – : Started POST “/api/v1/import/zendesk/import_start” for 10.10.10.183 at 2020-02-18 13:37:08 -0500
I, [2020-02-18T13:37:08.852439 #17867-47187476594380] INFO – : Processing by ImportZendeskController#import_start as JSON
I, [2020-02-18T13:37:08.860976 #17867-47187476594380] INFO – : Setting.set(‘import_mode’, true)
I, [2020-02-18T13:37:08.866000 #17867-47187476594380] INFO – : Setting.set(‘import_backend’, “zendesk”)
I, [2020-02-18T13:37:08.897752 #17867-47187476594380] INFO – : Completed 200 OK in 45ms (Views: 0.2ms | ActiveRecord: 12.7ms)
I, [2020-02-18T13:37:09.122265 #17865-47323818143980] INFO – : 2020-02-18T13:37:09-0500: [Worker(host:se-zammad pid:17865)] Job ImportJob#start (id=3) RUNNING
E, [2020-02-18T13:37:09.153015 #17865-47323818143980] ERROR – : ImportJob ‘Import::Zendesk’ failed: undefined method singularize' for :Groups:Symbol E, [2020-02-18T13:37:09.153060 #17865-47323818143980] ERROR -- : undefined methodsingularize’ for :Groups:Symbol (NoMethodError)
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:28:in request' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:15:inblock in statistics_diff’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in each' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:ineach_with_object’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in statistics_diff' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:27:invalue’
/opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:32:in ignore?' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:8:inprocess’
/opt/zammad/lib/sequencer/unit/base.rb:202:in process' /opt/zammad/lib/sequencer.rb:77:inblock (4 levels) in process’
/opt/zammad/lib/mixin/start_finish_logger.rb:7:in log_start_finish' /opt/zammad/lib/sequencer.rb:76:inblock (3 levels) in process’
/opt/zammad/lib/sequencer/state.rb:150:in process' /opt/zammad/lib/sequencer.rb:74:inblock (2 levels) in process’
/opt/zammad/lib/sequencer/units.rb:29:in block in each' /opt/zammad/lib/sequencer/units.rb:28:ineach’
/opt/zammad/lib/sequencer/units.rb:28:in each' /opt/zammad/lib/sequencer.rb:72:ineach_with_index’
/opt/zammad/lib/sequencer.rb:72:in block in process' /opt/zammad/lib/mixin/start_finish_logger.rb:7:inlog_start_finish’
/opt/zammad/lib/sequencer.rb:70:in process' /opt/zammad/lib/sequencer.rb:25:inprocess’
/opt/zammad/lib/import/mixin/sequence.rb:15:in process' /opt/zammad/lib/import/zendesk.rb:8:instart’
/opt/zammad/app/models/import_job.rb:24:in start' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/performable_method.rb:26:inperform’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:81:in block in invoke_job' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:inblock in initialize’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in execute' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:inrun_callbacks’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:78:in invoke_job' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:inblock (2 levels) in run’
/opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' /opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/timeout.rb:103:intimeout’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in block in run' /opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/benchmark.rb:308:inrealtime’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:229:in run' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:inblock in reserve_and_run_one_job’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in block in initialize' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:inexecute’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in run_callbacks' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:inreserve_and_run_one_job’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:213:in block in work_off' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:intimes’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in work_off' /opt/zammad/app/models/scheduler.rb:372:inblock (3 levels) in worker’
/opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/benchmark.rb:308:in realtime' /opt/zammad/app/models/scheduler.rb:370:inblock (2 levels) in worker’
/opt/zammad/app/models/scheduler.rb:366:in loop' /opt/zammad/app/models/scheduler.rb:366:inblock in worker’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’

1 Like

Would you mind to share your zendesk url and API key with me (privately via private message) ?

I’ll ask an developer to have a look on it then, maybe the issue lives on our end.

hey,
we have exactly same issue.
How you enter your User and Api key?
user: email?
api: key?

or user: email/token ?

we fallback tomorrow our server and try it again with the “/token” additonal.

I will let you know the result :wink:

same Issue with “email/token”
image

What can we do?

our production.log shows:

production version

I, [2020-02-19T08:37:49.946773 #1330-47082562157720] INFO – : Started GET “/api/v1/import/zendesk/import_status?=1582101335846" for 192.10.52.127 at 2020-02-19 08:37:49 +0000
I, [2020-02-19T08:37:49.957304 #1330-47082562157720] INFO – : Processing by ImportZendeskController#import_status as JSON
I, [2020-02-19T08:37:49.957386 #1330-47082562157720] INFO – : Parameters: {"
”=>“1582101335846”}
I, [2020-02-19T08:37:49.964229 #1330-47082562157720] INFO – : Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.3ms)
I, [2020-02-19T08:37:50.235622 #1055-47008422188660] INFO – : 2020-02-19T08:37:50+0000: Worker(host:muppticket pid:[1055)]]) Job ImportJob#start (id=3) RUNNING
E, [2020-02-19T08:37:50.294634 #1055-47008422188660] ERROR – : ImportJob ‘Import::Zendesk’ failed: undefined method singularize' for :Groups:Symbol E, [[2020-02-19](phone:[2020-02-19)T08:37:50.294709 #1055-47008422188660] ERROR -- : undefined method singularize’ for :Groups:Symbol (NoMethodError)
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:28:in request' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:15:in block in statistics_diff’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in each' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in each_with_object’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in statistics_diff' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:27:in value’
/opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:32:in ignore?' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:8:in process’

Same issue here with email+token, fails after few seconds

@MrGeneration any Update?

1 Like

i found a issue in my logpost. however here is an actual post from production.log:

I, [2020-02-26T09:58:10.656148 #1212-47448722360140] INFO – : Started POST “/api/v1/import/zendesk/import_start” for 192.10.52.127 at 2020-02-26 09:58:10 +0000
I, [2020-02-26T09:58:10.666182 #1212-47448722360140] INFO – : Processing by ImportZendeskController#import_start as JSON
I, [2020-02-26T09:58:10.828836 #1212-47448722360140] INFO – : Setting.set(‘import_mode’, true)
I, [2020-02-26T09:58:10.840212 #1212-47448722360140] INFO – : Setting.set(‘import_backend’, “zendesk”)
I, [2020-02-26T09:58:10.879323 #1212-47448722360140] INFO – : Completed 200 OK in 213ms (Views: 0.2ms | ActiveRecord: 28.0ms)
I, [2020-02-26T09:58:11.772136 #1318-47182959988940] INFO – : 2020-02-26T09:58:11+0000: [Worker(host:muppticket pid:1318)] Job ImportJob#start (id=3) RUNNING
E, [2020-02-26T09:58:11.812843 #1318-47182959988940] ERROR – : ImportJob ‘Import::Zendesk’ failed: undefined method singularize' for :Groups:Symbol E, [2020-02-26T09:58:11.812911 #1318-47182959988940] ERROR -- : undefined method singularize’ for :Groups:Symbol (NoMethodError)
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:28:in request' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:15:in block in statistics_diff’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in each' /opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in each_with_object’
/opt/zammad/lib/sequencer/unit/import/zendesk/objects_total_count.rb:13:in statistics_diff' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:27:in value’
/opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:32:in ignore?' /opt/zammad/lib/sequencer/unit/common/provider/attribute.rb:8:in process’
/opt/zammad/lib/sequencer/unit/base.rb:202:in process' /opt/zammad/lib/sequencer.rb:77:in block (4 levels) in process’
/opt/zammad/lib/mixin/start_finish_logger.rb:7:in log_start_finish' /opt/zammad/lib/sequencer.rb:76:in block (3 levels) in process’
/opt/zammad/lib/sequencer/state.rb:150:in process' /opt/zammad/lib/sequencer.rb:74:in block (2 levels) in process’
/opt/zammad/lib/sequencer/units.rb:29:in block in each' /opt/zammad/lib/sequencer/units.rb:28:in each’
/opt/zammad/lib/sequencer/units.rb:28:in each' /opt/zammad/lib/sequencer.rb:72:in each_with_index’
/opt/zammad/lib/sequencer.rb:72:in block in process' /opt/zammad/lib/mixin/start_finish_logger.rb:7:in log_start_finish’
/opt/zammad/lib/sequencer.rb:70:in process' /opt/zammad/lib/sequencer.rb:25:in process’
/opt/zammad/lib/import/mixin/sequence.rb:15:in process' /opt/zammad/lib/import/zendesk.rb:8:in start’
/opt/zammad/app/models/import_job.rb:24:in start' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/performable_method.rb:26:in perform’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:81:in block in invoke_job' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in block in initialize’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in execute' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in run_callbacks’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:78:in invoke_job' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in block (2 levels) in run’
/opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' /opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/timeout.rb:103:in timeout’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in block in run' /opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/benchmark.rb:308:in realtime’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:229:in run' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in block in reserve_and_run_one_job’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in block in initialize' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in execute’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in run_callbacks' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in reserve_and_run_one_job’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:213:in block in work_off' /opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in times’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in work_off' /opt/zammad/app/models/scheduler.rb:372:in block (3 levels) in worker’
/opt/zammad/vendor/ruby-2.5.5/lib/ruby/2.5.0/benchmark.rb:308:in realtime' /opt/zammad/app/models/scheduler.rb:370:in block (2 levels) in worker’
/opt/zammad/app/models/scheduler.rb:366:in loop' /opt/zammad/app/models/scheduler.rb:366:in block in worker’
/opt/zammad/vendor/bundle/ruby/2.5.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’
I, [2020-02-26T09:58:11.824861 #1318-47182959988940] INFO – : 2020-02-26T09:58:11+0000: [Worker(host:muppticket pid:1318)] Job ImportJob#start (id=3) COMPLETED after 0.0526
I, [2020-02-26T09:58:13.901210 #1212-47448722307980] INFO – : Started GET “/api/v1/import/zendesk/import_status?=1582711051359" for 192.10.52.127 at 2020-02-26 09:58:13 +0000
I, [2020-02-26T09:58:13.905664 #1212-47448722307980] INFO – : Processing by ImportZendeskController#import_status as JSON
I, [2020-02-26T09:58:13.905729 #1212-47448722307980] INFO – : Parameters: {"
”=>“1582711051359”}
I, [2020-02-26T09:58:13.926527 #1212-47448722307980] INFO – : Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 1.0ms)
I, [2020-02-26T09:58:16.017528 #1318-47182974034540] INFO – : execute Chat.cleanup (try_count 0)…
I, [2020-02-26T09:58:16.024251 #1318-47182974034540] INFO – : ended Chat.cleanup took: 0.044570535 seconds.
I, [2020-02-26T09:58:18.957504 #1212-47448747973740] INFO – : Started GET “/api/v1/import/zendesk/import_status?=1582711051360" for 192.10.52.127 at 2020-02-26 09:58:18 +0000
I, [2020-02-26T09:58:18.966559 #1212-47448747973740] INFO – : Processing by ImportZendeskController#import_status as JSON
I, [2020-02-26T09:58:18.966777 #1212-47448747973740] INFO – : Parameters: {"
”=>“1582711051360”}
I, [2020-02-26T09:58:19.136821 #1212-47448747973740] INFO – : Completed 200 OK in 169ms (Views: 0.3ms | ActiveRecord: 2.2ms)

Sorry but I don’t know what kind of update you’re expecting from my end.
I haven’t received anything that helps me reproducing this on a local site with a developer, so I can’t provide any information that will help you.

Hi MrGeneration,
what kind of Information do you need to reproducing the issue?
We tested the import with the newest Version 3.3 - same error

Thanks.

If we have a API token and the URL of the Zendesk instance I can ask a developer to have a look to pin down the issue.,

@MrGeneration ok i sent you the url and key via private message.
Thanks.

1 Like

Hi, I’m facing exactly the same problem with a freshly dowloaded (via helm chart) version… Any news on this so far ?

Sorry for the lacking update.
As far as I’m aware the specific issue bwuest found should be adressed within stable.

At least according to issue https://github.com/zammad/zammad/issues/2941