loki icon indicating copy to clipboard operation
loki copied to clipboard

Failed fetching stories because the server is down

Open nico-bellante opened this issue 6 years ago • 12 comments

I am running into an issue after switching to using the "chrome.docker" target.

When I try to run the loki test command (after ensuring the storybook server has been started and is running), image I get the following error: image

However, if I build storybook, and run loki --reactUri file:./build-storybook, it works fine.

This is my current loki configuration:

  "loki": {
    "chromeTolerance": 3,
    "configurations": {
      "chome.largeScreen": {
        "target": "chrome.docker",
        "width": 1920,
        "height": 1080,
        "deviceScaleFactor": 1,
        "mobile": false,
        "fitWindow": false
      },
      "chrome.laptop": {
        "target": "chrome.docker",
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "mobile": false,
        "fitWindow": false
      }
    }
  }

I am not too familiar with Docker, so this might be a stupid question, but do I need to somehow start the storybook server inside the Docker container? I'd appreciate any help here.

nico-bellante avatar May 03 '19 17:05 nico-bellante

As a workaround, I have been just using the static build to run loki against

nico-bellante avatar May 10 '19 20:05 nico-bellante

Try to run loki with defined port (storybook port). I am running storybook on port 40123 with command start-storybook -p 40123 so loki is starting with loki test --port 40123

michalszajnecki avatar May 17 '19 11:05 michalszajnecki

Could https://github.com/oblador/loki/issues/143 be of service here? In addition, @nico-bellante if you can share your static configuration that would be great, currently failing using a static build.

TomGranot avatar May 30 '19 17:05 TomGranot

Try to restart Docker Desktop agent if you are on Windows. Check also if your firewall blocks Hyper-V (virtualizer)

fred-croix avatar Nov 26 '19 20:11 fred-croix

I build storybook, and run loki --reactUri file:./build-storybook, it not working, What caused this? image

zaleGZL avatar May 28 '20 08:05 zaleGZL

Any update on this? got the same issue when following your getting started instructions, I'm using create-react-app

pjpgoncalves avatar Jan 17 '21 16:01 pjpgoncalves

I have a similar question. When running loki test --port 6006 --configurationFilter chrome.laptop I need to start storybook on port 6006 in advance. If I run loki test --port 6006 --configurationFilter chrome.docker, do I need to start the storybook somehow?

My configurations:

configurations: {
    'chrome.laptop': {
      target: 'chrome.app',
      width: 414,
      height: 736,
    },
    'chrome.docker': {
      target: 'chrome.docker',
      width: 414,
      height: 736,
    },
    android: {
      target: 'android.emulator',
    },
  },

petr7555 avatar Apr 26 '21 22:04 petr7555

Any updates? I am encountering this issue with target set to chrome.docker and also chrome.app. Loki doesn't see the storybook server on the default port nor some other port. It works fine with static build

jWytrzes avatar Mar 09 '22 15:03 jWytrzes

same issue, switching to target: chrome.app works.

  "loki": {
    "configurations": {
      "chrome.laptop": {
        "target": "chrome.docker",
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "mobile": false
      },
      "chrome.iphone7": {
        "target": "chrome.docker",
        "preset": "iPhone 7"
      }
    }
  }

image

p3k avatar Apr 07 '22 08:04 p3k

For me the issue was storybook only listening locally on the host and not being accessible over the docker network. Solved by:

start-storybook -h "0.0.0.0"

Also setting host caused issues. Default/unset worked, only other value that did was --host "host.docker.internal"

sticeIO avatar Feb 11 '23 17:02 sticeIO

In my case, the error fix was as follows. After auto-correcting imports in the application, the import was corrected in preview.js

003

After fixing everything worked.

004

005

Review your configuration files. I wish everyone well.

Konstantine899 avatar Sep 26 '23 17:09 Konstantine899