on 11-24-2021 3:59 PM
Hi,
I am in the middle of testing the migration of former WebIDE projects.
So I migrated a project with Fiori tools succesfully but when I want to preview the application, a browser window open without any backend data.
The VSCode Terminal shows the following:
ypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new NodeError (node:internal/errors:371:5)
at new ClientRequest (node:_http_client:158:11)
at Object.request (node:https:353:10)
at Array.stream (C:\Git\gkvuipaacdd\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31318:74)
at ProxyServer.<anonymous> (C:\Git\gkvuipaacdd\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31081:21)
at HttpProxyMiddleware.<anonymous> (C:\Git\gkvuipaacdd\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30183:32)
at Generator.next (<anonymous>)
at fulfilled (C:\Git\gkvuipaacdd\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30157:58)
Hi nils_janssen,
I am happy to announce that we released a new version of the "@sap/ux-ui5-tooling", namely 1.5.1. The new version contains a fix that should resolve the proxy issue that you are facing.
Best regards,
Zdravko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for the fix.
I had to add the corporate proxy ip and set ignoreCertError to true but now it is working for us.
Hello nils_janssen,
I believe that I was able to find the root cause of the issue, but I need your help verify it. Please try the following:
1. Add the "--https" flag to the "start" script in the "package.json" of your application. It should look like this e.g.
"start": "fiori run --https --open test/flpSandbox.html"
2. Execute "npm run start" in the terminal and follow the process of creating a certificate.
Once the certificate is created and the local server is started over HTTPS, then the application should load successfully.
Hope this helps!
Best regards,
Zdravko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nils_janssen,
thank you for testing! Meanwhile I was able to investigate further. I believe that the issue occurs for Node.js versions > 12. Could you please share what Node.js version you have installed? If you are using Node.js version greater than > 12, then could you please downgrade to Node.js version 12 and try again?
You can use nvm (https://github.com/nvm-sh/nvm/blob/master/README.md) to easily switch between Node.js versions.
Best regards,
Zdravko
Hi all,
I am very sorry for the late reply but I had other things to do.
Anyway, the error message is a different now. After I created a Fiori elements app in VS Code and made it running with the simple proxy, I then migrated the project because I wanted to use the fiori tools.
But when I try to start the application, I get the following error:
Error: Cannot find module 'keytar'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nils_janssen,
could you please try re-installing the "node_modules" in your applications? It is best to first delete the "node_modules" folder, and also the "package-lock.json". And then to execute "npm install" in terminal in the root folder of the project.
Hope this helps!
Best regards,
Zdravko
By the default the fiori-tools-proxy
will read the proxy configuration from the Node.js environment variables proxy
, https-proxy
and noproxy
. If those variables are not set, then you can also provide the proxy configuration in the ui5.yaml
file. Please note: if you want to exclude any domains from the proxy then you will need to set the noproxy
variable, e.g. npm config set noproxy "sap.com"
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nils,
I am suspecting this might stem from ui5.yaml configuration and its use.
Could you please share the ui5.yaml file and which npm script you use for the preview?
Kind regards,
Oksana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Lernen Sie das neue plattformübergreifende PowerShell kennen – https://aka.ms/pscore6
PS C:\Git\gkvuipaacau> cd "c:\Git\gkvuipaacau"
PS C:\Git\gkvuipaacau> npm run start
> gkv.uipa01.acau@0.0.1 start
> fiori run --open test/flpSandbox.html?sap-client=099#xGKVxPA01_C_ACAU-display
ApplicationInsights:CorrelationIdManager [
Error: connect EACCES 13.69.106.215:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -4092,
code: 'EACCES',
syscall: 'connect',
address: '13.69.106.215',
port: 443
}
]
info server:ux-proxy Starting fiori-tools-proxy using following configuration:
info server:ux-proxy proxy: 'https://yyyyyyyyyyyy:3128/'
info server:ux-proxy ignoreCertError: 'true'
info server:ux-proxy backend: [{"path":"/sap","url":"https://xxxxxxxxxxx.de:8433/","client":"099","destination":"COT"}]
info server:ux-proxy ui5: {"url":"https://ui5.sap.com","version":"1.84.21","path":["/resources","/test-resources"],"directLoad":false}
info server:ux-proxy debug: 'true'
info server:ux-proxy Backend proxy started for https://xxxxxxxxxxx.de:8433/ /sap
Error: Cannot find module 'keytar'
Require stack:
- C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\middleware\middlewareRepository.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\middleware\MiddlewareManager.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\server.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\index.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\lib\cli\commands\serve.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\yargs\index.cjs
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\bin\ui5.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.36183 (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:92130:18)
at __webpack_require__ (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:92258:42)
at getKeytar (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:75325:16)
at Object.exports.getSecureStore (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:75364:24)
at new exports.HybridStore (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:74853:43)
at new exports.SystemDataProvider (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:74958:29) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Git\\gkvuipaacau\\node_modules\\@sap\\ux-ui5-tooling\\dist\\middlewares\\fiori-tools-proxy.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\middleware\\middlewareRepository.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\middleware\\MiddlewareManager.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\server.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\index.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\lib\\cli\\commands\\serve.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\yargs\\index.cjs',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\bin\\ui5.js'
]
}
Could not "require('keytar')". Trying VSCode's copy
Error: Cannot find module 'vscode'
Require stack:
- C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\middleware\middlewareRepository.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\middleware\MiddlewareManager.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\lib\server.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\@ui5\server\index.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\lib\cli\commands\serve.js
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\node_modules\yargs\index.cjs
- C:\Git\gkvuipaacau\node_modules\@ui5\cli\bin\ui5.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.37549 (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:92226:18)
at __webpack_require__ (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:92258:42)
at getKeytar (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:75332:22)
at Object.exports.getSecureStore (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:75364:24)
at new exports.HybridStore (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:74853:43)
at new exports.SystemDataProvider (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:74958:29) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Git\\gkvuipaacau\\node_modules\\@sap\\ux-ui5-tooling\\dist\\middlewares\\fiori-tools-proxy.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\middleware\\middlewareRepository.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\middleware\\MiddlewareManager.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\lib\\server.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\@ui5\\server\\index.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\lib\\cli\\commands\\serve.js',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\node_modules\\yargs\\index.cjs',
'C:\\Git\\gkvuipaacau\\node_modules\\@ui5\\cli\\bin\\ui5.js'
]
}
Could not get hold of vscode
Dummy store. Trying to retrieve for service: fiori/v2/system, key: https://xxxxxxxxxxx.de:8433/099
[HPM] Proxy created: / -> https://xxxxxxxxxxx.de:8433/
[HPM] Subscribed to http-proxy events: [ 'error', 'proxyReq', 'proxyRes', 'close' ]
info server:ux-proxy UI5 proxy started for https://ui5.sap.com
[HPM] Proxy created: (_pathname, req) => {
// Avoid ERR_CONTENT_DECODING_FAILED on http request for gzip'd html files
// e.g. /test-resources/sap/ui/qunit/testrunner.html?testpage=%2Ftest%2Ftestsuite.qunit.html&autostart=true
const acceptHeader = req.headers['accept'] || '';
if (req.headers['accept-encoding'] &&
(acceptHeader.includes('text/html') || acceptHeader.includes('application/xhtml+xml'))) {
delete req.headers['accept-encoding']; // Don't accept compressed html files from ui5 CDN
}
return true;
} -> https://ui5.sap.com
[HPM] Proxy rewrite rule created: "/resources" ~> "/1.84.21/resources"
[HPM] Proxy rewrite rule created: "/test-resources" ~> "/1.84.21/test-resources"
[HPM] Subscribed to http-proxy events: [ 'error', 'proxyReq', 'proxyRes', 'close' ]
info server:liveload Livereload middleware started for port 35729 and path C:\Git\gkvuipaacau\webapp
Server started
[HPM] Rewriting path from "/test-resources/sap/ushell/bootstrap/sandbox.js" to "/1.84.21/test-resources/sap/ushell/bootstrap/sandbox.js"
[HPM] GET /test-resources/sap/ushell/bootstrap/sandbox.js ~> https://ui5.sap.com
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new NodeError (node:internal/errors:371:5)
at new ClientRequest (node:_http_client:158:11)
at Object.request (node:https:353:10)
at Array.stream (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31318:74)
at ProxyServer.<anonymous> (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31081:21)
at HttpProxyMiddleware.<anonymous> (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30183:32)
at Generator.next (<anonymous>)
at fulfilled (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30157:58)
[HPM] Rewriting path from "/resources/sap-ui-core.js" to "/1.84.21/resources/sap-ui-core.js"
[HPM] GET /resources/sap-ui-core.js ~> https://ui5.sap.com
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new NodeError (node:internal/errors:371:5)
at new ClientRequest (node:_http_client:158:11)
at Object.request (node:https:353:10)
at Array.stream (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31318:74)
at ProxyServer.<anonymous> (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:31081:21)
at HttpProxyMiddleware.<anonymous> (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30183:32)
at Generator.next (<anonymous>)
at fulfilled (C:\Git\gkvuipaacau\node_modules\@sap\ux-ui5-tooling\dist\middlewares\fiori-tools-proxy.js:30157:58)
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.