Empty page error

@adam

I cannot see an reason for this error message. Can you tell us why this is required?
I came across this while starting prototyping my project and is a bit annoying.
But this is just my opinion :wink:

 There was an error with your Endpoint for this page. You need to return at least one component from the Endpoint.

OK I checked my code again and the error message was a bit confusing for me because the problem is:

I am having two endpoints this are in conflict.

  • /user - static page
  • /user/:ID - dynamic page with params

after changing the dynamic page to e.g. /object/user/:ID anything is working fine.

@adam
It would be great if i can use the endpoint /user/:ID (this should be possible as I am using the same structure in ASP.Net Core)
And maybe the error message should also be changed or maybe this is only confusing me :slight_smile:

@adam

OK I came across another root error:

If a page is using the -Endpoint page parameter instead of -Content I am getting the following error.

There was an error with your Endpoint for this page. You need to return at least one component from the Endpoint.

Even if the page is having component output:

New-UDPage -Url '/identity/user' -Endpoint {
    New-AppBar -Titel 'User'

    New-UDTextbox -Id 'txtTextfield' -Label 'First Name' 
}

This is bad because as far as I can see out of my test an dynamic page requires -Endpoint as a page. Otherwise I am getting the following error (a better error message would be great if this is the case):

New-UDPage : Object reference not set to an instance of an object.

This is my dynamic page:

New-UDPage -Url "/object/identity/user/:ID" -Endpoint {
    param($ID)

    New-AppBar -Titel "User [$ID]"
    
    New-UDTextbox -Id 'txtUser' -Label 'user' -Value $ID
}

PS: sorry for being a bit confusing but started working on this v3 and there is a lot new stuff.

A sum up is required:

  • use enpoint path /user and /user/:id (I cannot test this with v3 because of the bug below, but this was the case in v2.9)
  • pages using -Endpoint instead of -Content doesnt work anymore - There was an error with your Endpoint for this page. You need to return at least one component from the Endpoint.
  • Error message that a dynamic page requires an -Endpoint instead of a -Content page (if this is the case but getting an error if changing to -Content) - New-UDPage : Object reference not set to an instance of an object.

Thanks for the report. We will get these solved for beta2.

1 Like

Should I open issues or will you do that (or note it down on you to do list)? :slight_smile:

If you don’t mind opening an issue, that would be fantastic. I was going to do so if you didn’t have the time.

No problem … I have to do the other issues … I don’t mind to do some more :slight_smile:

1 Like

Done



@adam

after installing the nightly build the error appears for all my pages (which worked before):

New-UDPage -Name 'Test - Endpoint' -Url "/test/endpoint" -Content {
    New-UDTextbox -Id 'txtTextfield' -Label 'First Name' 
}
New-UDPage -Name 'Test - Endpoint' -Url "/test/endpoint" -Endpoint {
    New-UDTextbox -Id 'txtTextfield' -Label 'First Name' 
}

I wonder if the nightly build was posted before that PR was merged. I removed that error message all together.

Ok that would make sense … is it possible to get the “nightly build” right now in order to let me test anything and can get further … as I am currently stucked because of this problem?

I can kick off the nightly release process manually. Give me a few minutes.

1 Like

Ok. Just released a new version: https://github.com/ironmansoftware/universal-dashboard/releases/tag/nightly.20200330.3

1 Like

I will give it a try and post the result here :slight_smile: thanks

It is working :slight_smile: now I can start working on my project and try out v3 further

1 Like