Web Report not shown (blank tab) in HTML5

We have a working web report opening from UI action button in Flash. It shows a web page (API generated) with some information an buttons calling other Origam APIs - see attached image. But there is blank screen in HTML5 version (2021.2.0.2059). The web report code is pretty simple - standard HTML tags, CSS and Javascript code for buttons. Any suggestion what could be wrong? Thank you.

Flash version:

HTML5 version:

Check network traffic (maybe you get 400 or 500 error). If you get OK 200 then please check the HTML behind it and eventually post it here.

To check traffic I need to run it in http mode (not https). But I’m not able to login when I change the urls in appsettings.json to http only. I can se in the log the following error:

Hosting environment: Production
Content root path: C:\inetpub\html5test3
Now listening on: http://*:83/
Application started. Press Ctrl+C to shut down.
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
      Failed to determine the https port for redirect.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie 'idsrv.session' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie '.AspNetCore.Identity.Application' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie 'idsrv.session' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie '.AspNetCore.Identity.Application' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie 'idsrv.session' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie '.AspNetCore.Identity.Application' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie 'idsrv.session' has set 'SameSite=None' and must also set 'Secure'.
warn: Microsoft.AspNetCore.Http.ResponseCookies[1]
      The cookie '.AspNetCore.Identity.Application' has set 'SameSite=None' and must also set 'Secure'.

HTTP is not currently supported. What I meant by network traffic was from the browser’s developer tools (F11).

There is the following :

there is error in developer console as well:

Looks to me that the redirect is wrong. If I see correctly it goes to

/inernalApi/Report/api/dailyPlan

while I suppose you wanted it to go to

/api/dailyPlan

Maybe you have to fix the web report’s URL? The internal API is now on a different path than it used to be (/internalApi).

So what URL should I use?
Web report config is:
image

API page url is:
image

Just add / to the web report’s URL so it gets a proper redirect. So /api/dailyPlan.

Added / to the beginning of URL, but error persist.

Then maybe your API handling is not configured properly? You have to include the path in either public or restricted routes. See API settings of HTML5 Origam - #2 by JiriPrajz.

I know about API settings in appsettings.json. I already tried to set it as PublicRoutes. There is /api/public in PublicRoutes and I tried both variants - change the Web report and API page path to /api/public/dailyPlan (didn’t work) and then to api/public/dailyPlan (didn’t work as well). See attached images.
/api/public/dailyPlan error:

api/public/dailyPlan error:

With api/public/dailyPlan I can access the page directly via URL https://10.10.10.252:9443/api/public/dailyPlan?id=... but not via the UI action web report button.

So. The API page itself should have api without the slash – since that works for you if you try manually. And the report (link) has to have the slash (/api) since that makes the browser redirect correctly.

This works only when the URL is defined in PublicRoutes. When it is defined in RestrictedRoutes or it is used directly - path as /api/PageName (api/PageName), it doesn’t work. Even the direct URL to the report is not working, if it is not defined in PublicRoutes.

Can you please paste the route configuration here?

"RestrictedRoutes": [
      "/api/private"
	  
    ],
    "PublicRoutes": [
      "js",
	  "/js",
	  "/css",
	  "/api/public"
	 ]

Please make sure ALL these points are true:

  • The API URL is set to api/private/dailyPlan
    Prove: You can access this path manually from your browser
  • The report’s URL is set to /api/private/dailyPlan
    Prove: Network shows that you try to access this URL, not the one beginning with internalApi/...
  • The following URL is present under RestrictedRoutes: /api/private
    Prove: You can access this from your browser when logged in but not when logged out

If all this works, then it must work from within the action button as well.

These settings work well. Thank you. It will be necessary to update all Web reports in model.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.