Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on openssl when activating "Use HTTPS" in settings #147

Open
Gfoulon opened this issue May 24, 2023 · 3 comments
Open

Error on openssl when activating "Use HTTPS" in settings #147

Gfoulon opened this issue May 24, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Gfoulon
Copy link

Gfoulon commented May 24, 2023

When I try to activate "Use HTTPS" in settings on IONIC VSCode extension (v1.44.1 - under Windows11 - OPENSSL version 3.10), I've got the following error message on OUTPUT:

[Ionic] Installing @jcesarmobile/ssl-skip
[Ionic] openssl genrsa -out ca.key 4096
[Ionic] openssl req -config 'c:\Users\gfoul\AppData\Roaming\Code\User\globalStorage\ionic.ionic\cr-ca.txt' -key ca.key -new -x509 -days 3650 -sha256 -out ca.crt
[error] Can't open **"'c:\Users\gfoul\AppData\Roaming\Code\User\globalStorage\ionic.ionic\cr-ca.txt'"** for reading, Invalid argument
5CF30000:error:8000007B:system library:BIO_new_file:no protocol option:crypto\bio\bss_file.c:67:calling fopen('c:\Users\gfoul\AppData\Roaming\Code\User\globalStorage\ionic.ionic\cr-ca.txt', r)
5CF30000:error:10080002:BIO routines:BIO_new_file:system lib:crypto\bio\bss_file.c:77:

[error] Can't open "'c:\Users\gfoul\AppData\Roaming\Code\User\globalStorage\ionic.ionic\cr-ca.txt'" for reading, Invalid argument
5CF30000:error:8000007B:system library:BIO_new_file:no protocol option:crypto\bio\bss_file.c:67:calling fopen('c:\Users\gfoul\AppData\Roaming\Code\User\globalStorage\ionic.ionic\cr-ca.txt', r)
5CF30000:error:10080002:BIO routines:BIO_new_file:system lib:crypto\bio\bss_file.c:77:

Look like it add ' (quote) on filename instead of " (double-quote) but I don't know how to solve this issue.
My goal is to be able to use Nexus browser on devices to test camera usage (which need HTTPS so SSL).

Thank you for your help.

@dtarnawsky dtarnawsky self-assigned this May 24, 2023
@dtarnawsky dtarnawsky added the bug Something isn't working label May 24, 2023
@dtarnawsky
Copy link
Contributor

Hey @Gfoulon,

The option to Use HTTPS on Windows isn't supported yet (triggers the error you found). On a Mac it uses openssl to create a root Certificate Authority and create a signed certificate for the server. There's a bit of work needed to get the same functionality working on a Windows machine. It's on the roadmap as an outstanding issue and this issue will stay open until it is addressed.

@Gfoulon
Copy link
Author

Gfoulon commented May 25, 2023

Ok, thank for your quick feedback.
I tried on a Mac but when opening the app I've got an error "[error][console] {"message":"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “192.168.14.34” which could put your confidential information at risk.","code":"NSURLErrorDomain","errorMessage":"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “192.168.14.34” which could put your confidential information at risk."}" both on the VSCode output console and also on an alert panel on the device.

I have downloaded and installed the cetificate on the device (trough Chrome donwload on the mac then export) but still same issue with the local certificate.

I don't quite understand why this wouldn't work on Windows because except for the error on the path between quotes, the rest of the process seems to work. The same command with double-quotes instead of quotes works in terminal (but I don't know where to placed the generated certificate).

Thank you

@kensodemann kensodemann transferred this issue from ionic-team/vscode-extension May 13, 2024
@cloopadoop
Copy link

@Gfoulon If you have git installed on Windows, add its bin directory to your path variable and the error should be resolved, as the openssl executable it has seems to work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants