storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Storybook cannot load in IE11 with window.history.state as 'unspecified error'

Open jackysee opened this issue 3 years ago • 1 comments

Describe the bug Storybook cannot load in IE11 with window.history.state as 'unspecified error'

To Reproduce https://github.com/jackysee/storybook-ie-unspecified-error

System

Environment Info:

  System:
    OS: Linux 5.4 Manjaro Linux
    CPU: (2) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
  Binaries:
    Node: 14.15.0 - /tmp/fnm_multishell_2448238_1631588352900/bin/node
    Yarn: 3.0.2 - /usr/bin/yarn
    npm: 6.14.8 - /tmp/fnm_multishell_2448238_1631588352900/bin/npm
  Browsers:
    Firefox: 91.0.2
  npmPackages:
    @storybook/addon-actions: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-docs: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-essentials: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-links: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/vue: ^6.4.0-alpha.34 => 6.4.0-alpha.34

Additional context The debugger showed that it has "unspecified error" when accessing source.history.state where source === window in this case. storybook-ie-unspecified-error2

jackysee avatar Sep 14 '21 03:09 jackysee

This is also a problem for us. It seems that the history module tries to grab window.history.state in which IE throws an error.

It seems like this should be wrapped in a try/catch on that module, as the fallback object in their code doesn't work for IE11.

It's this method: https://github.com/remix-run/history/blob/main/docs/api-reference.md#createbrowserhistory

ScubaDaniel avatar Sep 13 '22 17:09 ScubaDaniel