添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

we are running into errors which seem to be connected with working behind a corporate proxy.

In the following two use cases the data is not downloaded fully from the internet.

1. Fiori Application Generator > Minimum SAPUI5 version list is not complete

When generating a app with the Fiori Application Generator only the major versions are listed. When using fiori tools with VSC on a private notebook without proxy a lot more versions are listed ( app-generator-minimum-sapui5-version.jpg ).

2. Testing App preview show blank page

When testing the generated app with "npm start" the page opened in the browser is blank ( empty-app-preview.jpg , terminal-app-preview.jpg ).

When testing on a private notebook without proxy the "launchpad layout" is shown.

  • We are using the newes version of fiori tools extension pack and node.js.
  • The proxy settings are configured in .npmrc and in the windows env variables.
  • We also tried using python px-proxy as workaround as it was helpful in a older version of fiori tools when we had issues with loading the app templates through corporate proxy. But it also did not bring the desired result. I am adding the log output of py-proxy: px-proxy-log-for-app-generator.txt , px-proxy-log-for-app-preview.txt
  • Can you please advise how we can use Fiori Tools behind coperate proxy?Best regardsLisa Schmidtchen

    Hi Lisa,

    I have discussed this issue some more with colleagues. The proxy with authentication should be supported with our tooling. Can you please try the following:

    - The version of UI5 that the application was generator with is quite old. This is because the generator was unable to find an updated list dynamically due to the proxy issues. Can you please update the ui5.yaml file with a later version of UI5 as follows (note the version property at the end):

    ui5: path: - /resources - /test-resources url: https://ui5.sap.com version: 1.108.0

    After you do this, please try and start the application in preview mode and see if it works?

    Also, please update the logging level in the Generator as follows:

    - Launch the settings in VSCode and search for "Wizard"

    - You should see an entry "Application Wizard: Logging Level". Please change this to "debug" and restart VS Code

    - Re-launch the generator, and when you get the the "project attributes" step, please see what output for the Generator is in the console. It should detail if it cannot reach the UI5 list to dynamically retrieve the versions.

    Thanks,

    Ian

    Hi Ian,

    we now analyzed the issue deeper together with our colleague from the network department.

    The problem is that he tool tries to access an external source directly with a GET command:

    GET https://ui5.sap.com/neo-app.json HTTP/1.1
    Accept: application/json, text/plain, */*
    X-Csrf-Token: Fetch
    User-Agent: axios/0.26.0
    host: ui5.sap.com
    Proxy-Authorization: Basic […]
    Connection: close

    HTTP/1.1 400 Bad Request
    Cache-Control: no-cache
    Pragma: no-cache
    X-XSS-Protection: 1
    Content-Type: text/html; charset=utf-8
    Proxy-Connection: close
    Connection: close

    However, since the tool is behind a proxy, a CONNECT must first occur for a successful GET command:

    Example:

    CONNECT webanalytics2.cfapps.eu10.hana.ondemand.com:443 HTTP/1.1
    Proxy-Authorization: Basic […]
    Host: webanalytics2.cfapps.eu10.hana.ondemand.com
    Connection: close

    HTTP/1.1 200 Connection established

    This issue is the same for the following use cases:

    • Loading the UI-Versions (Fiori Application Generator > Minimum SAPUI5 version list is not complete - @sap/fiori:app.@sap/generator-fiori)
    • Testing App preview (npm run start) show blank page when the app was generated with version 1.71.0.
      Apps generated for versions > 1.71.0 (1.84.0 and above) can connect to the internet without problems. Also when we generate a app with version >=1.84.0 and switch the minUI5Version in the manifest.json to 1.71.0 afterwards the App preview is displayed correctly.

    The following sites were requested requested with a simple GET instead of a CONNECT and therefore received a 400 Bad Request

    Also the Explore and Install Generators-Link on the first page of the Application Generator seems to have the same issue. Here are also GET-requests instead of CONNECT requests. For the same sites as above and also the request for this site: https://registry.npmjs.com/-/v1/search?text=+%40sap%2Fgenerator-fiori+keywords%3Ayeoman-generator+&s...

    Best Regards
    Lisa

    Hi Lisa,

    Thanks for your update. Yes, I can see that you seem to have the proxy configured as needed within Fiori tools :(. The reason you are seeing a reduced set of ui5 versions in the generator is because the generator tries dynamically to retrieve the updated list from https://ui5.sap.com/neo-app.json , but it can't reach and therefore has to default to a smaller static set.

    It definitely looks like, even if the proxy is set, it's not allowing the connection to succeed. And I think this is proven by your point that outside of the corporate proxy it works. If you have all the env variables and settings already defined, (this might seem like a silly question) can you confirm that the proxy is working and the settings reflect it? Also, does your proxy need authentication?

    Thanks,

    Ian

    Hi Ian,

    thank you for digging deeper into my problem!

    of course, it is not so easy to look into the proxy itself. Yes we need credentials for the proxy but they are set correctly in the npm-settings. The settings in npm work for downloading new js-packages when I use the update / install commands of npm. Also, the output of the terminal is different when I disconnect completly from wifi.

    The env variables are used by VSCode for the download and installation of new extensions so here also seems to be a working proxy scenario.

    The logs from px-proxy have a bit more information. Here it seems, that the connection through proxy can be established to webanalytics2.cfapps.eu10.hana.ondemand.com:443 but the final log entry is: "Connection closed by server".

    ... Curl info: Establish HTTP proxy tunnel to webanalytics2.cfapps.eu10.hana.ondemand.com:443

    ... Sent header => CONNECT webanalytics2.cfapps.eu10.hana.ondemand.com:443 HTTP/1.1

    ... Sent header => Host: webanalytics2.cfapps.eu10.hana.ondemand.com:443

    ... Sent header => Proxy-Connection: Keep-Alive

    ... Received header <= HTTP/1.1 200 Connection established

    ... Curl info: Proxy replied 200 to CONNECT request

    ... Curl info: CONNECT phase completed

    ... Curl info: Connection #0 to host [...] left intact

    ... Getting active socket

    ... SSL connected

    ... "CONNECT webanalytics2.cfapps.eu10.hana.ondemand.com:443 HTTP/1.1" 200 -

    ... Starting select loop

    ... Connection closed by server

    Unfortunately I am out of ideas what to try next...

    Regards

    Lisa

    Hi there,

    Please see the following guided answers document regarding proxy support in VSCode:

    https://ga.support.sap.com/dtp/viewer/index.html#/tree/3046/actions/45995:48363:53593:53499

    Can you please also ensure that under 'Settings' in VSCode, you have correctly set your proxy settings so that VSCode can use it.

    Regards,

    Ian

    Hi Ian,

    thank you for your reply.

    The settings are all in place. Neither the proxy settings of npm nor the of windows enviroment or VSCode itself seem to help.

    As you can see in the screenshot terminal-app-preview.jpg the fiori-tools-proxy are logging the usage of proxy-settings which I put in the ,npmrc file but they still do not load everything.

    The network trace in the browser show that the sandbox.js and sap-ui-core.js (http://localhost:8080/test/flpSandbox.html?sap-client=500&sap-ui-xx-viewCache=false) return a 404.

    Regards,

    Lisa

    New Partner Content on SAP Business Accelerator Hub (Q2 ’24) in Technology Blogs by SAP Part 5 - SAP MDG – A Stepping Stone for SAP S/4HANA Journey in Technology Blogs by Members The mature, comprehensive SAP mobile experience is the best way to enjoy SAP in Technology Blogs by SAP