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

undefined is not a function (evaluating '_iterator2[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]()' #20902

Closed
3 tasks done
ravirupareliya opened this issue Aug 29, 2018 · 21 comments
Labels
Bug JavaScript Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@ravirupareliya
Copy link

ravirupareliya commented Aug 29, 2018

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz
      Memory: 26.43 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.9.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.2.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 27.0.3, 28.0.2
        API Levels: 23, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1 
      react-native: 0.56.0 => 0.56.0 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

Description

I am just using firebase:5.4.1 and while importing firebase variable it is showing error undefined is not a function (evaluating '_iterator2[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]()'

However it is working fine with iOS, issue is only with android. Here i am attaching screenshot of the error.

screenshot_1535540062

Reproducible Demo

I have just used import statement

import firebase from 'firebase'
@dungps
Copy link

dungps commented Aug 30, 2018

#15902 (comment)

I had faced this issue before and I found it.

@ravirupareliya
Copy link
Author

@dungps Yes i have seen that comment, but here issue is i am not using any loop or anything related to iterator. I have just used firebase library and that also just import statement of firebase, nothing else.

@bernacle
Copy link

bernacle commented Sep 3, 2018

@ravirupareliya I have the same issue here! Did you get a solution?

@ravirupareliya
Copy link
Author

@bernacle Not yet with this version, i have downgraded it to 0.55.4

@Asinox
Copy link

Asinox commented Sep 8, 2018

We are in the same page with this error.

@dungps
Copy link

dungps commented Sep 10, 2018

Try this solution. It works for me

#15902 (comment)

@RideShi
Copy link

RideShi commented Sep 17, 2018

We are in the same page with this error.

@NSShentu
Copy link

I have the same issue here

@adirzoari
Copy link

@ravirupareliya @dungps @bernacle @RideShi @nsimmons I have same issue. did you find solution?

@rahimrahman
Copy link

I upgraded to 0.57.2 from 0.55.4 and the only thing that worked for me was to add babel-polyfill.

npm i --save-dev babel-polyfill

then in my index.js:

import 'babel-polyfill';

I did not try what @dungps suggested.

@iamkaustubh1019
Copy link

I had the same issue while using firebase just add this to index.js
global.Symbol = require('core-js/es6/symbol');
require('core-js/fn/symbol/iterator');
require('core-js/fn/map');
require('core-js/fn/set');
require('core-js/fn/array/find');

@JackClown
Copy link

I ran into the same problem when I want to for ... of the response headers of fetch on Android 4.4.4 and RN v0.57.4.
I use @babel/polyfill to solve the problem. It seems the fetch response.headers is not same as Headers
#13450

@gorbyoz
Copy link

gorbyoz commented Feb 5, 2019

@iamkaustubh1019 your solution worked for me!! Thanks.

@tyagogoulart
Copy link

@rahimrahman solution works for me, using react native 0.58.3 with firebase 5.8.2

@lyson13
Copy link

lyson13 commented Feb 12, 2019

@iamkaustubh1019 worked for me. thanks!!!

@iamkaustubh1019
Copy link

@lyson13 your welcome...

@NicholasBertazzonAga
Copy link

Guys, I don't know if this could help but for me was just a catch of a Promise not managed. Still don't get why, usually these errors come out as yellow boxes.

@thearchibold
Copy link

@rahimrahman please could you explain what was the issue and how polyfill was able to fix it. Thank you

@sacowiw
Copy link

sacowiw commented Jun 5, 2019

Same issue too, who can explain this bug?

@stale
Copy link

stale bot commented Sep 3, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 3, 2019
@stale
Copy link

stale bot commented Sep 10, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Sep 10, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug JavaScript Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests