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

Maximum Call Stack Size error #123

Open
neilanthonyte opened this issue Oct 6, 2022 · 12 comments
Open

Maximum Call Stack Size error #123

neilanthonyte opened this issue Oct 6, 2022 · 12 comments

Comments

@neilanthonyte
Copy link

Screen Shot 2022-10-06 at 11 49 48 PM

Hi I am having an issue when using the method: `State.getStatesOfCountry`, it shows an error above.
@urwa786
Copy link

urwa786 commented Oct 12, 2022

I am facing the same issue on ios

Error: Maximum call stack size exceeded.

issue appears on launch of app

@eboujobe
Copy link

eboujobe commented Oct 15, 2022

+1, this cost me two days of dev hours. Please fix asap. I am on mobile as well

@ribbonhood
Copy link

ribbonhood commented Oct 16, 2022

+1, Faced the same issue recently. Had to change my import from import { State } from 'country-state-city' to import {getStatesOfCountry} from "country-state-city/lib/state". I don't know what the implications are so please fix or let us know if this is an acceptable workaround.

This workaround doesn't work for Country or City as it appears the functions aren't exported. @harpreetkhalsagtbit any ideas on how to get around this? I've created a PR to add exports for these if that's acceptable.

image

@Lasutriv
Copy link

FYI: I too am experiencing the same issue but intermittently.

@gypsicoder
Copy link

@ribbonhood
Anyway, thank you for posting the workaround.

@RuFang-21
Copy link

@ribbonhood , Does the PR already merged ? I still facing this issues.

@ribbonhood
Copy link

@ribbonhood , Does the PR already merged ? I still facing this issues.

@RuFang-21 I closed the PR as it wasn't fixing the issue at hand.

@FaysalBsata
Copy link

it did fix the issue, you just import it directly, but you have to export the functions (getallcountries... ) and then export default the functions

@tushar33
Copy link

but you have to export the functions (getallcountries... ) and then export default the

Can you explain how to fix this issue?

@jayjaydluffy
Copy link

@harpreetkhalsagtbit you can just use browserstack for example on how it crashes in iOS. I also have a recording of a basic React page which crashes on iPad with it but still fine in an Android tablet. Can you please direct us how to fix this?

@harpreetkhalsagtbit
Copy link
Owner

Reduced bundle size a little bit. @jayjaydluffy Can you check with the latest version.

@eleonorsomosot
Copy link

+1. I'm facing the same issue. Did someone was able to fix it?

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

No branches or pull requests