-
Notifications
You must be signed in to change notification settings - Fork 181
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
In iphone shows error maximum call stack exceeded error while importing country-sate-city ,but working in android , window and mac #184
Comments
do you have some info about this bug? I am facing the same problem |
I've resolved the issue by creating my own package called `usa-state-city`,
as I only need information about the USA for my project. The problem was
occurring in a Vite project using the `country-state-city` package, and it
only showed a "maximum call stack error" on iPhone. This error was due to
the large JSON file used by the package, which contains information for all
countries.
If you're using Vite instead of CRA and encountering similar issues, I
suggest either using CRA scripts or creating your own package for specific
country information. This way, you'll only include the necessary JSON data
for that country, rather than the entire world's data.
Hope it helps ,What do you think ?
…On Wed, 10 Jul, 2024, 7:34 pm Martín Fenocchio, ***@***.***> wrote:
do you have some info about this bug? I am facing the same problem
—
Reply to this email directly, view it on GitHub
<#184 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6L2VDNLW42B66MGQAAIZLTZLU5PXAVCNFSM6AAAAABJ5UBIQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQGYYDCNZRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Getting this too, so bizzare - deffo what @shahidforsdlc large non-async JSON imports on mobile cause memory issue, will try an async approach and revert back on this issue. |
I fixed it this way with async:
Since it's now async, becomes troublesome as need to run a side affect in react, so used a hook:
|
This issue still exists. I don't think this package is being managed anymore... |
I ran into some major problems in production with this issue. As an Android user, wasnt using any emulators to test on iOS and my web app just blew up for iOS users...took me around 2-4 hours to find the culprit |
The text was updated successfully, but these errors were encountered: