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

intercom stopped working in play/learn sites #3483

Closed
ainvoner opened this issue Jul 17, 2023 · 8 comments
Closed

intercom stopped working in play/learn sites #3483

ainvoner opened this issue Jul 17, 2023 · 8 comments
Assignees
Labels
🐛 bug Something isn't working onboarding

Comments

@ainvoner
Copy link
Contributor

I tried this:

open learn/play sites and see the intercom widget

This happened:

there is no intercom widget

I expected this:

to have intercom :)

Is there a workaround?

no

Component

Playground

Wing Version

No response

Node.js Version

No response

Platform(s)

MacOS

Anything else?

probably related to headers update in https://github.com/winglang/playground/commit/d00366e25d1ff4e43b6f0b2e886e80a03789fb74

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@ainvoner ainvoner added 🐛 bug Something isn't working onboarding labels Jul 17, 2023
@ainvoner ainvoner added this to Wing Jul 17, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Jul 17, 2023
@ekeren
Copy link

ekeren commented Jul 17, 2023

notice that it doesn't work for dynamic domains as well - e.g. https://9qb2ivlkj4.learn-ext.winglang.io/

@ainvoner ainvoner moved this from 🆕 New - not properly defined to 🏗 In progress in Wing Jul 17, 2023
@ekeren ekeren mentioned this issue Jul 17, 2023
@skyrpex
Copy link
Contributor

skyrpex commented Jul 17, 2023

The webcontainers only work in secure browser contexts. To enable secure contexts, the files we serve from our server must include a Cross-Origin-Embedder-Policy=require-corp or Cross-Origin-Embedder-Policy=credentialless. If require-corp is used, the page will only be able to load scripts, images and videos that return some specific headers. On the other hand, by using credentiallesss, we can still use scripts, images and videos securely.

We use require-corp and not credentialless because it's only implemented in Chromium-based browsers. Our analytics stack uses the segment cdn (and other cdns) to download the scripts, and they don't include the headers we need.

I thought that one solution would be to proxy the segment cdn, but we can't since there's multiple cdns and we don't have control over it. So it's a no go.

The only solution that comes to mind is to fine-tune each of the analytics solution we want to include. For example, adding Intercom manually and checking their cdn settings to see if we can either configure their HTTP headers, or self-host the intercom assets.

@skyrpex
Copy link
Contributor

skyrpex commented Jul 17, 2023

@ainvoner
Copy link
Contributor Author

@skyrpex if we will use the backend solution for all browsers that are not chrome, would it be possible to set the analytics properly for all?

@skyrpex
Copy link
Contributor

skyrpex commented Jul 17, 2023

Yeah. The backend solution doesn't require webcontainers nor these secure contexts.

@ekeren
Copy link

ekeren commented Jul 17, 2023

YIKES!

@ekeren
Copy link

ekeren commented Jul 17, 2023

@skyrpex, have you seen this?
segmentio/analytics-next#841

@ainvoner
Copy link
Contributor Author

moving back to use fly.io backend for non chrome based browsers.
issue was resolved

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Wing Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working onboarding
Projects
Archived in project
Development

No branches or pull requests

3 participants