Invalid start_date argument for getDuration method Error

Hello,

While linking task to task, follow error is occurred.

“Invalid start_date argument for getDuration method”

I am debugging the reason, but I don’t know yet.

Is there anyone who can help ?

Below is the location where error occur and console message.

------------------------------ Error point ----------------------------

_getStartEndConfig:function(e){
console.log("****************************** _getStartEndConfig")
var n,i=l;

if(e instanceof i){
    console.log("e instanceof i")
    return e;
}

console.log(e) ;

console.log(l)

console.log("arguments", arguments[0],arguments[1],arguments[2],arguments[3])
//console.log("date", e.start_date,e.end_date,e.task, e.id)
console.log("t.config.duration_unit", t.config.duration_unit)
//console.log("n.step", n.step)
console.log("t.config.duration_step", t.config.duration_step)
//console.log("n.start_date", n.start_date)
//console.log("n.start", n.start)
//console.log("n.date", n.date)
//console.log(r.isValidDate(n.start_date))
n=new i(arguments[0],arguments[1],arguments[2],arguments[3]) ;
console.log(n) ;

if(r.isDate(e)?n=new i(arguments[0],arguments[1],arguments[2],arguments[3]):(n=new i(e.start_date,e.end_date,e.task),e.id&&(n.task=e)),n.unit=n.unit||t.config.duration_unit,n.step=n.step||t.config.duration_step,n.start_date=n.start_date||n.start||n.date,!r.isValidDate(n.start_date)){
console.log(“1”, r.isDate(e) )
console.log(“2”, n.start_date )
console.log(“3”, n.step )
console.log(“4”, n.start )
console.log(“5”, n.date )
console.log(“6”, r.isValidDate(n.start_date) )

    throw t.assert(!1,"Invalid start_date argument for getDuration method"),new Error("Invalid start_date argument for getDuration method");
}
    
if(!r.isValidDate(n.end_date)){
    throw t.assert(!1,"Invalid end_date argument for getDuration method"),new Error("Invalid end_date argument for getDuration method");
}

return n

},

------------------------------ Console Message ----------------------------

****************************** _getStartEndConfig

dhtmlxgantt-min.js:21 {start_date: null, end_date: Sat Feb 01 2020 00:00:00 GMT+0900 (대한민국 표준시), task: {…}}
dhtmlxgantt-min.js:23 ƒ l(t,e,n,i){return this.start_date=t,this.end_date=e,this.task=n,this.calendar=i,this.unit=null,this.step=null,this}
dhtmlxgantt-min.js:25 arguments {start_date: null, end_date: Sat Feb 01 2020 00:00:00 GMT+0900 (대한민국 표준시), task: {…}} undefined undefined undefined
dhtmlxgantt-min.js:27 t.config.duration_unit day
dhtmlxgantt-min.js:29 t.config.duration_step 1
dhtmlxgantt-min.js:35 l {start_date: {…}, end_date: undefined, task: undefined, calendar: undefined, unit: null, …}
dhtmlxgantt-min.js:38 1 false
dhtmlxgantt-min.js:39 2 undefined
dhtmlxgantt-min.js:40 3 1
dhtmlxgantt-min.js:41 4 undefined
dhtmlxgantt-min.js:42 5 undefined
dhtmlxgantt-min.js:43 6 false
dhtmlxgantt-min.js:45 Uncaught Error: Invalid start_date argument for getDuration method
at Object._getStartEndConfig (dhtmlxgantt-min.js:45)
at Object.getDurationArguments (dhtmlxgantt-min.js:54)
at a.calculateDuration (dhtmlxgantt-min.js:54)
at Object.calculateDuration (dhtmlxgantt-min.js:54)
at dhtmlxgantt-min.js:54
at Object.t._getImplicitLinks (dhtmlxgantt-min.js:54)
at Object.t._formatLink (dhtmlxgantt-min.js:54)
at Object.t._getDirectDependencies (dhtmlxgantt-min.js:54)
at Object.t._getDirectSuccessors (dhtmlxgantt-min.js:54)
at Object.t._getSuccessors (dhtmlxgantt-min.js:54)
at Object._collectRelations (dhtmlxgantt-min.js:10)
at Object._getLinkedTasks (dhtmlxgantt-min.js:10)
at Object.getLinkedTasks (dhtmlxgantt-min.js:10)
at Object.getLoopContainingLink (dhtmlxgantt-min.js:54)
at Object.isCircularLink (dhtmlxgantt-min.js:54)
at Object.l (dhtmlxgantt-min.js:54)

I resolved this issue, when linking task and including unscheduled task in task chain, this error is happened.