-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Browser not reloading #68
Comments
what browser? safari is known not to work you can debug the worker and check its log messages: https://lihautan.com/Debugging%20web%20workers/ |
Chrome and Firefox, sorry for leaving out. |
any logging in your console on main pages? you can see what will be logged in the scripts https://github.com/adamchainz/django-browser-reload/blob/main/src/django_browser_reload/static/django-browser-reload/reload-listener.js |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
No, I am using |
Please also check the worker logs as per the link in my first comment |
You may have something on your page that prevents the script even starting. If you see the listener script logs if it's not possible to start the worker: So either you should see that message, or the worker should start. Are you allowing debug-level messages on your devtools console? Are there other messages you're ignoring? Can you try adding extra log messages to your local version of the script (edit it within your virtualenv) to see where it gets to? |
Okay - that's interesting. Would you be able to add some django-browser-reload/src/django_browser_reload/views.py Lines 145 to 164 in 0d40e4e
(I opened #69 to add some log messages to the source permanently, for future debugging.) |
Sure. View But still no refresh within the browser. As written before. Same setup on a different project work just fine. I am not able to spot any difference. |
Huh. And this is with normal |
I would normally ask to reproduce the bug in a small project but I suspect it would be hard to do so without narrowing down the problematic component. |
yes, straight No worries. I can work without reloading. And if no other user has the same problem, we should not spend too much time on it. |
I'm happy to keep debugging, if you are. As I understand, you added |
Okay, it seems impossible then that you'd not see a worker running. Clearly something is connected and receiving the events. Can you try checking the relevant debugging panels in both browsers, as per https://lihautan.com/Debugging%20web%20workers/ ? |
Okay, I finally give up. For your case, we've seen the server side component is running and sending messages, and the client side component is connecting and logging its "connected message". So it seems almost impossible that it wouldn't work. Perhaps you have some kind of development tool (an option in devtools, or an extension) that is blocking the exact JS API's used to signal the reload. I'd recommend you try a clean chrome profile with no extensions, or even another browser (Firefox!). Happy to fix something if you get more data on this, but it seems the package is working fine for at least hundreds of people at this point, so it's probably not an issue here... |
Thanks for your help. Yes, I agree. The browser is not the problem as it is on any browser the same problem and it works with another project with identical setup. ... I could try screen recording to proof it is not working, but anyway. Fine with me. I will change my development setup shortly and it will be interesting to see if it works on the new laptop. |
I have what appears to be the same issue with both latest Firefox and Brave on macOS 12.5. |
@rakyi Open a new issue if you have any new information. Please try capturing the debug logs at least. |
Python Version
3.9.10
Django Version
4.0.2
Package Version
1.3.0
Description
Did an update on django-tailwind from 2.x to 3.1.1 and also changed from browser-sync to django-browser-reload. Followed the update instructions and compared all steps to a previously updated project without any problems.
But this time the browser just does not reload on changes. The script-Tag is in the source code of the page. Tailwind start does recognize the updated html or css. But the browser does not reload. No GET request to update the site is fired.
Do you have any idea where I can look for the problem?
The text was updated successfully, but these errors were encountered: