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

Blank page after refresh #6616

Closed
mateusz-peczkowski opened this issue Dec 18, 2024 · 7 comments
Closed

Blank page after refresh #6616

mateusz-peczkowski opened this issue Dec 18, 2024 · 7 comments
Labels
bug Verified bug by the Nova team fix incoming A fix is in review

Comments

@mateusz-peczkowski
Copy link

  • Laravel Version: 11.36.1
  • Nova Version: 5.0.2
  • PHP Version: 8.3.7

Description:

A fresh installation of Laravel 11 and Laravel Nova 5 was performed. Upon visiting the Nova URL, a login page is displayed. Successful login allows access to any page without encountering any issues. However, refreshing a page results in a blank page with an error message, as depicted in the screenshot.
image

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Install Laravel 11
  2. Install Nova 5 via composer (Everything as on the Installation guide upon Nova user create)
  3. (optional) Change config.nova.path to / and remove the body of routes/web.php
  4. Setup domain in ENV
  5. Go to your domain
  6. Login to user created in point 2
  7. Go to for example users
  8. Refresh page

Using php artisan serve everything is working, so it can be tested only on Apache projects. Laravel Nova 4 is working normally.

@mateusz-peczkowski
Copy link
Author

mateusz-peczkowski commented Dec 18, 2024

I've added a console log in compiled code
image

And it is shown as "undefined". So something is not loading properly.

It only works if I go to:
https://nova-5.peczis.priv/nova

then it redirects me to https://nova-5.peczis.priv/nova/dashboards/main and I can go through panel UNTIL next refresh

@crynobone crynobone added the pending Issues that are pending triage label Dec 18, 2024
@crynobone
Copy link
Member

Unable to replicate the issue with http and https:

CleanShot 2024-12-18 at 11 12 24

@crynobone

This comment has been minimized.

@crynobone crynobone added needs more info More information is required and removed pending Issues that are pending triage labels Dec 18, 2024
@crynobone
Copy link
Member

Also, lockdown-install.js isn't part of Laravel Nova. Could that be the cause of your problem?

@crynobone
Copy link
Member

crynobone commented Dec 18, 2024

CleanShot 2024-12-18 at 13 50 32

I found the issue, on certain browsers the sequence of loading (by Inertia 2) is slightly different (on refresh) as illustrated on screenshot above (left using Firefox and right using Chrome).

Firefox consistently runs createInertiaApp.setup() before DOMContentLoaded while Chrome might run DOMContentLoaded before Inertia could execute createInertiaApp.setup().

@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review and removed needs more info More information is required labels Dec 18, 2024
@anditsung
Copy link

i have tested it on safari, chrome, firefox and brave

only firefox is working

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

3 participants