Storybook: Cant run storybook Error: undefined is not a function(evaluating '_iterator[typeof Symbol === "function"?Symbol.iterator:"@@iterator"]()')

Created on 18 Jan 2019  路  9Comments  路  Source: storybookjs/storybook

Describe the bug
When trying to run storybook with React native 0.57 on android emulator, I get the following error
undefined is not a function(evaluating '_iterator[typeof Symbol === "function"?Symbol.iterator:"@@iterator"]()')
I can fix this by following this comment https://github.com/facebook/react-native/issues/15902#issuecomment-396963357 and update jsc android versions, but it feels like quite a workaround for having story book in our project.

To Reproduce
Steps to reproduce the behavior:
Create a new react project with RN 0.57
Follow the storybook setup guide
Try to run the project

Expected behavior
Show story book

Code snippets

undefined is not a function (evaluating '_iterator2[typeof Symbol === "function" ? Symbol.iterator : "@@iterator"]()')
handleUpdate
    index.delta?platform=android&dev=true&minify=false:63392:198
add
    index.delta?platform=android&dev=true&minify=false:63472:19
registerWarning
    index.delta?platform=android&dev=true&minify=false:61477:28
warn
    index.delta?platform=android&dev=true&minify=false:61435:34
metroRequire
    index.delta?platform=android&dev=true&minify=false:83:21
<unknown>
    index.delta?platform=android&dev=true&minify=false:253500:31
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:253480:23
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:252509:53
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:252378:31
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:251863:63
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:251815:50
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:251539:52
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:251527:31
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:248078:28
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:247681:52
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:247648:34
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:85589:54
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:158:38
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
<unknown>
    index.delta?platform=android&dev=true&minify=false:1365:48
loadModuleImplementation
    index.delta?platform=android&dev=true&minify=false:262:14
guardedLoadModule
    index.delta?platform=android&dev=true&minify=false:150:47
metroRequire
    index.delta?platform=android&dev=true&minify=false:88:92
global code
    index.delta?platform=android&dev=true&minify=false:265634:4

System:

  • OS: Linux
  • Device: Google pixel (Emulator)
  • Framework: react native
  • Version: 4.1.7
react-native has workaround inactive question / support

Most helpful comment

I am using alpha.31 and I see this error when using the @storybook/[email protected] and I press a button using the actions (I am not using device addons, I am using standard addons via the react-native-server).

I am just using the default stories that are installed after init.

I fixed it with this solution: https://github.com/facebook/react-native/issues/20902#issuecomment-447593887

All 9 comments

Getting the same problem on RN 0.57.8 on Android. I guess storybook is using Symbol.iterator which is not supported in the Android JSC react native uses?

The following workaround is working for me:
https://github.com/facebook/react-native/issues/20902#issuecomment-431177779

I will try that, it seems like an easier workaround.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Unrelated, I think, but we've released a new version of RN in 5.1.0-alpha.8 and above (currently at alpha.11 as of this comment). It includes a lot of core improvements, so if somebody wants to try it out and report back, that would be much appreciated.

Have been using alpha.10 for a few days and haven't seen this issue, not thorough by any means but if other people also haven't seen it then should be safe to close

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

I am using alpha.31 and I see this error when using the @storybook/[email protected] and I press a button using the actions (I am not using device addons, I am using standard addons via the react-native-server).

I am just using the default stories that are installed after init.

I fixed it with this solution: https://github.com/facebook/react-native/issues/20902#issuecomment-447593887

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miljan-aleksic picture miljan-aleksic  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

xogeny picture xogeny  路  3Comments

alexanbj picture alexanbj  路  3Comments

wahengchang picture wahengchang  路  3Comments