You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?
Yes - 0.7.2
What are the steps to reproduce?
Prerequisites:
Host machine running Windows 10 Pro (10.0.19042)
Using Ubuntu/WSL2 (via VSCode) to run development environment
Building a React+Electron app (using electron-forge + Webpack + React)
sharp is installed and configured as an external in Webpack config
Using npm start in development, GUI is output to X11 window
VcXsrv is used to access the X11 window from the Windows host
In the React app, simple button invokes the following function:
Error: Input file has corrupt header: jpegload: parameter filename not set
Running the same function in a test file directly in the WSL2 shell (zsh) works fine, and an output file is produced. I am therefore confident that the input file is not a problem.
What is the expected behaviour?
Input file should be read correctly.
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
I don't think so. As you can see from the above prerequisites, it's quite complex. I have a hunch about it which I'll mention after completing the template.
Are you able to provide a sample image that helps explain the problem?
Not relevant - no image being produced, and the input image doesn't seem to relate to the issue.
What is the output of running npx envinfo --binaries --system?
Reviewing the docs, I came across the recommendation to ensure that the arch/platform when running npm install matches the runtime arch/platform. Unless I'm fundamentally missing something, I believe it does. I am not building an Electron binary for a Windows target (yet - so it will be relevant when I do), and the Node process that electron-forge is executing to run my app in development is running within the WSL2 container (i.e. on Ubuntu). I'm simply access the GUI via X11 from the Windows host machine. I can't logically think of a reason why this would impact the result, but I don't really have any other ideas.
I fully expect that this is something very specific to do with my setup, and not necessarily a bug within sharp - but I would be very grateful for any pointers you can offer.
Thanks!
The text was updated successfully, but these errors were encountered:
Are you using the latest version? Is the version currently in use as reported by
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?Yes -
0.7.2
What are the steps to reproduce?
Prerequisites:
sharp
is installed and configured as anexternal
in Webpack confignpm start
in development, GUI is output to X11 windowThis results in the error:
Running the same function in a test file directly in the WSL2 shell (zsh) works fine, and an output file is produced. I am therefore confident that the input file is not a problem.
What is the expected behaviour?
Input file should be read correctly.
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
I don't think so. As you can see from the above prerequisites, it's quite complex. I have a hunch about it which I'll mention after completing the template.
Are you able to provide a sample image that helps explain the problem?
Not relevant - no image being produced, and the input image doesn't seem to relate to the issue.
What is the output of running
npx envinfo --binaries --system
?Supplementary info
Reviewing the docs, I came across the recommendation to ensure that the arch/platform when running
npm install
matches the runtime arch/platform. Unless I'm fundamentally missing something, I believe it does. I am not building an Electron binary for a Windows target (yet - so it will be relevant when I do), and the Node process thatelectron-forge
is executing to run my app in development is running within the WSL2 container (i.e. on Ubuntu). I'm simply access the GUI via X11 from the Windows host machine. I can't logically think of a reason why this would impact the result, but I don't really have any other ideas.I fully expect that this is something very specific to do with my setup, and not necessarily a bug within
sharp
- but I would be very grateful for any pointers you can offer.Thanks!
The text was updated successfully, but these errors were encountered: