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

Getting blank screen while navigation inside a navigationGroup using spa() #9089

Open
AbhinavNmdo opened this issue Oct 14, 2023 · 27 comments
Open
Milestone

Comments

@AbhinavNmdo
Copy link

AbhinavNmdo commented Oct 14, 2023

Package

filament/filament

Package Version

v3.0.37

Laravel Version

v10.28

Livewire Version

v3.0.8

PHP Version

PHP 8.1

Problem description

I found a bug while I am using spa(). While I am navigation form one route to another route inside a navigationGroup, I got a blank screen until I reload the page.

image

And the result is:
image

Expected behavior

It will have to route to the respective url

Steps to reproduce

  1. Frist, navigate to any route inside the navigationGroup.
  2. Now, try to navigate on the another route, it will show blank screen.

If you refresh the page on the blank screen it will redirect you to the previous route.

Reproduction repository

https://github.com/AbhinavNmdo/InvestingDelta

Relevant log output

No response

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@AbhinavNmdo AbhinavNmdo added bug Something isn't working low priority unconfirmed labels Oct 14, 2023
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Oct 14, 2023
@AbhinavNmdo AbhinavNmdo changed the title Getting blank screen while navigation inside a navigationGroup Getting blank screen while navigation inside a navigationGroup using spa() Oct 14, 2023
@zepfietje
Copy link
Member

Please provide any console errors.

@zepfietje zepfietje added this to the v3 milestone Oct 15, 2023
@AbhinavNmdo
Copy link
Author

AbhinavNmdo commented Oct 15, 2023

Here are some errors...
127.0.0.1-1697384856263.log

image
image

@isrardogar
Copy link

same problem here. blank screen when navigating from one resource to another, using spa()

@danharrin
Copy link
Member

Should be fixed in the latest releases but let us know if not

@danharrin danharrin closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Nov 27, 2023
@Antonides
Copy link

In Chrome everything works fine in Safari i still get random blank pages. Console doesn't show any errors

@wannesmatthys
Copy link

Same issue here

@moisessepulveda
Copy link

Same issue using safari

@danharrin danharrin reopened this Mar 7, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Roadmap Mar 7, 2024
@melloradamj
Copy link

melloradamj commented Mar 12, 2024

Getting this in safari too, but only when clicking between a few pages in quick succession. It then gives the console error:
Attempt to use history.replaceState() more than 100 times per 10 seconds

@andruu
Copy link
Contributor

andruu commented Mar 17, 2024

Can confirm getting this error in spa mode.

SecurityError: Attempt to use history.replaceState() more than 100 times per 10 seconds

@danharrin
Copy link
Member

danharrin commented Mar 17, 2024

Not trying to shift the blame here, and it might be tricky to reproduce, but I don't think this is going to be an issue inside Filament's codebase. It's probably something in Livewire's wire:navigate. Anyone who wants to see this solved should start investigating that path and eventually submit a report to Livewire, probably as a failing test PR. Adding +1-like comments is not going to make things move, the Filament team are not the only ones who are able to solve problems

Edit: Not sure why people are downvoting this, I'm not sure what I can do if I don't encounter the problem? There isn't even a reproduction repository, the one linked 404s

@ZacharyDuBois
Copy link

Also able to reproduce with a simple project (~5 simple models). I haven't actually run into this with Livewire alone (yet). On a plain Livewire project, I was unable to reproduce. But then again, that plain project wasn't producing as many links on a single page.

@polar-sh polar-sh bot added the Fund label Jun 3, 2024
@danharrin danharrin removed the Fund label Jun 3, 2024
@polar-sh polar-sh bot added the Fund label Jun 3, 2024
@danharrin danharrin removed the fund label Jun 4, 2024
@kaidoj
Copy link

kaidoj commented Jun 9, 2024

Same with version 3.2.86. Getting in the production build using SPA with Safari. This actually makes the filament admin unusable in Safari. It even happens when I click multiple times on the list page breadcrumb in a row. It doesn't happen when I switch between table tabs. If I find time to check into this deeper, I will.

Console error -> SecurityError: Attempt to use history.replaceState() more than 100 times per 10 seconds

Edit: I found a workaround from here. So far seems it works well. I added a custom script asset following the filament documentation.

@bigboypantson
Copy link

Same, getting this: Attempt to use history.replaceState() more than 100 times per 10 seconds

@eduwass
Copy link

eduwass commented Jul 2, 2024

Happening here too, as @danharrin said, it appears this might be an issue in Livewire. If you search for the error in the Livewire repository, you'll see that a discussion has started here:

livewire/livewire#5923

This discussion includes the workaround that @kaidoj mentioned above, although that solution may not be ideal.

There's also an older issue in the Livewire repository that seems related, but it was marked as resolved:

livewire/livewire#1496

Edit: I think the best path is to try and generate a failing test, like what Josh Hanley tried doing in this comment here livewire/livewire#5923 (comment) and report it to the livewire team

@andrewdwallo
Copy link
Contributor

@danharrin I think I may have found the issue. It's possible that I'm wrong but I investigated the stacktrace and the code leading to it. The issue was occurring for me in an app that doesn't use SPA mode. livewire/livewire#7746 (comment)

@Murkrow02
Copy link

I get the same error on Firefox when using spa() in panel provider after navigating for a bit

@Milad-Sarli
Copy link

Milad-Sarli commented Dec 11, 2024

same issue i have when i open a modal action in any of my resources
my entire screen goes black.
but i tested it with spa or without but results are same .

@danharrin
Copy link
Member

Are you on the latest Filament version? @Milad-Sarli

@andrewdwallo
Copy link
Contributor

andrewdwallo commented Dec 11, 2024

Well the issue would still exists if Caleb didn't merge the fix for the issue right? Yes the issue does happen in both SPA and non-SPA apps. Essentially anything that uses URL query strings.

@danharrin
Copy link
Member

I think he is talking about the recent broken Livewire version and not the same issue as this one, I released a patch for that today.

@marloonline123
Copy link

does it happen for you guys when you press any action in table like sorting filtering and so on.., this what happening to me in filament i get blank blach screen nothing clickable and no error messages in brwoser console nor in laravel log file

@danharrin
Copy link
Member

The issue you describe is not the same, please make sure you are on the latest Filament version

@gorthal
Copy link

gorthal commented Dec 26, 2024

@marloonline123 : I had the same problem and updating FilamentPHP to version 3.2.131 solve it.

@DenyEs
Copy link

DenyEs commented Jan 29, 2025

This is still broken and happening in v3.2.135. I use Firefox and navigating between resources too quickly makes the screen go blank in both SPA and non SPA mode

@dirop1
Copy link

dirop1 commented Feb 2, 2025

I had this problem and fixed it by going to config/livewire.php and changed this from false to true:

'inject_assets' => true,

Hope it helps someone

@DenyEs
Copy link

DenyEs commented Feb 2, 2025

I had this problem and fixed it by going to config/livewire.php and changed this from false to true:

'inject_assets' => true,

Hope it helps someone

Unfortunately, it doesn't help in my case. Navigating too quickly still triggers the blank screen and an error in the console.

Too many calls to Location or History APIs within a short timeframe.

@Jacobtims
Copy link

This is still an issue on Filament v3.2.136 and Livewire v3.5.12, both on SPA and non SPA mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests