nodebox-runtime icon indicating copy to clipboard operation
nodebox-runtime copied to clipboard

vite-react doesn't work in iOS safari

Open jeetiss opened this issue 2 years ago • 4 comments

Bug report

Packages affected

  • [ ] sandpack-client
  • [x] sandpack-react

Description of the problem

The default vite-react sandpack setup doesn't work in iOS safari

import { Sandpack } from "@codesandbox/sandpack-react";

export default function App() {
  return (
    <Sandpack
      theme="light"
      template="vite-react"
      options={{
        showConsoleButton: true,
        showInlineErrors: true,
        showNavigator: true,
        showLineNumbers: true,
        showTabs: true,
      }}
    />
  );
};

What steps can we take to reproduce the problem?

  • run vite-react in iOS safari
  • safari will die

https://user-images.githubusercontent.com/6726016/223806355-86813d3f-0821-4a44-9e61-99a1e6eb70c6.MP4

Your Environment

Software Name/Version
Sandpack-react version 2.1.2
Browser iOS safari
Operating System iOS 16.0

jeetiss avatar Mar 08 '23 18:03 jeetiss

Hey, thanks for reporting this issue.

This is a known issue on Nodebox, and we're currently beta support iOS Safari, as mentioned here. For some reason, there's a memory leak on iOS Safari that we couldn't figure out how to solve yet, but we will keep you posted when we get it done.

@DeMoorJasper, correct me if I'm wrong.

danilowoz avatar Mar 09 '23 10:03 danilowoz

This is a memory issue with safari in general, really hard to debug as the memory issue is actually in safari itself not our code. (Using 3-5x more memory than chrome) Once we figure out where in safari this happens we might be able to work around it.

This is highly dependent on the device as safari kills itself once it reaches more than half the system memory, so on an iphone 14 pro it works fine (most of the time) but not on iphone 13. We've already done quite a few improvements here, but the main issue is still to be found.

DeMoorJasper avatar Mar 09 '23 10:03 DeMoorJasper

Have you guys now fixed this

iamunadike avatar Sep 28 '24 01:09 iamunadike