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

Fix iframe loading when only the iframe server starts on random port #2947

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

jonatanklosko
Copy link
Member

Closes #2946.

Copy link

github-actions bot commented Mar 3, 2025

Uffizzi Ephemeral Environment deployment-61487

☁️ https://app.uffizzi.com/github.com/livebook-dev/livebook/pull/2947

📄 View Application Logs etc.

What is Uffizzi? Learn more!

iframe_port = Livebook.Config.iframe_port()

case livebook_port do
case iframe_port do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Livebook server port is set to 0, we make the iframe port to be 0, but this is already handled in the config:

def iframe_port() do
case port() do
0 -> 0
_ -> Application.fetch_env!(:livebook, :iframe_port)
end
end

Here we want to retrieve the actual port, so we should check if the iframe port is 0, regardless of the Livebook port.

The current conditional here fails when Livebook starts on 8080 as expected, but 8081 is taken, in which case we only set the iframe port to 0.

@jonatanklosko jonatanklosko merged commit e4a63ef into main Mar 3, 2025
7 checks passed
Copy link

github-actions bot commented Mar 3, 2025

Uffizzi Preview deployment-61487 was deleted.

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

Successfully merging this pull request may close these issues.

Iframe-based Kinos not displaying in Livebook v0.15.1 (Mac Desktop)
1 participant