stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.93k stars 171 forks source link

Internal image file not recognized, preventing running app #1614

Open wrlee opened 4 days ago

wrlee commented 4 days ago

Describe the bug

Attempting to rebuild/run a project created on a previous day fails due to page compilations detecting a missing or corrupt image file which was never part of the project. There appears to be a problem with the runtime environment.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-rguyie?file=README.md

Steps to reproduce

After successfully creating and running a project with bolt.new, I downloaded the source and successfully built and ran locally. The following day I uploaded a couple of source file changes but the project failed to run. The errors do not appear related to the source changes.

  1. Open project https://stackblitz.com/edit/stackblitz-starters-rguyie?file=README.md
  2. It loads and attempts to run
  3. After beginning executing after pages are compiling
  4. Page compilations detect a missing or corrupt favicon image files unrelated to the sources which are part of the project.

Here are the errors on the console:

○ compiling /page ...
 X next-app-loader?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!:13
Error: Image import "next-metadata-image-loader?type=favicon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/home/projects/stackblitz-starters-rguyie/app/favicon.ico?__next_metadata__" is not a valid image file. The image may be corrupted or an unsupported format.
 X next-app-loader?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!:13
Error: Image import "next-metadata-image-loader?type=favicon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/home/projects/stackblitz-starters-rguyie/app/favicon.ico?__next_metadata__" is not a valid image file. The image may be corrupted or an unsupported format.
 X next-app-loader?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Fprojects%2Fstackblitz-starters-rguyie&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!:13
Error: Image import "next-metadata-image-loader?type=favicon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/home/projects/stackblitz-starters-rguyie/app/favicon.ico?__next_metadata__" is not a valid image file. The image may be corrupted or an unsupported format.

The project builds and runs on my own machine. I am not sure what is triggering the reference to the image file.

  1. I tried exiting the project and re-entering which rebuilt the project but it failed in the same way.

Expected behavior

I expected the landing page to appear (as it did the previous day). The changes I'd made are unrelated to the landing page so if I'd introduced any problems they would not have been incurred on the initial execution.

Parity with Local

Screenshots

image

Platform

Browser name  = Chrome
Full version  = 130.0.0.0
Major version = 130
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 195071653,
  "usedJSHeapSize": 192349393,
  "jsHeapSizeLimit": 4294705152
}
Hash = d3acb9e1

Additional context

No response