stackblitz / webcontainer-core

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

[@webcontainer/api] vite stopped working in chrome mobile #997

Open paoloricciuti opened 1 year ago

paoloricciuti commented 1 year ago

Describe the bug

I think a new version of vite broke webcontainers on chrome mobile

If you try to navigate on a brand new sveltekit project in chrome mobile it will get stuck on vite dev (or vite build for what is worth it).

Also note that this broke every other instance of webcontainers...if I navigate to a brand new sveltekit project and than go to https://clack.cc which uses webcontainer api the cli doesn't work there either even tho they don't use vite.

Link to the blitz that caused the error

https://sveltekit.new

Steps to reproduce

  1. Open chrome mobile
  2. Go to sveltekit.new
  3. Observe that the command get stuck to vite dev

Expected behavior

I should be able to run vite dev on a webcontainer.

Parity with Local

Screenshots

No response

Platform

Additional context

I'm not talking only about stackblitz: I'm using @webcontainer/api for a personal project and it happens there too.

fvsch commented 1 year ago

No issue here with up-to-date Chrome on Android.

Can you give more information on what versions of Android and Chrome you are you using? Any extensions or specific settings (e.g. blocking third-party cookies)?

paoloricciuti commented 1 year ago

Screenshot_2023-03-11-13-10-21-364_com android chrome

Screenshot_2023-03-11-13-13-21-040_com android chrome

Despite this if I go on webcontainers.io it says my configuration is blocking webcontainer. On my project instead it boot the webcontainer fine and it is able to run npm I but than is stuck on vite (the same happens on stackblitz)

paoloricciuti commented 1 year ago

Update: rebooting my phone fixes this problem in part: now the problem does not persist between refreshes at least. On stackblitz I can start a fresh project sometimes, when I can't I get presented with an error regarding not enough memory to allocate wasm. On my personal project tho I still have no luck. I can run other commands fine but as soon as I try to start vite it gets stuck.

Also I forgot to mention that the process that I spawn on webcontainer is jsh and it's actually jsh that runs vite, I don't know if this can help pin down the issue.

paoloricciuti commented 11 months ago

Small update on this. I was made aware of eruda that allows you to have console on mobile so I was able to get the error:

Screenshot_2023-09-03-13-49-25-799_com android chrome