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

Regression of the integrated preview window, which sometimes does not show parts of a web component #143

Open
Piiit opened this issue Jul 9, 2021 · 5 comments
Assignees
Labels
bug Something isn't working non-blocking prj:webcomp

Comments

@Piiit
Copy link
Contributor

Piiit commented Jul 9, 2021

Please compare the "Activity & POI" web component

https://webcomponents.opendatahub.bz.it/webcomponent/0e5fbede-4a21-4dd3-bf85-7d2be71dfb12
https://webcomponents.opendatahub.testingmachine.eu/webcomponent/0e5fbede-4a21-4dd3-bf85-7d2be71dfb12

Why is the same version working on the old store, but no longer on the new one?

UPDATE 2021-07-23

@Piiit Piiit added the bug Something isn't working label Jul 9, 2021
@SirCotare
Copy link
Collaborator

@Piiit interestingly it is working properly when I run it on localhost.
I have investigated a bit further and I have come up with a possible cause of the problem.
I compared the response headers and noticed that there are some differences between the live server and the test server.
Testserver sends:

X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block

Livesever does not.

As far as I know those headers could potentially cause trouble.
Can you check if removing those headers would resolve the issue? So at least we can verify if that is even the cause at all.

@Piiit
Copy link
Contributor Author

Piiit commented Jul 14, 2021

@SirCotare Hi, I am unable to reproduce what you say on my localhost... it always does not show the icons and menu of the web component, also with those header fields disabled.

What I see thou is that the old CDN reported the correct svg mimetype, and the new cdn shows only javascript for that

@Piiit
Copy link
Contributor Author

Piiit commented Jul 14, 2021

@SirCotare I thought it might be related to the mimetype. I fixed that now, but the problem remains... also on my local machine. What else could it be?

@Piiit
Copy link
Contributor Author

Piiit commented Jul 14, 2021

Now, as I deleted the cache and reloaded the page several times on localhost, the icons show up... but not always. could it be a race-condition, or a surrounding div or css that causes those problems... maybe something that gets not loaded fast enough... still not sure where it comes from

@SirCotare
Copy link
Collaborator

Honestly, I'm pretty much out of ideas at this point. The preview is still wrapped in an iframe to prevent the store from causing trouble. All resources seem to load correctly. When I turn on 3G slow network simulation, it also works.
The only difference I see is, that you probably used the cli script to import the webcomponent while I used the crawler. That still does not explain why it works on your localhost (sometimes).
Could it be that the order in which resources are loaded is relevant and we have a difference here? Just fishing for ideas...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-blocking prj:webcomp
Projects
None yet
Development

No branches or pull requests

3 participants