facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.62k stars 24.29k forks source link

Tried to show an alert while not attached to an Activity #46201

Closed birdofpreyru closed 1 month ago

birdofpreyru commented 1 month ago

Description

Migrating my existing libraries / apps from RN@0.74 to the latest RN@0.75.2. Using new architecture, targeting Android. Got Tried to show an alert while not attached to an Activity error when calling Alert.alert('abc', 'def');. Seems to be a regression of an old bug #13439?

P.S.: No, I had no chance yet to check whether it is reproducible in a clean RN app.

Steps to reproduce

Above.

React Native Version

0.75.2

Affected Platforms

Runtime - Android

Areas

Other (please specify)

Output of npx react-native info

N/A

Stacktrace or Logs

N/A

Reproducer

N/A

Screenshots and Videos

No response

react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
cipolleschi commented 1 month ago

@birdofpreyru could you provide a reproducer using this template? You can add whichever library you need to make the reproducer work.

It's quite hard for us to help out if we don't know how to repro it.

cipolleschi commented 1 month ago

It seems to work fine on my side... Am I missing something?

https://github.com/user-attachments/assets/56e7c5a4-a05f-4b9e-b84c-55b0c9fb0e42

birdofpreyru commented 1 month ago

Hmm... it works now for me as well 0.o Tried everything that comes to my mind — the older commit at which I was when reporting it, a clean build, a few different Android versions in the emulator... still no problem anymore.