PDF embedding fails in molab

Open
#10,706 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Light2Dark is already working on this.

Since Sep 1, 2026.

Assessment

This issue has not been assessed yet.

Description

molab
Describe the issue

Hi all,

I'm trying to embed a pdf inside a molab notebook via mo.pdf, however the output of the cell gives a "this page has been blocked by Chrome" error.

Image

It appears that what's happening is the following: an iframe in the output block attempts to fetch from https://sb-f21866dca267bb72.sb.molab.run/@file/13264-567-dM6l3WOG.pdf. If I paste that into my browser in a new tab, I successfully view the pdf. However, it appears that the content-security-policy for that request is set to
frame-ancestors https://*.marimo.io, which is inconsistent with the molab.run domain for molab; I'd hypothesize that this is causing the issue.

Notebook URL (optional)

https://molab.marimo.io/notebooks/nb_CLSew1TnoNymyMEfLdtBUh

marimo version (optional)

0.24.0

Issue category

Notebook editor

Steps to reproduce

Upload a pdf through the file browser and attempt to view it through mo.pdf(Path("file/path"))

Expected behavior

The pdf to be viewable in the output window

Browser (optional)

Chrome 152.0.7977.64

Dominant language
Python
Stars
22.9k
Forks
1.3k
Avg merge
1d 10h
Merged PRs (30d)
380

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from marimo-team/marimo

All issues in marimo-team/marimo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.