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

Node manifest file paths aren't created correctly #33743

Closed
2 tasks done
KyleAMathews opened this issue Oct 30, 2021 · 16 comments · Fixed by #33853
Closed
2 tasks done

Node manifest file paths aren't created correctly #33743

KyleAMathews opened this issue Oct 30, 2021 · 16 comments · Fixed by #33853
Labels
topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) type: bug An issue or pull request relating to a bug in Gatsby

Comments

@KyleAMathews
Copy link
Contributor

Preliminary Checks

Description

Report from Disco
Screen Shot 2021-10-30 at 10 45 33 AM
rd

Reproduction Link

n/a

Steps to Reproduce

n/a

Expected Result

n/a

Actual Result

n/a

Environment

windows

Config Flags

No response

@KyleAMathews KyleAMathews added the type: bug An issue or pull request relating to a bug in Gatsby label Oct 30, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 30, 2021
@tomasbillborn
Copy link

I also experience this in Gatsby Cloud.

The build logs for the preview has no errors in it.

What I can see in the console is shown in the attached image.

gatsby-contentful-preview

@KyleAMathews
Copy link
Contributor Author

KyleAMathews commented Nov 1, 2021

Ok, so maybe not a windows-specific error then

@LekoArts LekoArts added topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 1, 2021
@LekoArts LekoArts changed the title Node manifest file paths aren't created correctly on windows Node manifest file paths aren't created correctly Nov 1, 2021
@TylerBarnes
Copy link
Contributor

TylerBarnes commented Nov 1, 2021

@tomasbillborn that's not an error actually :) those are logs we use to make it easy to debug the UI for customers, it should be 404ing there initially. Make sure you're on the latest version of gatsby and gatsby-source-contentful for it to generate manifest files for previews.

This still seems windows-specific to me

@tomasbillborn
Copy link

I am on latest versions.
It is not doing it initially it keeps retrying forever.

It is the same error in Gatsby Cloud I get as locally.

I am on Windows so locally that might hold up, but is the manifest files built run-time by me or serverside by Gatsby Cloud?

@TylerBarnes
Copy link
Contributor

TylerBarnes commented Nov 1, 2021

@tomasbillborn thanks for the additional info. Can you share your Gatsby Cloud dashboard link, either via email (tyler@gatsbyjs.com) or by opening a Gatsby Cloud support ticket? That will allow us to take look at your site on Gatsby Cloud and figure out what's going on.

@tomasbillborn
Copy link

Sent you the information to your email.

@TylerBarnes
Copy link
Contributor

TylerBarnes commented Nov 1, 2021

Hi @tomasbillborn, thanks for sharing that with me! I had a look, and I'm still investigating, but it appears you're on @next versions of Gatsby packages and somehow this is being resolved to an earlier version of gatsby on Gatsby Cloud (Gatsby version: 3.6.0-next.1, the earliest supported version is 3.13.0). Can you try adding the latest stable versions of packages to see if it will work on Gatsby Cloud?

It looks like we have 2 separate issues here:

  • Windows support for the node manifest API is breaking
  • Your site is resolving to an earlier version of Gatsby on Gatsby Cloud which doesn't support the content sync / node manifest API - which is why it hangs forever in the preview UI.

@tomasbillborn
Copy link

tomasbillborn commented Nov 2, 2021 via email

@KyleAMathews
Copy link
Contributor Author

KyleAMathews commented Nov 2, 2021 via email

@tomasbillborn
Copy link

I deleted all node modules, cleared the cache, deleted the package-lock.json so this should now be updated.

@TylerBarnes
Copy link
Contributor

Thanks @tomasbillborn ! I see it's updated in your dev site and I see some logs related to Content Sync there now 👍 have you been able to try it out from the Contentful side and see if it's working?

btw I'm working on resolving the windows issue today.

@tomasbillborn
Copy link

tomasbillborn commented Nov 2, 2021

Actually for some reason now when both preview webhook and content sync is set, Gatsby Cloud App (in Contentful) throws an error that the preview webhook url is not set (very frustrating).

Had a collegue test it too and he got the same result so I removed the content sync url and fallbacked on previous solution and it is at least working.

I hope this some temp bug they will fix soon. I will get back to you as soon as I can test it.

And great news about the windows bug :)

@TylerBarnes
Copy link
Contributor

@tomasbillborn sorry for the broken experience here! We're aware of that issue as well and are working with Contentful to fix it here contentful/apps#576. A PR was merged this morning which broke the Contentful Gatsby App for Content Sync. We'll be moving the Contentful Gatsby app to our own repo so we have more control over making quick fixes like that in the future.

@tomasbillborn
Copy link

tomasbillborn commented Nov 3, 2021

@TylerBarnes now the Gatsby Cloud App works in Contentful, but the user experince is very bad compared to before.

If I use the previous implementation I instantly get the preview page loaded then I see the loader on the side.

This implementation takes about 15 - 20 sec to find the correct file and then show the preview page.

I also saw "gatsby-source-contentful": "6.2.0-next.0" was available so I upgraded to it, but I still get the same build error from the preview api (on Windows).

@TylerBarnes
Copy link
Contributor

Thanks for the feedback @tomasbillborn! It's definitely slower but there are many benefits to it:

  • Content authors know when builds fail because the UI shows an error. This means they don't have to wait for a long time and then ask a developer why their preview never showed up. They'll know right away that something isn't working.
  • Any contentful entity at any level can be previewed, not just entities that have a direct correlation to a page. So any child entities or referenced entities which have no direct correlation to a page can be previewed if they're queried somewhere on a page in the Gatsby site.
  • It works for all content types with no slug configuration in contentful
  • Brand new pages don't display a 404 when initially opening the preview if the build hasn't completed yet.

We will also be working to speed it up and improve it over time.

@jackonawalk
Copy link
Contributor

@tomasbillborn if you delete the Content Sync URL from your Gatsby Cloud app config in Contentful, Open Preview will fallback to the prior functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants