Skip to content
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

bug: Opening and closing IonSelect crashes Chrome (Aw, Snap!) #30084

Open
3 tasks done
vs-jdefting opened this issue Dec 13, 2024 · 3 comments
Open
3 tasks done

bug: Opening and closing IonSelect crashes Chrome (Aw, Snap!) #30084

vs-jdefting opened this issue Dec 13, 2024 · 3 comments
Labels

Comments

@vs-jdefting
Copy link

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When I open and close an IonSelect nested in an IonHeader, chrome crashes with an "Aw, Snap!". This issue seems to be specific to the arm64 build of Chrome on Apple Silicon. Chrome does not crash on Intel chips.

  • Chrome version: Version 131.0.6778.140 (Official Build) (arm64)
  • Computer: Apple MacBook M2 Max (macOS 14.2.1 (23C71))
    <IonApp>
      <IonPage>
        <IonHeader>
          <IonSelect label="Open then close me"></IonSelect>
        </IonHeader>
        <IonContent>some content</IonContent>
      </IonPage>
    </IonApp>

Expected Behavior

Opening and closing IonSelect does not crash the webpage.

Steps to Reproduce

  1. Be on an Apple Silicon M1/M2/M3 computer
  2. Go to https://stackblitz.com/edit/s31z8pdq-rmne6pwu?file=src%2Findex.tsx
  3. Click "Open then close me"
  4. Close the modal
  5. The page should crash
Screen.Recording.2024-12-13.at.4.10.55.PM.mov

Code Reproduction URL

https://stackblitz.com/edit/s31z8pdq-rmne6pwu?file=src%2Findex.tsx

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/jdefting/Library/pnpm/global/5/.pnpm/@Ionic+cli@7.2.0/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.4.1 (/Users/jdefting/visiostack/vs/frontends/infra-frontend/node_modules/.pnpm/@Ionic+react@8.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@ionic/react)

Capacitor:

Capacitor CLI : 6.1.2
@capacitor/android : 6.1.2 (/Users/jdefting/visiostack/vs/frontends/infra-frontend/node_modules/.pnpm/@capacitor+android@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/android)
@capacitor/core : 6.1.2 (/Users/jdefting/visiostack/vs/frontends/infra-frontend/node_modules/.pnpm/@capacitor+core@6.1.2/node_modules/@capacitor/core)
@capacitor/ios : 6.1.2 (/Users/jdefting/visiostack/vs/frontends/infra-frontend/node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios)

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v18.19.0 (/Users/jdefting/.nvm/versions/node/v18.19.0/bin/node)
npm : 10.2.3
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Dec 13, 2024
@dgreasi
Copy link

dgreasi commented Dec 20, 2024

I am experiencing the same issue only in particular browsers and OS.

The crash occurs when the select modal is being dismiss (either by selecting an option or dismissing)

I am using the following in my code:

<IonSelect
  className="flex-center-center-column-nowrap padding-l-16"
  shape="round"
  color="light"
  interface="action-sheet"
  value={language.value}
  cancelText={t('SHARED.CANCEL')}
  onIonChange={onChange}>
  {getSelectOptions()}
</IonSelect>

Result:
Screenshot 2024-12-20 at 4 48 08 PM

I can replicate it consistently in:

  • Brave - macOS
  • Chrome - macOS

I was unable to replicate the crash in the following browsers/OS:

  • Firefox - macOS
  • Safari - macOS
  • Safari - iOS
  • Firefox - Ubuntu
  • Brave - Ubuntu
  • Chrome - Ubuntu
  • Brave - Android
  • Chrome - Android
  • Chrome - Windows

So I guess it's specific to macOS with arm CPU (Mac Studio M2 Max)

I have tested if the behaviour changes if the value of interface is different but I got the same crash.

My environment:

"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",

Node: v18.18.2
OS : macOS 15.1.1

It my have something to do with the css being used in this component. Found this.

@nadavhalfon
Copy link

Happens also when using a controlled modal and then dismissing it

@Sagie501
Copy link

Sagie501 commented Dec 23, 2024

Happens to me as well. I am opening a modal using useIonModal and after dismissing it either by the modalController.dismiss() nor the dismiss function from the useIonModal it crash. I tested it on Chrome and Safari and it happened only on Chrome.

Note: When I am clicking on the backdrop, the modal closes and doesn't crash, it crashes only when I am calling the dismiss function.

My environment:

Chrome version: 131.0.6778.205 (Official Build) (arm64)
Computer: Apple M1 Pro (macOS 14.5)

"@ionic/react": "^8.4.1"
"@ionic/react-router": "^8.4.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants