Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No folders / files found in WebDAV dir. #13

Open
MikolasFromm opened this issue May 4, 2021 · 1 comment
Open

No folders / files found in WebDAV dir. #13

MikolasFromm opened this issue May 4, 2021 · 1 comment

Comments

@MikolasFromm
Copy link

Hi,

I've been trying to spin up your Blazor-WebDAV-player project on Ubuntu 20.04. I got blazor working and then started to configure the WebDAV player itself.

I have WebDAV enabled on https://example.com/webdav, so I entered that to StorageUri field in appsettings.json. WebDAV is public, so username and password should not be required.

Still, the player's field for directories is empty when page reloaded, even the "Loading directories and files from WebDAV" text disappears. In the server log, there is nothing wrong except for one warn sign Failed to determine the https port for redirect.

I quess the problem is just in my lack of information and I would love to make it work.

Thanks

@MikolasFromm
Copy link
Author

MikolasFromm commented May 7, 2021

Ok, after some digging, I've found out how to set the URI and RootFolder correctly, so that the request is in the https://example.com/webdav form.

Now when "StorageUri": "https://example.com/" and "RootFolder": "/webdav/" is set correctly, I get another error in a console of the Ubuntu server:

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at WebDav.AudioPlayer.Client.MyWebDavClient.<>c.<FetchChildResourcesAsync>b__3_0(WebDavResource r) in /home/mecool/WebDAV-AudioPlayer/src/WebDAV-AudioPlayer/Client/MyWebDavClient.cs:line 54
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Threading.Tasks.Task.WhenAll[TResult](IEnumerable`1 tasks)
   at WebDav.AudioPlayer.Client.MyWebDavClient.FetchChildResourcesAsync(ResourceItem parent, CancellationToken cancellationToken, Int32 maxLevel, Int32 level) in /home/mecool/WebDAV-AudioPlayer/src/WebDAV-AudioPlayer/Client/MyWebDavClient.cs:line 77
   at Blazor.WebDAV.AudioPlayer.Pages.IndexBase.RefreshTreeAsync() in /home/mecool/WebDAV-AudioPlayer/src/Blazor-WebDAV-AudioPlayer.v2/Pages/Index.razor.cs:line 276
   at Blazor.WebDAV.AudioPlayer.Pages.IndexBase.OnAfterRenderAsync(Boolean firstRender) in /home/mecool/WebDAV-AudioPlayer/src/Blazor-WebDAV-AudioPlayer.v2/Pages/Index.razor.cs:line 136
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'dWyRY9wzdHt2atmwv5CZPJZZdua6CWqDUeM2tA1udQw'.
System.NullReferenceException: Object reference not set to an instance of an object.
   at WebDav.AudioPlayer.Client.MyWebDavClient.<>c.<FetchChildResourcesAsync>b__3_0(WebDavResource r) in /home/mecool/WebDAV-AudioPlayer/src/WebDAV-AudioPlayer/Client/MyWebDavClient.cs:line 54
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Threading.Tasks.Task.WhenAll[TResult](IEnumerable`1 tasks)
   at WebDav.AudioPlayer.Client.MyWebDavClient.FetchChildResourcesAsync(ResourceItem parent, CancellationToken cancellationToken, Int32 maxLevel, Int32 level) in /home/mecool/WebDAV-AudioPlayer/src/WebDAV-AudioPlayer/Client/MyWebDavClient.cs:line 77
   at Blazor.WebDAV.AudioPlayer.Pages.IndexBase.RefreshTreeAsync() in /home/mecool/WebDAV-AudioPlayer/src/Blazor-WebDAV-AudioPlayer.v2/Pages/Index.razor.cs:line 276
   at Blazor.WebDAV.AudioPlayer.Pages.IndexBase.OnAfterRenderAsync(Boolean firstRender) in /home/mecool/WebDAV-AudioPlayer/src/Blazor-WebDAV-AudioPlayer.v2/Pages/Index.razor.cs:line 136
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

Would you, please, give me a little hint, how to make it work @StefH? The only thing I know is that this error occurs when I hit the webdav - if the URI or RootFolder is wrong and not pointing to the real webdav, the error doesn't show up.

Many thanks,

MeCool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant