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

Fix app crash on prod #1794

Open
wants to merge 13 commits into
base: v1.x-2022-07
Choose a base branch
from
Open

Fix app crash on prod #1794

wants to merge 13 commits into from

Conversation

wizardlyhel
Copy link
Collaborator

@wizardlyhel wizardlyhel commented Jul 4, 2022

Description

So far, the most consistent way to reproduce this bug is to:

  1. Open a tab to hydrogen.shop
  2. Leave it alone for 10 mins (and no one in the world is requesting for the site - might be easier to use a development oxygen instance to reproduce)

Edit: Tried to reproduce this error in preview but was not able to. Gonna make a custom prod environment in admin to see if we can reproduce the error that way

Error we are seeing:

  1. "Field 'cart' doesn't exist on type 'QueryRoot'" - This is happening on the CartQuery($id: ID!... query. - Suspecting this might be caused by an expired cart id. However, this should be a client-side network request and shouldn't make the app crash

  2. From server log ERROR: Failed to connect to the Storefront API: Unable to parse response: and ERROR: {} were observed. It seems that we got no response from SFAPI for some reason.

Error seems to be happening on the SFAPI. In order to get more information, we need to place some logging to help us track down this bug:

  • Surface x-request-id in server log for useShopQuery requests

Additional context


Before submitting the PR, please make sure you do the following:

  • Read the Contributing Guidelines
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123)
  • Update docs in this repository according to your change
  • Run yarn changeset add if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2022

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset.
If the changes are user-facing and should cause a version bump, run "yarn changeset add" to track your changes and include them in the next release CHANGELOG.
If you are making simple updates to examples or documentation, you do not need to add a changeset.

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

Successfully merging this pull request may close these issues.

1 participant