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

Live Preview Doesnt work in browser app when offline #1858

Open
04474 opened this issue Sep 18, 2024 · 3 comments
Open

Live Preview Doesnt work in browser app when offline #1858

04474 opened this issue Sep 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@04474
Copy link

04474 commented Sep 18, 2024

Describe the bug

did not preview my code having this
Screenshot 2024-09-18 00 52 12
error

Reproduction

No response

Expected behavior

No response

OS, Browser and Phoenix versions

chromebook

logs or debug stack trace if any

No response

Additional context

No response

@04474 04474 added the bug Something isn't working label Sep 18, 2024
@abose
Copy link
Member

abose commented Sep 18, 2024

Are you using the chromeos native app?

@04474
Copy link
Author

04474 commented Sep 18, 2024 via email

@abose
Copy link
Member

abose commented Sep 19, 2024

After a bit of investigation, it looks like making live preview work when offline in the browser is not possible. Since the current ChromeOS app is a packaged PWA, it will inherit the offline restriction from the browser.

The root cause is that the live preview is a thirdparty domain and lives inside a sandboxed iframe, which cannot use the offline cache and APIs browser wide across the domain due to the sandbox. So there is no way for us to cache the live preview loader pages in an iframe.

But we should be able to fix with with a proper native app for chromeos with a local server once we moved out of the packaged PWA builds for ChromeOS

@abose abose changed the title did not preview any file Live Preview Doesnt work in browser app when offline Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants