File Manager cannot read folder contents (plus weird error message popping out when trying to load folder contents)

Hi again,

I would like to enlist your help in debugging an issue that I have been experiencing when trying to load the folder contents in file manager. Whenever I try to load the file manager component, this message will pop up.



I believe that the reason this is not working is because the FileManager component can't access the file operation API url. I came into this conclusion because when I try to debug this by adding breakpoints to the controller's constructor and the File Operation method, it didn't trigger these breakpoints. Whereas in a new project that I have set up to test this very function, the component was able to access the API url and the breakpoints are being reached.

Some things of note:

- The API is reachable via the browser.
- The Upload function in the API works.
- The main issue here is that the file manager component cannot load the folder contents. In my testing, one file should appear on the file manager.
- Tried testing it on version 19.1.0.54 and 19.1.0.56, with the EJ2.AspNet.Core in 18.4.0.49, both didn't work on the main project that I'm working on. But on my test project, these particular library versions work for me.

I suspect the reason it's not working is because of the Startup code that I have. I have tried adding and removing service configurations but they can't seem to resolve the issue. However, I cannot just simply remove one problematic line in Startup.cs since I need to work on that exact configuration.

1. Can you help me debug this? I'm sending out the project code that I'm working on.
2. Also, can you suggest a way for me to debug the value that was causing the error message that is popping up in the screen? I believe that in the future, finding out what that value is can lead me to resolving this issue on my own.

Many thanks!

Attachment: GraphBlazor_de975cc0.zip

6 Replies 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team April 19, 2021 04:47 PM UTC

Hi Denzel, 
  
We have validated your reported query in FileManager component. We need some time to validate your reported problem based on your provided details. So, we will update you our further validation details in four business days on 23rd April 2021. 
  
We appreciate your patience. 
  
Regards, 
Indhumathy L


IL Indhumathy Loganathan Syncfusion Team April 23, 2021 01:20 PM UTC

Hi Denzel, 
 
Thank you for your patience. 
 
We have validated your reported issue. We tried to find the root cause of the issue and found that our service controller is not triggered for FileManager due to the authentication performed in your Startup.cs page. We only able to run the sample after commenting out the entire authentication related code in the Startup file. 
 
We have used HttpClient for web api calls in FileManager to perform all file operations. Since we faced a similar issue before, we suspect even the basic HttpClient call has the same issue while including the authentication code. This issue is not related to FileManager component. We suggest you to check your authentication code. If you need further assistance with this issue, please share us a simple issue replicated sample to check this issue further. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Indhumathy L 



RS Roy Sunga April 23, 2021 06:23 PM UTC

Hi,

That makes sense. Commenting out the code inside the services.AddControllerWithViews() did solve the issue.

Anyway, how about my other question? Do you have any way of debugging what the issue might be on the File Manager when the Web API returns an error message, that is in HTML format like with the issue that I have reported? I know that the error message the web API returned is in XML/HTML format. The error message the File Manager displayed hinted this as it cannot parse or understand what format the error message returned. I think this is crucial in case we encounter a similar issue in the future. The issue does not return any logs that will point out to the cause of the issue. Thus I had a hard time debugging this. Also, we can't always wait for a whole work week for your response and so we need to have the agency to be able to debug the issue ourselves as well.

Thanks!


IL Indhumathy Loganathan Syncfusion Team April 26, 2021 12:37 PM UTC

Hi Denzel, 
 
Sorry for the inconvenience. 
 
We have validated your query in FileManager component. In FileManager, we have included exception handling for every file operations. You can perform debugging with the help of it. Please check the below link for reference. 
 
 
Similar to the above code, we have handled error for all file operations. Also, we have included the error details for events in the argument detail. Please refer to the below screenshot. 
 
 
 
But for the previous reported issue, our FileManager controller part is not executed. For further validation, we checked the Startup.cs file codes and identified that the authentication was causing the reported issue and resolved by removing it. 

Please let us know if you need any further assistance.

Regards,
 
Indhumathy L

Marked as answer

RS Roy Sunga April 26, 2021 01:35 PM UTC

Thanks for this! I think this would be extremely helpful when debugging issues with the components. Anyway, if I get stuck I'll just post a new post at the forum.

Again, many thanks for your prompt response.


KR Keerthana Rajendran Syncfusion Team April 27, 2021 05:25 AM UTC

  
Hi Denzel, 

Most welcome. We are happy to hear that the provided suggestion helped you. Please get back to us if you need further assistance. We will be happy to assist you.  

Regards, 
Keerthana. 


Loader.
Up arrow icon