Trying to update custom app via API fails with 'The task failed because of an error: no implicit conversion of nil into String' | The place for Zendesk users to come together and share
Skip to main content
Question

Trying to update custom app via API fails with 'The task failed because of an error: no implicit conversion of nil into String'

  • March 23, 2022
  • 2 replies
  • 7 views

takeshi

Here are the steps I tried:

Uploaded a file using POST https://d3v-brastel.zendesk.com/api/v2/apps/uploads.json

Got response with upload_id:

reponse_body: { id: 1840900 }

Started update of app passing the received upload_id:

PUT api/v2/apps/788738 body={"name":"Basix","short_description":"Basix","upload_id":1840900}

Waiting for app update job to complete

Checking app update job status
GET api/v2/apps/job_statuses/81ca43f4c621440f85ae0ff99a2c86f7 body=null
{ id: '81ca43f4c621440f85ae0ff99a2c86f7',
  url: 'https://d3v-brastel.zendesk.com/api/v2/apps/job_statuses/81ca43f4c621440f85ae0ff99a2c86f7.json',
  total: null,
  progress: null,
  status: 'failed',
  message: 'The task failed because of an error: no implicit conversion of nil into String',
  retry_in: 3 }

2 replies

takeshi
  • Author
  • March 23, 2022

Sorry,

when uploading the file data, I used form parameter "file" instead of "uploaded_data" (as require by the API).
After correcting this, it worked:

zendesk_request PUT api/v2/apps/788738 body={"name":"Basix","short_description":"Basix","upload_id":1840932}
Waiting for app update job to complete
Checking app update job status
zendesk_request GET api/v2/apps/job_statuses/de6a9ed7968eb547ab69faa540a453ce body=null
{ id: 'de6a9ed7968eb547ab69faa540a453ce',
  url: 'https://d3v-brastel.zendesk.com/api/v2/apps/job_statuses/de6a9ed7968eb547ab69faa540a453ce.json',
  total: 105,
  progress: 105,
  status: 'completed',
  message: 'Basix updated.',
  retry_in: 3,
  app_url: 'https://d3v-brastel.zendesk.com/api/v2/apps/788738.json',
  app_id: 788738,
  app_name: 'Basix' }


So everything is OK.

Thanks.

 


Tipene
  • Employee
  • March 24, 2022
Hi Mayama,
 
Glad to hear everything is working now.
 
Have a great day!
 
Tipene