Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[xdl] Handle errors when trying to sign the manifest #3148

Merged
merged 4 commits into from
Jan 29, 2021

Conversation

fson
Copy link
Contributor

@fson fson commented Jan 28, 2021

When the ManifestHandler tries to sign the manifest (requested by the client), automatically handle typical errors and fall back to offline mode:

@fson fson requested a review from brentvatne January 28, 2021 15:20
Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, i think this is a nice solution to our owner field problems. just need to fix the warnings raised by linter then ship it

packages/xdl/src/project/ManifestHandler.ts Outdated Show resolved Hide resolved
packages/xdl/src/project/ManifestHandler.ts Outdated Show resolved Hide resolved
manifestString = await getManifestStringAsync(manifest, hostInfo.host, acceptSignature);
} else if (error.code === 'ENOTFOUND') {
// Got a DNS error, i.e. can't access exp.host, warn and enable offline mode.
addSigningDisabledWarning(projectRoot, 'Not connected to internet.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For users in countries where you might need a VPN, this could be confusing. They could have access to "the internet" but not exp.host.

  • Maybe rewording this to "Could not reach the Expo servers" might be better?
  • Or even better, add tips for the user to manually test/fix connection (e.g. "Could not reach Expo servers, please check if you can access exp.host")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, I'll update the wording here.

@fson fson merged commit 7952d90 into master Jan 29, 2021
@fson fson deleted the @fson/manifest-signing-fallback branch January 29, 2021 15:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants