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: react: useIonAlert fails in production (but works in dev) #24116

Closed
4 of 6 tasks
burggraf opened this issue Oct 25, 2021 · 2 comments
Closed
4 of 6 tasks

bug: react: useIonAlert fails in production (but works in dev) #24116

burggraf opened this issue Oct 25, 2021 · 2 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report v6 issues specific to Framework v6

Comments

@burggraf
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Using useIonAlert() in an Ionic React 6.x project works in dev mode (ionic serve) but silently fails in production (ionic build --production).

Basically, any use of alert dialogs fails in production, but works fine in the local dev server. Super annoying.

Expected Behavior

Clicking the TEST button should bring up the test alert dialog just as it does in ionic serve mode.

Steps to Reproduce

Here's a full test repo for you:

https://github.com/burggraf/ionic-react-alert-bug

Let me know if you need anything else to reproduce this. I have verified this is specific to 6.x. Compiling with ionic build --prod seems to work fine in the 5.x environment.

Code Reproduction URL

https://github.com/burggraf/ionic-react-alert-bug

Ionic Info

Ionic:

   Ionic CLI       : 6.17.1 (/Users/markb/.nvm/versions/node/v14.16.0/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 6.0.0-rc.0

Capacitor:

   Capacitor CLI      : 3.2.5
   @capacitor/android : not installed
   @capacitor/core    : 3.2.5
   @capacitor/ios     : not installed

Utility:

   cordova-res : 0.15.3
   native-run  : 1.5.0

System:

   NodeJS : v14.16.0 (/Users/markb/.nvm/versions/node/v14.16.0/bin/node)
   npm    : 7.17.0
   OS     : macOS Big Sur


Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 25, 2021
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report v6 issues specific to Framework v6 labels Oct 28, 2021
@ionitron-bot ionitron-bot bot removed the triage label Oct 28, 2021
willmartian added a commit that referenced this issue Nov 11, 2021
@willmartian
Copy link
Contributor

This issue has been resolved in #24191, and the fix will be available in Ionic v6.0.0-rc.3. Thanks everyone!

@ionitron-bot
Copy link

ionitron-bot bot commented Dec 11, 2021

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report v6 issues specific to Framework v6
Projects
None yet
Development

No branches or pull requests

3 participants