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

No reactivity because manifest.json fail to load behind Cloudflare Access #9281

Closed
abelmferreira opened this issue Apr 23, 2024 · 3 comments
Closed

Comments

@abelmferreira
Copy link

Describe the bug

When using self hosted chatwoot behind Cloudflare Proxy with Access auth enabled, manifest fail to load with a 302 redirect because cloudflare forces authentication.

This breaks de pwa functions and no reactivity occurs, not updating chats when new messages arrives forcing us to reload full page every time.

To Reproduce

  1. Deploy Chatwoot on your own self-hosted deployment with Docker
  2. Use Cloudflare for DNS with Proxy pointing to your server
  3. Enable Cloudflare Access for extra authentication
  4. Try open chatwoot website and see error on console logs

Expected behavior

manifest.json load and reactivity works

Environment

Docker

Cloud Provider

Other [please specify in the description]

Platform

Browser

Operating system

Ubuntu 22.04

Browser and version

Edge 123.0.2420.97

Docker (if applicable)

Docker Version: 20.10.17

Additional context

Searching, i foud that we need add this attribute crossorigin="use-credentials" to link tag of manifest.

In my deployment i change this part in app/views/layouts/vueapp.html.erb file at line 29 and fixes it and manifest.json loaded

<link rel="manifest" href="manifest.json">

to

<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
Copy link

linear bot commented Apr 23, 2024

@abelmferreira
Copy link
Author

Sorry, but maybe this is not a CW issue.

Unfortunately, I detected other problems related to the use of Cloudfalre Access (Zero Trust as the new name), something is interfering only when we try send images and other attachments.

We use cw integrated with evolution api as our central integration node with the official whatsapp api. This is working fine for text messages, reactions, etc.

But when Cloudflare Zero Trust is activated, we are unable to send images and attachments messages, no errors appear in the browser console logs, no erros appears até chatwoot container logs, the message is sent "successfully", but the image received is corrupted.

Disabling Cloudflare Zerto Trust for chatwoot domain, everithing works fine imediatally.

As this is not a Chatwoot related problem, i think we can close this issue.

This image show how message was received by whatsapp when Zero Trus is enabled

@vishnu-narayanan
Copy link
Member

@abelmferreira Thank you for reporting this and sharing the findings. Closing this for now.

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

No branches or pull requests

2 participants