Closed Aisse-258 closed 4 years ago
Hi @Aisse-258, the most practical way for you to run a locally hosted desktop app with a locally hosted web app is the following:
Local Webapp Configuration
ENFORCE_HTTPS
to true
in .env.localhost
APP_BASE
to https://localhost:8081
in .env.localhost
yarn start
Local Desktop Configuration
electron/src/lib/CertificateVerifyProcManager.ts
so its setCertificateVerifyProc
function always returns with a positive checkyarn start --env=https://localhost:8081
CertificateVerifyProcManager.ts
export const setCertificateVerifyProc = async (
request: CertificateVerifyProcProcRequest,
cb: (verificationResult: number) => void,
): Promise<void> => {
return cb(CertificateVerificationResult.SUCCESS);
}
Does that work for you?
Hello. No it doesn't work. .Web application shows "too many redirections" and when running yarn start --env=https://localhost:8081 for desktop it throws many errors
Hi @Aisse-258, I just verified the workflow and here is how it should roll for you:
1. Web Application
.env
file in the root of "wire-webapp" (see below for contents)yarn
in "wire-webapp"yarn start
in "wire-webapp".env
file
APP_BASE="https://localhost:8081"
BACKEND_REST="https://prod-nginz-https.wire.com"
BACKEND_WS="wss://prod-nginz-ssl.wire.com"
CSP_EXTRA_CONNECT_SRC="http://localhost:32123, ws://localhost:32123, https://*.zinfra.io, https://*.wire.com, https://api.raygun.io, wss://*.zinfra.io, wss://prod-nginz-ssl.wire.com, https://wire.count.ly"
CSP_EXTRA_IMG_SRC="https://*.zinfra.io, https://*.wire.com"
CSP_EXTRA_SCRIPT_SRC="http://localhost:32123, https://*.zinfra.io, https://*.wire.com, https://api.raygun.io"
ENFORCE_HTTPS="false"
FEATURE_ENABLE_DEBUG="true"
PORT="8081"
2. Desktop Application
yarn
in "wire-desktop"yarn start:localhost
in "wire-desktop"I just tried all of the above and it worked like a charm. ✨
Hello. Thank you very much for this instructions, I really can run both applications after doing it. But there is another problem appeared. I can not to log in into my account. It is just redirecting me to the authorisation page again. And it also throws errors when I am trying to log in:
Hello. Thank you for previous instructions. I tried to launch a desktop application with a web application on a localhost. I have some problems with the fact that the web version is connecting via https, and the desktop version is connecting via http. In the .env file I found an option which could impact on connection type of web application (ENFORCE_HTTPS) and it can not do it now. Using "git bisect" I found out that it stopped to work on one of next commits:
Presumably on 9b9785d10a5558881f8573bb080b5235c5e4607b but it was not possible to build application on any of them to check. My problem is that desktop application is not working with localhost web application while using different connection type. And even if I make them same it is not working too.