cancel
Showing results for 
Search instead for 
Did you mean: 

HTML5 Application in Fiori Launchpad

Former Member
0 Kudos

Hi Experts!

I've developed my very own UI5 application in the Web IDE and it runs successfully as an HTML5 application in the HCP. This far everything is as expected and works awesome!

But... (here it comes) When I register my application to the Fiori launchpad it perfectly creates a tile like I've specified. But when I open the Launchpad (not the application yet) my console already shows errors.

GET https://flpportal-<USER>.dispatcher.hanatrial.ondemand.com/sap/opu/odata/UI2/PAGE_BUILDER_PERS/Chips('<GUID>') 500 (Internal Server Error)

and

Error in OData response for GET "/sap/opu/odata/UI2/PAGE_BUILDER_PERS/Chips('<GUID>')": HTTP request failed - {"requestUri":"/sap/opu/odata/UI2/PAGE_BUILDER_PERS/Chips('<GUID>')","statusCode":500,"statusText":"Internal Server Error","headers":[],"body":"<html><head><title>Error report</title></head><body><h1>HTTP Status 500 - An internal application error occurred.\nRequest: <USER>:flpportal</h1></body></html>"} sap.ui2.srvc.PageBuildingService

and

Failed to load chip instance -  sap.hana.uis.flp.model.UISFioriModel

This might have to do with the next couple of errors that I am getting when I open my application I have created with the wizard.

Because when I try opening my application I can see the application within a blink of my eye before I get "Error" - "Application can not be opened; try again later."

In the console I can see a couple of errors about files that can not be loaded like i18n files. These do not seem relevant for the issue. (Please tell me if they do so I can post the errors.)

In the console I can also see a "console.log()" I've created in my Component.js. This should indicate the Component has been found by the launchpad.

Next shows the error by which I'm confused. Because this does not seem to be an issue in the Web IDE testing, nor in the HTML5 application version on the HCP which I deployed.

The error is:

Application initialization failed due to an Exception:

RangeError: Invalid time value

    at Date.toISOString (native)

    at Controller.extend.onInit (https://flpportal-s0014664366trial.dispatcher.hanatrial.ondemand.com/sap/ha…i/undefined/com/quinso/m...)

When I look into the code line it indeed shows an toISOString:


days = Appconfig.getConfig("/root/settings/Tiles/DaysBack");

  date_time_begin_param = (new Date(new Date() - ( days * 3600000)));

  date_time_begin_param = date_time_begin_param.toISOString();

(I've added some more context to the code so there is a more broad view of what I'm trying to do.)

Next in the console this shows:

RangeError - Invalid time value appTitle

This I think is particularly strange since this is an static string. Perhaps this is not the proper understanding on my part.

Last I've got the error that also shows on the screen "App can not be opened; try again later"

I've tried creating a fresh application and export my code from a work in progress project into a new fresh project. This by creating a new UI5 application by template in the Web IDE.

I really no not know anymore where I have to search for a solution. So if you have any idea, please let me know.

Thanks in advance and thanks for reading,

Kind regards,

Max

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Max,

Please refer to SAP Fiori Launchpad CPv2

In the app's neo-app.json file under routes section you define its routing.

For every route there you should have two mappings:

  1. A route for the app in FLP.
  2. For testing purposes - a route for the app to work as  a standalone.

For example, if you want your app to fetch some files from another Fiori app that is running you should have follwoing mappings:


{

      "path": "/sap/ui5/1/resources/sap/cus",

      "target": {

        "type": "application",

        "name": "libreuse",

        "entryPath": "/sap/cus"

      },

      "description": "HCM Lib Reuse"

    },

{

      "path": "/resources/sap/cus",

      "target": {

        "type": "application",

        "name": "libreuse",

        "entryPath": "/sap/cus"

      },

      "description": "HCM Lib Reuse"

    }

Best,

Sapir

Former Member
0 Kudos

Hi Max,

is 'days' parameter hold any numeric value? if it's undefined it can be your problem.

I suggest to check any parameter you read from config and set some default value in case when undefined returned.

If this will not solve the problem , let's have a phone call on Monday, so we can debug it together.

Best regards,

Yan