refreshTask not working

This is my success function when called to api

success: function(resp){
                   let newTask = gantt.getTask(;
                   console.log('newTask', newTask);
                   newTask.resource = resp.task.resource;

Probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.

Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.