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

[Bug]: Source maps fail to load with "Unsupported URL scheme" #26653

Open
lyleunderwood opened this issue Mar 26, 2024 · 3 comments · May be fixed by #27171
Open

[Bug]: Source maps fail to load with "Unsupported URL scheme" #26653

lyleunderwood opened this issue Mar 26, 2024 · 3 comments · May be fixed by #27171

Comments

@lyleunderwood
Copy link

Describe the bug

In fresh nextjs/storybook project, source maps don't work. When clicking on source references in chrome dev tools, received the following error message:

Could not load content for webpack://my-app/ (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

To Reproduce

Minimal repro repo

  1. Fresh install of chrome beta channel (Version 124.0.6367.9 (Official Build) beta (64-bit))
  2. nvm use 20
  3. npx create-next-app@latest // all default
  4. cd my-app
  5. npx storybook@latest init // all default
  6. Add a console.log('test'); to the automatically created Button component
  7. Click on source code reference in console
  8. See the mentioned error
    image
    image

System

Storybook Environment Info:

  System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (4) x64 Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v20.11.0/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm <----- active
  Browsers:
    Chrome: beta
  npmPackages:
    @storybook/addon-essentials: ^8.0.4 => 8.0.4 
    @storybook/addon-interactions: ^8.0.4 => 8.0.4 
    @storybook/addon-links: ^8.0.4 => 8.0.4 
    @storybook/addon-onboarding: ^8.0.4 => 8.0.4 
    @storybook/blocks: ^8.0.4 => 8.0.4 
    @storybook/nextjs: ^8.0.4 => 8.0.4 
    @storybook/react: ^8.0.4 => 8.0.4 
    @storybook/test: ^8.0.4 => 8.0.4 
    eslint-plugin-storybook: ^0.8.0 => 0.8.0 
    storybook: ^8.0.4 => 8.0.4

Additional context

No response

@jtaylor-zuora
Copy link

I am seeing the same behavior after upgrading from v7 -> v8. This only happens for *.stories.tsx files however, all other source maps load correctly. I believe this has something to do with how the stories are lazy loaded.

Screenshot 2024-04-02 at 5 42 07 PM

@lyleunderwood
Copy link
Author

This seems to have improved very slightly but still be broken as of v8.1.0-alpha.6. I assume the related change is #26676.

image

Could not load content for webpack://my-app/src/stories/Button.tsx (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

@frankieali
Copy link

frankieali commented Apr 30, 2024

I'm seeing this issue in 7.6.17 and I haven't updated my Storybook version in a long time. It just suddenly started failing. What's actually happening, if I start on the landing page, once I hover over a link in the side bar menu, sourcemaps fail to load in the background. I've tried disabling all my extension, but I'm still seeing the issue. I'm wondering if it was a browser update that's the issue. I'm seeing this issue in Safari, Chrome, and Brave, but not an issue in Firefox. It certainly seems to be related to lazy loading in Chromium browsers.

sourcemap-issue.mov

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

Successfully merging a pull request may close this issue.

3 participants