on 2017 Feb 09 11:17 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this the same issue as the question below? If so, please close it.
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
79 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.