-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
GLib-GObject-CRITICAL error with last gatsby-transformer-sharp #16957
Comments
Try adding these at the top of your const sharp = require('sharp')
sharp.simd(false)
sharp.cache(false) See #6291 (comment) |
I just tried this and am still having the same error:
|
I have a similar issue after upgrading on OSX. May be related to #9751 |
Also experiencing this issue locally on OSX as well as on my CircleCI build which is running on a linux container. They seem to fail in different locations though? Locally I get
But on CircleCI I get
|
Downgrading to |
Yes I was going to say I believe this error actually started to happen once I upgrade |
I guess, it is more than downgrading
To be precise what I did, I used https://github.com/bonsaiilabs/gatsby-material-ui-storybook-starter/pulls?q=is%3Apr+is%3Aclosed After downgrading
I still face the isse when I run
|
I downgraded these since they were upgraded yesterday as well and am still getting the same error. `"gatsby-plugin-sharp": "^2.2.12", "gatsby-remark-images": "^3.1.14", Here's my full system info: ` System: Binaries: Languages: Browsers: npmPackages: |
You both look to not downgrade actually, the version range you specify
Try pinpointing it directly to Also, you may try removing |
@RomanHotsiy, 🥇 thanks a ton for pointing that out. I confirm that by replacing the version in
The
|
woo, that worked! thanks so much @RomanHotsiy! |
I dig a bit more and it looks to start crashing starting from It looks to be caused by upgrading I event don't know who to @ mention here as this PR was created by @renovate-bot and merged by @gatsbybot 😄 |
Could people try running |
@lovell Does the error above look familiar? |
@RomanHotsiy Thanks for investigating! Let's wait on @lovell (Sharp maintainer) to see if this is a known issue before we merge in #16971 In the mean time, sorry for the trouble, folks! Please use
|
|
@jrusso1020 If that's the case then this is not a bug since rebuilding is necessary for native modules and Not sure why it isn't rebuilt at postinstall though
This shouldn't be necessary unless your |
@sidharthachatterjee I think the problem is that sharp was cached and when using You're right though about CircleCI, I'm not sure why I had problems there |
You were probably caching Anyway, looks like this isn't a bug then. Still keeping this open for a while until the issue author and others are good! 🙂 |
The If so, please see lovell/sharp#1680 (comment) for some previous advice on how Gatsby might be able to manage this. |
rolling back to 2.2.12 on gatsby-plugin-sharp got me back up and running too @RomanHotsiy; Thanks for all the ongoing support everyone😻 |
This is looking resolved with the latest release for gatsby and version 2.2.16. |
@lovell Hope all is well with you and thank you for the quick response. Opened a new issue in #16985 to track this so we can improve the experience for the next time vips is upgraded. We do some handling in https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-sharp/src/safe-sharp.js but need to handle this edge case as well I think. Thanks everyone! |
Hi guys, I'm afraid that I'm still experiencing this issue. I've tried the latest version of the libraries in question, as well as a number of permutations in between. I've also tried clearing node_modules and npm rebuild, but still can't get past this one.
It doesn't look like there are any conflicting versions of sharp in the tree, see below.
Any ideas on where to go next? |
I can confirm that rolling all dependencies that make sure of Sharp to ones that use 0.21.1 avoids the issue, but clearly, this is not a long term solution.
|
Upgrade npm packages via npm audit Had to set "gatsby-plugin-sharp" to "2.2.12". GitHub issue: gatsbyjs/gatsby#16957
I just had this problem after upgrading an old project (a few months old). What seems to have worked around it for me was switching to Yarn, with the resolutions config above (#16957 (comment))
|
I'm getting identical problems here with latest versions of related plugins
|
I confirm downgrading the packages worked for me. specifically the sharp pkg: npm i gatsby-plugin-sharp@2.2.9
npm i gatsby-transformer-sharp@2.2.5 I remember to actually run the bash commands on my terminal to set up my |
I documented a fix for this on some other ticket. basically it's caused by two mismatching versions of 'sharp' which are deps of other packages.
fixed it for me at least |
@LekoArts Should this really be closed? Seems like this is an ongoing issue. |
solution here:
check you don't have any version mismatches with sharp. |
@dcsan I would call that a workaround rather than a solution since people will keep running into this problem if it requires manual work to avoid. Also, what would be the ➜ yarn list --pattern sharp
yarn list v1.17.3
├─ favicons@5.4.1
│ └─ sharp@0.22.1
├─ gatsby-plugin-sharp@2.2.27
├─ gatsby-transformer-sharp@2.2.19
└─ sharp@0.23.1 |
well that's unfortunate that favicons still seems stuck on an old sharp. As far as I can tell it's a very deep problem to have two versions of sharp co-existing. We're dependent on the packages updating to use the same sub-deps of sharp. also FWIW I stopped using yarn because of various problems with C extensions and native compiling. npm also has a cache now so i think the speed difference isn't so noticeable. I just installed latest favicons and indeed get that same problem.
my app will still start but I guess it's because of the image cache or sharp not getting triggered.
however still starts... so it's hard to even know how to trigger this nasty problem. from my side I just removed the favicons package for now, as I seem to have favicons anyway. |
Required to work locally, see gatsbyjs/gatsby#16957 (comment)
So to summarise, it appears that we're hitting this when multiple versions of However, we should probably improve the experience if people are hitting this using multiple gatsby plugins (like Let's track that in #16985 Since the original issue opened by the author here seems to be resolved, I'm closing this issue for now. Thank you all of you for participating in this and have a great weekend 🎉 |
I spent 2 days on this issue and here's how I finally found salvation
Then I had GLib GObject-CRITICAL errors and I checked for different versions of sharp
and
In the end I believe from my google searching that the issue resides with different versions of sharp
I looked at the gatsby-transformer-sharp and it's version was off so I saw in the repo that it has the correct version of sharp but my gatsby-transformer-sharp was an older version. I upgraded to
|
In my case, I have
that both use
which is indeed the version in
I also have in
And I have deleted
*I'm in yarn workspaces *Just updated in #16985 since that issue is the one I think remains open for this issue |
For me the issue was
Removing that plugin solved my issue with this... |
I had same issues on ubuntu 18.04, then I run the following step:
It works for me. |
Was experiencing the same issues, working with yarn as package manager. What worked for me was running |
Description
Hey all,
Since I updated all of my packages I have been unable to run
gatsby develop
norgatsby build
.The builder is able run all of my static and page queries and then fails once it reaches the
start webpack server
process.I have tried reinstalling all of my node modules, updating glib through brew, I've also tried to run on several different environments.
(Other OSX computers are getting the same error for me, whilst my Ubuntu machine can run develop and build fine)
Actual result
Once
gatsby develop
gets tostart webpack server
it throws the following as errors and then the develop process stops.(sharp:65167): GLib-GObject-WARNING **: 16:35:38.095: cannot register existing type 'VipsObject'
(sharp:65167): GLib-CRITICAL **: 16:35:38.095: g_once_init_leave: assertion 'result != 0' failed
(sharp:65167): GLib-GObject-CRITICAL **: 16:35:38.095: g_type_register_static: assertion 'parent_type > 0' failed
(sharp:65167): GLib-CRITICAL **: 16:35:38.095: g_once_init_leave: assertion 'result != 0' failed
Environment
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/local/bin/python
Browsers:
Chrome: 76.0.3809.100
Safari: 12.1.2
npmPackages:
gatsby: ^2.13.72 => 2.13.75
gatsby-background-image: ^0.8.5 => 0.8.5
gatsby-graphiql-explorer: ^0.2.4 => 0.2.6
gatsby-image: ^2.2.10 => 2.2.11
gatsby-plugin-catch-links: ^2.1.4 => 2.1.4
gatsby-plugin-favicon: ^3.1.6 => 3.1.6
gatsby-plugin-feed: ^2.3.7 => 2.3.7
gatsby-plugin-google-analytics: ^2.1.8 => 2.1.8
gatsby-plugin-humans-txt: ^1.1.3 => 1.1.3
gatsby-plugin-manifest: ^2.2.6 => 2.2.8
gatsby-plugin-no-sourcemaps: ^2.1.1 => 2.1.1
gatsby-plugin-offline: ^2.2.7 => 2.2.9
gatsby-plugin-page-transitions: ^1.0.8 => 1.0.8
gatsby-plugin-react-helmet: ^3.1.4 => 3.1.4
gatsby-plugin-s3: ^0.3.2 => 0.3.2
gatsby-plugin-sass: ^2.1.10 => 2.1.11
gatsby-plugin-sharp: ^2.2.15 => 2.2.15
gatsby-plugin-styled-components: ^3.1.2 => 3.1.2
gatsby-plugin-transition-link: ^1.12.4 => 1.12.4
gatsby-remark-copy-linked-files: ^2.1.7 => 2.1.9
gatsby-remark-images: ^3.1.13 => 3.1.15
gatsby-remark-prismjs: ^3.3.6 => 3.3.7
gatsby-remark-responsive-iframe: ^2.2.5 => 2.2.7
gatsby-remark-smartypants: ^2.1.3 => 2.1.4
gatsby-source-filesystem: ^2.1.10 => 2.1.13
gatsby-source-instagram: ^0.5.1 => 0.5.1
gatsby-transformer-remark: ^2.6.15 => 2.6.17
gatsby-transformer-sharp: ^2.2.7 => 2.2.9
npmGlobalPackages:
gatsby-cli: 2.7.36
gatsby: 2.13.75
Any help would be fantastic
The text was updated successfully, but these errors were encountered: