element-hq / element-hq/element-integration-manager

scalar.vector.im returns 502 Bad Gateway when trying to add a Cloudflare Workers Flareact webpage as custom widget

Open
#84 1 comment 0 reactions 0 assignees View on GitHub
A-Scalar T-Defect
Dominant language
No language data
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### Description

I'm trying to build a webapp with Flareact (a Cloudflare Workers framework to use Next.js-like features) and want to embed it as a widget in a chat room. Unfortunately, when trying to add it, there is this strange error: `Unexpected token < in JSON at position 0`. When unticking "Check if content is embeddable", the widget is saved, but nevertheless the content cannot be displayed.

When looking in the network tab, the request to `scalar.vector.im` returns status code 502, but only for Flareact webpages which is kinda strange. Everything else (including "vanilla" Cloudflare Workers pages) works fine and is embeddable, as long as there are no precautions to prevent framing.

![Unbenannt](https://user-images.githubusercontent.com/50419884/116915083-dd48ea00-ac4b-11eb-8146-8d3fdd81283b.png)

I created an additional Flareact Worker just for testing this (so I can confirm, that this is reproducable for more than just one project). Feel free to use the worker for reproduction: `https://flareact.huskyiglu.workers.dev/`

The following steps (and only those) were used to setup the worker: https://flareact.com/docs/getting-started#installation

### Steps to reproduce

- Go to a chat room (public or private)
- Add a custom widget via "i" > Add Widgets, Bridges and Bots > Custom Widget
- Insert a URL to a Flareact Webpage (e.g. `https://flareact.huskyiglu.workers.dev/`)
- Hit save

Logs being sent: yes

### Version information

- **Platform**: web (app.element.io), web (via selfhosted element) and desktop (1.7.24)
- **Browser**: chromium 90.0.4430.93
- **OS**: Manjaro KDE Plasma (Kernel: 5.4.114-1-MANJARO)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.