We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot read property 'code' of null in operation.js

Thread ID:

Created:

Updated:

Platform:

Replies:

148112 Oct 6,2019 05:08 PM UTC Oct 8,2019 06:22 AM UTC ASP.NET Core - EJ 2 3
loading
Tags: FileManager
sajad
Asked On October 6, 2019 07:34 PM UTC

i'm using file manager element like this

 
           
                                        downloadUrl="/AdminArea/Filemanager/Download"
                                        uploadUrl="/AdminArea/Filemanager/Upload"
                                        getImageUrl="/AdminArea/Filemanager/GetImage">
           

but when page loads i got this error in console "Cannot read property 'code' of null in operation.js ". and folders and files not loads
i get the result of "this.operation.GetFiles(args.Path, args.ShowHiddenItems)" in the controller and here is the result


   "cwd":
      "path":null,
      "action":null,
      "newName":null,
      "names":null,
      "name":"Files",
      "size":0,
      "previousName":null,
      "dateModified":"2019-10-06T07:07:29.0185244",
      "dateCreated":"2019-10-04T12:48:40.1017728",
      "hasChild":true,
      "isFile":false,
      "type":"",
      "id":null,
      "filterPath":"",
      "filterId":null,
      "targetPath":null,
      "renameFiles":null,
      "uploadFiles":null,
      "caseSensitive":false,
      "searchString":null,
      "showHiddenItems":false,
      "data":null,
      "targetData":null,
      "permission":null
   },
   "files":
      
         "path":null,
         "action":null,
         "newName":null,
         "names":null,
         "name":"test",
         "size":0,
         "previousName":null,
         "dateModified":"2019-10-06T07:07:29.0185244",
         "dateCreated":"2019-10-06T07:07:29.0185244",
         "hasChild":false,
         "isFile":false,
         "type":"",
         "id":null,
         "filterPath":"\\",
         "filterId":null,
         "targetPath":null,
         "renameFiles":null,
         "uploadFiles":null,
         "caseSensitive":false,
         "searchString":null,
         "showHiddenItems":false,
         "data":null,
         "targetData":null,
         "permission":null
      }
   ],
   "error":null,
   "details":null
}
any help would be grateful
Best regards

Ashokkumar Balasubramanian [Syncfusion]
Replied On October 7, 2019 10:11 AM UTC

Hi sajad, 
 
Good day to you. 
 
We have checked your reported query that “cannot read code of null” error in all possible cases, the issue occurs only whenever the root path doesn’t contain any files or folders. We are suspect the same case also happened at your end. For your reference we have prepared and attached a video to exhibit the request sending to the server side. 
 
 
Also, we have prepared a file manager sample in .NET Core. Refer the sample link below. 
 
 
Can you please check with attached video and sample? If the issue persist, can you please share the below requested additional details will be more helpful to identify your reported issue at earlier. 
 
a.     Video for issue reproducing. 
b.     Code snippet for file manager operations in controller side. 
c.      Issue reproducing sample (if possible). 
 
Regards, 
Ashokkumar B. 


sajad
Replied On October 7, 2019 02:59 PM UTC

hi Ashokkumar, tnx very much for replying,
your notes helped me to resolve the problem and actually the issue was not related to filemanager at all,
i am using asp boilerplate and it was wrapping the controller response with some extra data automatically, when i get rid of that wrapping, filemanager start working.
tnx again.

Ashokkumar Balasubramanian [Syncfusion]
Replied On October 8, 2019 06:22 AM UTC

Hi sajad,  
 
We are glad to hear that the provided solution worked for you. Please let us know, if you need any further assistance. 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon