UrlAdaptor.prototype.processResponse data error

Hi

i'm using Scheduler control and since two days ago all was working fine

Now i have this error on UrlAdaptor.prototype.processResponse data when i try to save:

Cannot use 'in' operator to search for 'count' in true

At the moment the response parameter "data" has value "true" instead of a json

I clean all my customizations and the code is very simple now but still not working

I'm using 19.2.62 version but I've tried the last one too

------ .cshtml

"

       <ejs-schedule id="schedule" width="100%" height="650px" selectedDate="DateTime.Now">

            <e-schedule-eventsettings>

                <e-data-manager url="../User/LoadData" crudUrl="../User/UpdateData" adaptor="UrlAdaptor" crossDomain="true"></e-data-manager>

            </e-schedule-eventsettings>

        </ejs-schedule>"

-----  Controller

[Route("LoadData")]

[HttpPost]

public List < ScheduleEvent >  LoadData([FromBody] Params param)

{

}


[Route("UpdateData")]

[HttpPost]

public bool UpdateData([FromBody] EditParams param)

{}


------- class

public class Params

{

public DateTime StartDate { get; set; }

public DateTime EndDate { get; set; }

}


public class EditParams

{

public string key { get; set; }

public string action { get; set; }

public List added { get; set; }

public List changed { get; set; }

public List deleted { get; set; }

public ScheduleEvent value { get; set; }

}

public class ScheduleEvent

{

public int Id { get; set; }

public string Subject { get; set; }

public DateTime StartTime { get; set; }

public DateTime EndTime { get; set; }

public string StartTimezone { get; set; }

public string EndTimezone { get; set; }

public string Location { get; set; }

public string Description { get; set; }

public bool IsAllDay { get; set; }

public string RecurrenceID { get; set; }

public string RecurrenceRule { get; set; }

public string RecurrenceException { get; set; }

}


3 Replies

VD Vinitha Devi Murugan Syncfusion Team October 4, 2021 08:44 AM UTC

Hi Marz, 
 
Greetings from Syncfusion Support. 
We have tried to replicate your reported problem “Cannot use 'in' operator to search for 'count' in true. At the moment the response parameter "data" has value "true" instead of a json” at our end by preparing crud sample with your shared code in latest version. But unfortunately, we were unable to replicate the issue at our end. Schedule CRUD working properly at our end. Please refer the working sample from the following link. 
Response screenshot: 
 
 
 
Kindly try the above sample, If you still face the problem at your end, please share below details to validate the issue. 
 
  • Whether you have changed any code recently?
  • Try to replicate the issue in above sample or share issue reproducing sample
 
Regards, 
Vinitha 



MA marx October 14, 2021 09:26 AM UTC

Hi

If i use my code in a new solution it's working

I tried to remove all my custom js and other javascript library (excluding jquery) but I still have the error.

My payload seems to be correct:

{"changed":[],"added":[{"Subject":"bbnbn","Location":"bnb","StartTime":"2021-10-13T09:00:00.000Z","EndTime":"2021-10-13T09:30:00.000Z","IsAllDay":false,"StartTimezone":null,"EndTimezone":null,"Description":"dff","RecurrenceRule":null,"Id":5}],"deleted":[],"action":"batch","params":{"StartDate":"2021-10-09T22:00:00.000Z","EndDate":"2021-10-16T22:00:00.000Z"},"StartDate":"2021-10-09T22:00:00.000Z","EndDate":"2021-10-16T22:00:00.000Z"}

I attached a file with chrome inspector situation

Do you know if there are some js libraries or .net core Startup.cs configurations that may have a conflict with your js library?


These are Nuget packages I'm using

 <PackageReference Include="AspNetCoreHero.ToastNotification" Version="1.1.0" />

    <PackageReference Include="LazZiya.ImageResize" Version="4.1.0" />

    <PackageReference Include="LazZiya.TagHelpers" Version="5.0.0" />

    <PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="5.0.10" />

    <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.10" />

    <PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />

    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.10" />

    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />

    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />

    <PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="19.3.0.44" />

    <PackageReference Include="System.Text.Json" Version="5.0.2" />

    <PackageReference Include="XLocalizer" Version="1.0.3" />

    <PackageReference Include="XLocalizer.TagHelpers" Version="1.1.0" />

    <PackageReference Include="XLocalizer.Translate.MyMemoryTranslate" Version="1.0.1" />


Attachment: error_8a769b87.zip



VD Vinitha Devi Murugan Syncfusion Team October 15, 2021 12:25 PM UTC

Hi Marx, 
 
Thanks for your update. 
 
We have tried to replicate your reported problem at our end with your shared nuget packages. But unfortunately, we were unable to replicate the exact issue at our end. Please refer the working sample from the following link. 
 
 
Kindly try the above sample, if you still facing the same problem, kindly share replication sample with replication procedure to provide prompt solution. 
 
Regards, 
Vinitha 


Loader.
Up arrow icon