cancel
Showing results for 
Search instead for 
Did you mean: 

Manifest.json - Cannot read property "settings" of undefined

0 Kudos
2,576

Hi experts!

I am developing a hybrid app on Web IDE and deploying it through HAT to my computer. When deploying to HAT, I get this error:

"(hybrid-toolkit) Get project zip encountered error: Cannot read property 'settings' of undefined"

This error appeared when I changed the manifest.json to add a new property: "sap.mobile". If I remove it, the error disappears. What's the reason for this error?

Thank you!

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Product and Topic Expert
Product and Topic Expert

Under sap.ui5 try adding a default model.

		"models": {
			"": {
				"dataSource": "Z_FIORI_SRV"
			},
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "rte.sap.fiori.decapagem.i18n.i18n"
				}
			}
		},

Regards,

Jamie

SAP - Technology RIG

0 Kudos

It's working! Thank you! I tried your suggestion and now I am able to deploy from Web IDE to HAT my project with the "sap.mobile" property on manifest.

Best Regards,

Luis

Answers (4)

Answers (4)

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Kudos

Is this the same issue as the question below? If so, please close it.

https://answers.sap.com/questions/128500/kapsel-offline-error-while-trying-to-open-store.html?childT...

Regards,

Jamie

SAP - Technology RIG

0 Kudos

It's not the same issue but I think they could be related. This error happens on Web IDE. That issue you mentioned happens to all applications I have created in my experiences to work with the offline plugin.

For this issue I found a workaround but not a comfortable solution. I deployed the application without the OData configurations to HAT and then manually added the configurations and used Cordova to build the project. When running the project I get the error on that question.

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Kudos

I just tried your scenario and had no problems with the app working. In your manifest your dataSources should be relative, the project.json should have the hcpms server info within it which the mobile code will use to concatentate the urls.

Regards,

Jamie

SAP - Technology RIG

0 Kudos

I think I have defined correctly what you are saying.

In projecto.json I have this

"hcpmsServer": "hcpms-p1942165340trial.hanatrial.ondemand.com",
"oDataConfigs": [{
    "hybridOdata": {
        "name": "Z_FIORI_SRV",
        "serviceUrl": "https://hcpms-p1942165340trial.hanatrial.ondemand.com:443/Z_FIORI_SRV/"
    },
    "originOdata": {
        "name": "Z_FIORI_SRV",
        "serviceUrl": "/sap/opu/odata/sap/Z_FIORI_SRV/"
    }
}

And on manifest.json this

"dataSources": {
    "Z_FIORI_SRV": {
        "uri": "/sap/opu/odata/sap/Z_FIORI_SRV/",
	"type": "OData",
	"settings": {
	    "odataVersion": "2.0",
	    "localUri": "localService/Z_FIORI_SRV/metadata.xml"
        }
    }
}

What am I missing? Can you show me the scenario you built so I can compare? I still could not found a solution..

Best Regards

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Kudos

What template did you use and what steps did you take to prepare it for HAT? You may want to generate an app with a kapsel template and compare it...

Regards,

Jamie

SAP - Technology RIG

0 Kudos

To prepare it for HAT I only opened the Project Settings and then navigated to Hybrid App Configuration. There I select the need plugins and set the build for android on Debug mode.

The template is a "basicSAPUI5ApplicationProject".

Thanks again Jamie,

Best Regards

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you sure that entry is not already in the manifest.json? I believe any of the kapsel type template define this automatically. Provide your manifest if you are still having issues.

Regards,

Jamie

SAP - Technology RIG

0 Kudos

Thank you for your answer Jamie !

No, I added the entry manually. My app is a web app that I now want to mobilize. To do that, I have set all the configurations for an Android build with the correct Kapsel and Cordova plugins.

The entry "sap.mobile" gives me an error on Web IDE when deploying to HAT. What I have done was to deploy through HAT without that entry and after on my machine I added the entry to manifest and run the cordova command to prepare and build de APK.

Now, when running the APK I got this error "[-10180] -1305 (MOBILINK_COMMUNICATIONS_ERROR) error 224".

Do you know if the errors are related?

This is my manifest.json file - http://pastebin.com/5DbCD8Uj