cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Why is my Fiori application no longer working when started from the launchpad (FPS1)?

informatics_lis
Explorer
0 Kudos
321

After upgrading to FPS1, my Fiori application is no longer working, when it is started from the launchpad. Starting it by using its full URL is working fine, but when I run it from the launchpad I get these errors:

Uncaught (in promise) TypeError: this.getRouter().initMaster is not a function
Uncaught (in promise) TypeError: this.getOwnerComponent() is undefined

 I don't get any of them on older system or when the application is hosted on the BTP.

Here is the part of the source code where the errors occur. I can post more if required:


], function (UIComponent, Device, JSONModel, /* ... */) {
"use strict";

/* ... */
return UIComponent.extend("xxx.xxx.Component", {
/* ... */
init: function () {
var mConfig = this.getMetadata().getConfig();

var oParameters = this.getComponentData().startupParameters;
var aUrlParametersForEveryRequest = ["sap-server", "sap-client", "sap-language"];

for (var parameter in oParameters) {
aUrlParametersForEveryRequest.push(parameter);
}

// Create and set the ODataModel
var oModel = models.createODataModel({
urlParametersForEveryRequest: aUrlParametersForEveryRequest,
url: this.getMetadata().getConfig().urlPrefix + this.getMetadata().getConfig().serviceUrl,
config: {
metadataUrlParams: {
"sap-documentation": "heading"
}
},
startUpParams: this.getComponentData().startupParameters
});
this.setModel(oModel);
this._createMetadataPromise(oModel);

// Set the i18n model
this.setModel(models.createResourceModel(mConfig.i18nBundle), "i18n");

// Set the device model
this.setModel(models.createDeviceModel(this.geMode()), "device");

// Set the FLP model
//this.setModel(models.createFLPModel(), "FLP");

// Initialize the error handler with the component
this._oErrorHandler = new ErrorHandler(this);

// Call the base component's init function
UIComponent.prototype.init.apply(this, arguments);

/* ... */

// Create the views based on the url/hash
models.setRouter(this.getRouter());
this.getRouter().initMaster();

What changes do I have to make, so that this application will run on FPS1 system while still being compatible to older systems?

Accepted Solutions (0)

Answers (1)

Answers (1)

mamartins
Active Contributor
0 Kudos