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

"Certificate has expired" when activating the Expo schema #87

Closed
byCedric opened this issue Feb 11, 2022 · 1 comment
Closed

"Certificate has expired" when activating the Expo schema #87

byCedric opened this issue Feb 11, 2022 · 1 comment

Comments

@byCedric
Copy link
Member

byCedric commented Feb 11, 2022

Edit: in version 0.8.0+, the code that could trigger this has been removed and replaced with something more stable.


Description of the bug

There is a known issue related to certificates in the newer vscode. This might result in the following error:

image

Workarounds

There are currently two workarounds to avoid this issue, until vscode fixes the issue. After applying either of the workarounds, simply restart your vscode and the error should be gone.

From the vscode team

Currently, the recommended workaround from the vscode team would be to add "http.systemCertificates": false in your configuration. This would avoid the faulty root certificate and successfully pull in the schema.

After the schema was activated successfully, you can remove this option. We cache the schema to minimize the API calls.

With the Expo schema cache

If you aren't comfortable with disabling the system certificates, you can work around this issue by pre-populating the schema cache. This would be required for every major Expo SDK version your project(s) use.

$ expo init ./temporary --template expo-template-blank@44
$ cd temporary
$ expo doctor
$ cd ..
$ npx rimraf temporary

This creates an empty project using Expo SDK 44, we only need to execute $ expo doctor inside of that to download the Expo schema outside vscode. After you execute this, the schema is written to:

If you use other SDK versions, you can replace 44 with any major version you use.

# Linux
~/.cache/expo/schema-44.0.0.json

# MacOS
~/.expo/cache/schema-44.0.0.json

# Windows
%AppData%\Local\Expo\schema-44.0.0.json

Additional context

@byCedric byCedric pinned this issue Feb 11, 2022
@byCedric byCedric changed the title "Certificate expired" issue when trying to activate the Expo Schema "Certificate expired" issue when trying to activate the Expo schema Feb 11, 2022
@byCedric byCedric changed the title "Certificate expired" issue when trying to activate the Expo schema "Certificate has expired" issue when trying to activate the Expo schema Feb 11, 2022
@byCedric byCedric changed the title "Certificate has expired" issue when trying to activate the Expo schema "Certificate has expired" when activating the Expo schema Feb 11, 2022
@byCedric
Copy link
Member Author

Fixed in vscode versions 1.66+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant