Skip to Content
0

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

Feb 09, 2017 at 11:17 AM

362

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Jamie Cawley
Feb 14, 2017 at 07:15 PM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Jamie Cawley
Feb 09, 2017 at 02:03 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Jamie Cawley
Feb 09, 2017 at 08:08 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Jamie Cawley
Feb 13, 2017 at 04:08 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Jamie Cawley
Feb 14, 2017 at 02:37 PM
0

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?childToView=129550#answer-129550

Regards,

Jamie

SAP - Technology RIG

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0