Closed chrismills closed 5 months ago
Hey @marianfoo I was playing with this a bit more and undeployed the central package and instead tried decentral deployment and it loads ok that way....but aware i'll have issues re-using in multiple apps, or maybe i just need to start with my own central template from scratch?
Hi @chrismills thank you for opening the issue. I wrote Public Cloud because i was expecting it would work the same. It is just a component deployment.
In a production scenario the app should only load the component-preload file. As you have already written, since the preload was not found, the others are loaded.
Did you deploy it with this app? https://github.com/spreadsheetimporter/packed-deployment-abap
A little background: If you make a decentralized deployment, the component is deployed in the app and is then available in the app index. This means you could also use it in other apps. What the app mentioned above does is exactly the same, only as a separate app. The problem is, for example, if you now update the component in the app, the version disappears from the index. That's why it's better to deploy the components in a dedicated app (and i also don´t recommend decentral deployment anymore)
As long the component is in the app index. then you can use it in other apps as well.
So, the preload should be available also in the public cloud system, so i don´t understand the difference to the normal system, especially when you tested it on a on-premise system.
You can also insert the component to preload at the start, but should be the same result in all scenarios:
"sap.ui5": {
"flexEnabled": true,
"dependencies": {
"minUI5Version": "1.120.13",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"componentUsages": {
"spreadsheetImporter": {
"name": "cc.spreadsheetimporter.v1_1_1"
}
},
if possible, can you do a central deployment and post the return from https://<MY_S4HC_HOST>.s4hana.cloud.sap/sap/bc/ui2/app_index/ui5_app_info?id=cc.spreadsheetimporter.v1_1_1
Maybe both public cloud and onpremise.
Again, i can´t really explain a difference. Whats the current release from the on-premise system?
Hey Marian, thanks for your quick reply and sorry for my slow one! I was hoping to grab some logs with my current solution vs the cloned central deployment but i've had to work on another project the last few days. I'll be working on this again in the next couple of days and will attach the comparison.
Good work with the project, from the testing i've done so far it looks great, things like the upload preview and handling files with errors is excellent.
Be in touch soon
Hi Marian,
I've spent some time this evening looking at it and identified the cause - it's case sensitive urls.
In the packed deployment app's manifest within the embeds section here you refer to the components in camel case
thirdparty/customControl/spreadsheetImporter/v1_1_1
however if you look at the /dist folder after doing a build you can see the subfolders under thirdparty are all just lowercase. The above results in the
https://
returning the camelCase url:
Interestingly it appears the ICF is not case sensitive for component files as you can see below:
but is case sensitive for Component-preload.js and many others:
It appears it initially worked inside my own project not using the central deployment as your documentation has the correct details which I must have copied:
but this is not reflected in the sample packed deployment app https://github.com/spreadsheetimporter/packed-deployment-abap/blob/main/webapp/manifest.json
I haven't checked my on prem S4 2021 system but presume it must not be case sensitive unlike S4 2402 Public Cloud
Ah, thanks for debugging! That's a really stupid mistake on my part, I corrected it immediately in the repo. https://github.com/spreadsheetimporter/packed-deployment-abap/commit/9c05c66d33a1236726529feb4b53e82dc3d29739 Ideally, a redeployment should be enough Can you please try that?
But interesting that this is not the same error on-premise.
I just checked and in a S/42023 the URL is lowercase.
The descriptorURL
is not lowercase. What is it in the public cloud system? The screenshot is cut off.
Wow super quick response thanks Marian :) I just pulled and the changes look good, there's one more extra complication on public cloud - the BSP path will be blocked unless the manifest defines a tile for the app (sap.app->crossNavigation->outbounds as this gives it a FLP descriptor which can then be assigned to an IAM app, then added to a business catalog, then added to a role and finally you get access.
I'll add the tile now and confirm back, just takes a little while for it to activate it all. I'll also send through some more info on these extra steps for public cloud so you can add it to docs.
Ok looks good, typo on my last comment that its the inbounds in crossNavigation, not outbounds. Below is a diff of the edit I made for this:
Which when I deploy creates the "FLP App Descriptor":
Which can then be assigned to an IAM app:
And this can then be added to a business catalog and then in the launchpad assigned to a business role and the role to users.
This does mean there is a random tile users can find for the central deployment app but not a big deal, without all the above you get "Blocked by UCON".
Let me know if you want any more info on the above for the docs, I'll close this ticket now since its working
Thanks again :)
Chris
Thanks @chrismills i created two new issues to improve this. I will ping you when i created the PRs so you can check if the improvments are ok
@chrismills what do you think about this? https://github.com/spreadsheetimporter/ui5-cc-spreadsheetimporter/pull/585 any information missing?
Hey Marian, looks good only comment i'd say is my crossNavigation inbounds settings were a bit rough just for testing so you might want to potentially rename some of the properties like below which also adds i18n. PS I think a typo here (should be parameters?)
Don't mind what you call all these though, whatever suits naming conventions in rest of project :)
flpTitle=Spreadsheet Importer flpSubtitle=Carrier app
"crossNavigation": {
"inbounds": {
"SpreadsheetImporter-display": {
"semanticobject": "SpreadsheetImporter",
"action": "display",
"title": "{{flpTitle}}",
"subTitle": "{{flpSubtitle}}",
"signature": {
"parameters": {},
"additionalParameters": "allowed"
}
}
}
}
@chrismills i fixed that, thank you!
OData Version
OData V4
Draft
Yes
Scenario
Fiori Elements
Environment
BAS, S4HC Public Cloud
UI5 Spreadsheet Component
1_1_1
What happened?
I've deployed the packed deployment app to S4 public cloud system, deployment is fine and I can check the component via the url:
https://.s4hana.cloud.sap/sap/bc/ui2/app_index/ui5_app_info?id=cc.spreadsheetimporter.v1_1_1
However, getting 403's for several files in public cloud. I've deployed the same project to a S4 on-prem system and it works ok there. Not sure why certain files don't seem to load on public cloud.
Above query for app info returns the below path: /sap/bc/ui5_ui5/sap/z_xup_comp/thirdparty/customControl/spreadsheetImporter/v1_1_1
If I open a browser and enter below urls:
https:///sap/bc/ui5_ui5/sap/z_xup_comp/thirdparty/customcontrol/spreadsheetimporter/v1_1_1/Component.js
S4 2402 Public Cloud: Success
S4 2021 On Premise: Success
https:///sap/bc/ui5_ui5/sap/z_xup_comp/thirdparty/customcontrol/spreadsheetimporter/v1_1_1/Component-preload.js
S4 2402 Public Cloud: 403 - Not found
S4 2021 On Premise: Success
https:///sap/bc/ui5_ui5/sap/z_xup_comp/thirdparty/customcontrol/spreadsheetimporter/v1_1_1/controller/SpreadsheetUpload.js
S4 2402 Public Cloud: 403 - Not Found
S4 2021 On Premise: Success
And this is where things get interesting: https:///sap/bc/ui5_ui5/sap/z_xup_comp/thirdparty/customcontrol/spreadsheetimporter/v1_1_1/controller/Util.js
S4 2402 Public Cloud: Success
S4 2021 On Premise: Success
No other file in the controller sub-folder loads except Util.js which I have no idea why. Since the Component-preload.js doesn't load on public cloud its trying to load each of the other files instead of the bundled (preload) version which these also fail.
The docs mentions works on all platforms including cloud, so was wondering if you've had experience deploying to public cloud and any idea why it might be blocking certain resources?
I checked the zip file that is uploaded on deploy to ensure it contains these files which it does.
Thanks :) The project looks really good, i'd love to use it in current public cloud work!
Relevant log output
Spreadsheet Component Init
Manifest