druxt / quickstart-druxt-site-tome

Databaseless Druxt starterkit template
MIT License
0 stars 1 forks source link

Storybook experiencing CORS issue in Gitpod #21

Open Decipher opened 2 years ago

Decipher commented 2 years ago

Describe the bug While using Storybook in Gitpod we experienced and issue with CORS that breaks all stories.

To Reproduce Steps to reproduce the behavior: https://gitpod.io/#github.com/druxt/quickstart-druxt-site-tome

  1. Run repository in GitPod:
  2. Create debug content: cd drupal && ddev composer require drupal/devel && ddev drush en devel_generate && ddev drush genc
  3. Run Storybook: cd nuxt && npx nuxt storybook
  4. Look at an Entity story: ?path=/story/druxt-entity-node-article-view-displays--default

Expected behavior

Media If applicable, add screenshots or video to help explain your problem.

Your Environment (please complete the following information): N/A

Additional context

miclgael commented 2 years ago

CleanShot 2022-08-05 at 11 16 27

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://8080-druxt-quickstartdruxts-ccirmmpsxb1.ws-us59.gitpod.io/jsonapi. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 405.
Decipher commented 2 years ago

Hi @miclgael,

I just ran a test in a Gitpod instance against this repository and wasn't able to reproduce the issue. I'll try it from a cloned/templated repository to confirm if that's related, but would you be able to send me the repo you experienced this issue in?

Decipher commented 2 years ago

@miclgael I was also unable to reproduce the issue on a cloned repository. It's very odd, as I witnessed the issue occur during our call but am unable to reproduce.

miclgael commented 2 years ago

@Decipher, Spooky!

Maybe it is just my home network. I run a pi-hole so sometimes weird things can happen, though I've not seen a CORS issue before... 🤔

If you want to check it out anyway - I've forked, committed and pushed to a branch tutorial here:

https://github.com/miclgael/quickstart-druxt-site-tome/tree/tutorial

This was the URL to the gitpod (though I don't know it will work for you.)

miclgael commented 1 year ago

Screen Shot 2022-10-10 at 08 34 07

Sorry for the delay @Decipher

This screenshot taken today, following all the same steps, on my same network config. No CORS error.

I think this issue can be closed. Glitch in the matrix perhaps?