guard-livereload stopped working - rack

Since merging in my co-worker's changes this morning, guard-livereload has stopped working. The javascript is being injected into the page, and guard does detect my browser, but no matter what files I modify, it simply does not reload whatsoever.
Here is my console output today, with livereload not working. Note that there is just zero output after detecting the browser - unlike other questions on stackoverflow, where livereload claims to be reloading but does not do anything. Here is my console output from the last time I was at work, when it did function correctly. The annoying thing is that ui.css.scss is the file I'm modifying now as well! My guardfile has not changed, I've checked.
Here is my bundle install output from this morning (my co-worker updated a bunch of gems). I'm using rack-livereload in lieu of a browser extension.
Any advice?
UPDATE: I've tried using the Livereload Chrome extension, but I get exactly the same (lack of) output, so I don't believe rack-livereload to be the culprit.

Found the solution, in part thanks to this.
It turns out Sublime Text 3's atomic save feature is what was preventing LiveReload from detecting changes to Sass files. Why it worked before a certain commit is beyond me...
Simply add "atomic_save": false to your Sublime settings to avert this.

Just to add an alternative solution - for me this was because I'd upgraded to rails 4.2 and changed my asset file names from .css.scss to .scss as per the recommendation in the logs.
Of course, when I checked my Guardfile I was still watching for .css files:
... (css|js|html|png|jpg) ... { |m| "/assets/#{m[3]}" }
A simple change from watching for css to scss like so:
... (scss|js|html|png|jpg) ... { |m| "/assets/#{m[3]}" }
and all fixed!

Related

Unity3D 2020 - VSCode - What happened to intellisense?

Overnight, any help I had for Unity3D in VSCode, i.e. intellisense, disappeared. And I get the sense, no pun intended, that I'm not the only one who's afflicted.
I've tried updating and reinstalling what I assumed VSCode needed to make Unity3D intellisense work. And have checked and re-checked settings, reinstalled VSCode package, in Unity3D.
I've worked through a few tutorials that claimed to address the issue.
What else does VSCode depend on to make this relationship work?
Thanks! Here's to hoping you've fixed this and your life has gotten easier!
Try going to Edit > Preferences > External Tools > Regenerate Project Files (This is because of a bug where the VS Code extension doesn't generate the project files correctly the first time, you can check it out here).
You'll need to be using the VS Code Editor Extension 1.2.0 (you can check which version you're using in the package manager) or later for that option to appear. Also if for whatever reason there are 2 .sln files in your project folder (I've had that happen before, though it's less likely), that also causes problems.
Ok. First, thanks to Lightning_A and Charleh!
The resolution to my specific circumstance was to install the VSCode extension "Unity Snippets Modified" https://github.com/with-heart/vscode-unity-snippets
I had been using https://github.com/kleber-swf/vscode-unity-code-snippets.
Perhaps it's just a matter of Kleber's extension, which is/was great, was broken upon updating Unity to 2020? I dunno and don't have the time to look into it, unfortunately.
Hopefully, my question, the answers I received, and my subsequent resolution saves others from the rabbit-hole I went down.
Again, thanks everyone!

VSCode Debugging with Mocha and ESM Breaking in ESM "compiled" File Instead of Original

I've been using the ESM module with VSCode and my Mocha unit tests for a long time now, a couple of years at least. Recently when I launch an individual test file in VSCode and set a breakpoint in the test file, it no longer breaks in the original file, but rather breaks in the "ESM compiled" file. I don't really know how ESM works enough to talk about it very well, but the file is compiled/transpiled/transformed in some way with all the imports converted to non-ESModule code. I'm able to step through, and it continues to step through other files as well, but each new file opened is this newly "ESM compiled" version instead of the original file, like it used to be. I only just noticed this recently. So I decided to install and older version of VSCode and see if it still happened, and it turns out it doesn't. With version 1.45.x it works as usual, but with anything newer, I get all these "ESM compiled" files opening up when I step through code.
Does anyone know why this is happening? Is there any new setting I can set in the newer VSCode versions that would cause this to not happen? It's really more of an annoyance than anything. I can still get my work done, but it's not as streamlined as it used to be. I will probably end up just downgrading permanently until I can find a way to make it not occur in the new version.
So, if anyone has experienced this, or knows of something new in VSCode that would cause this, I'd really appreciate some help. Thanks.

Typo3 8.7: Could not analyse class: maybe not loaded or no autoloader? Keeps coming and going

I have had this problem as seen in the title in the past and I always resolved this issue by adding the psr-4 autoloader in the emconf and simply reactivate my extensions.
Now I'm facing the same problem:
Could not analyse class: maybe not loaded or no autoloader?
but I have set the autoloader correctly as always. This also happens in more than one Extension right now.. After deleting the php cache in the install tool und dump autoload and reactivating my extension, the error was gone for some time, a couple hours later its back again.. Therefore I think it must have something to do with temp files, but I can't figure out what it is exactly..
Does anyone have a solution? I have seen plenty of topics about this issue on stackoverflow, I used them in the past, but unfortunately none is working for me right now.
Important fact: This error is happening on my new server now. On my old server (with the same code in the extensions) this didn't occur and they worked fine.
Thanks in advance.
Edit: Vendornames etc. are set correctly and there are no errors in the syntax whatsoever. As I said, the extensions worked fine.
Edit2: I just found this changelog of Typo3:
https://docs.typo3.org/typo3cms/extensions/core/Changelog/8.4/Breaking-78222-ExtensionAutoloadInformationIsNowInTypo3confautoload.html
But there is no solution for the impact for none composer installations. Can someone provide one for me?
When you use composer installation and you use extensions which are not installed via composer, you need to add the autoload information in the root composer.json of your project and then run composer dump-autoload. (ext_emconf.php dont works in composer mode?)
{
...
"autoload": {
"psr-4": {
"Vendor\\ExtensionNameA\\": "public/typo3conf/ext/extension_name_a/Classes",
"Vendor\\ExtensionNameB\\": "public/typo3conf/ext/extension_name_b/Classes"
}
}
}
A possible explanation for strange timing thing "works and later not". Maybe it has something to do with the red clear cache button in the TYPO3 backend (Clear all caches). Maybe it start not working when u hit this button and cache files get cleared. Then you need to reinstall extensions to get the autoloader "temporarly" working, till the point you hit the clear all caches button again. With the solution i mentioned above, it works permanet.
Have you left any configuration in your ext_tables.php?
As the TCA configuration, which is cached, is expected in Configuration/TCA/[Override/] any code in ext_tables.php might get lost.
If you want some configuration to be executed for each run you need to put it in ext_localconf.php
Thanks for all the help, I found the solution myself now.
Actually it was not really caused by any autoloader configuration, but and old version of fpdf which apparently caused two extensions to not load their classes properly. The exception thrown was simply misleading. I have upgraded the version of fpdf and now it works properly. It is not clear to me why the same code worked a week ago and now it failed, but atleast I have found the solution to my problem.

SASS Not Reloading with Play 2.0

When I make a change to a SASS file Chrome and Safari will reload with the changes after a refresh.
Suddenly they do not. I reverted to a version I know was working and I still have the same issue.
If I clear the browser cache then the changes load.
Therefore Play seems to be doing its job, but how strange that this is not isolated to a single browser.
I am thinking something could be wrong with the ETags or 304's.
Anyone have any idea?
I am using sbt-sass.
Turns out this was the effect of a %20, or space, in the project's folder name.
Removing the space fixed the issue.
A reversion could not fix it since the folder in question was just one step outside of the version control.
If you are having the same problem I would recommend removing spaces in project directory names.

Google Chrome Dev Tools inspect element styles not showing

Starting a couple of weeks ago....on some of our sites, but not all, when inspecting an element, the styles tab only shows the "styles box", but not the actual styles relating to css?? - Again, this is ONLY on some sites - weird
It should look like this (with styles showing on the right relating to css)
BUT......instead, on SOME of our sites, this just started a couple of weeks ago looking like this....with no css showing in the styles tab:
NOTE: it has worked for 2 years - The page looks fine and all styles are being applied to the DOM, but do NOT show up in the styles tab when inspecting element.
Any ideas??
I just had this same issue and to resolve it I went into Chrome Developer Tools -> Settings -> Scroll to the bottom and click "Restore defaults and reload" then it all magically came back!
I hadn't changed anything between it working and when it stopped so not sure why it broke but hopefully this helps you too.
I just close the tab, and reopen it, and then right click > inspect element. Don't need to restore the whole dev tools to default settings. It's a waste. Try it, it works! :)
I had to go to Chrome Developer Tools -> Settings -> Enable JavaScript source maps and then disable that checkbox. It has probably got do with sourcemaps and the fact that I'm building the scss to css.
something that worked for me: chrome:flags>Enable Developer Tools experiments>Disable. I had enabled it at some point, used it for years w/o issue, then could not see any style details as OP described. After updating, resetting devtools prefs to default, even trying incognito, this was the one thing that seemed to get it working again. There were some neat experiments, but i'd much rather be able to do my job...
I was also facing this problem, in addition to the suggestions the other users made it worked for me accessing:
Chrome Developer Tools -> CSS -> Relaoad Linked Style Sheets
Image Ilustrating the procedure
Another one for the mix - using CSS variables but one of the variables was referencing another variable that didn't exist.
Elements using that missing variable in the chain just don't show up in chromium at all (it hid all references to h2s in the case of my site).
Interestingly, it still shows the elements in Firefox's dev tool panel.
Look for errors in the CSS file, in my in my case it was on the global CSS variables, fixing the errors solved the problem.
This tool can help you find the errors:
https://jigsaw.w3.org/css-validator/
I was just having the same odd issue. I'm not 100% sure what triggered this to happen but we use build tools to build SCSS into CSS. I went into my CSS file and removed the source map reference -
/*# sourceMappingURL=myCSS.map */
And all of the sudden it started showing up again. Then I added it back and I can still see it. I am not sure if this is because a version of the map is cached now or not but this worked for me.
Even i faced this issue !!!
style.css file was causing this issue..
I just created a new css file (Ex: style1.css) and cut pasted the older css file content (all lines in style.css) to style1.css file. It works
Note: Don't forget to update link tag, which is loading css file.
I think your CSS files are not loaded properly. Just check the syntax for referencing the external stylesheets.
It should be like this
<link rel="stylesheet" type="text/css" href="mystyle.css">
If you are skipping the rel="stylesheet", browser may think it as a plain file. To confirm the loading of stylesheets go for Chrome Inspector -> Sources
Check the site resources
No need of resetting anything. Hope it helps :)
I use Dreamweaver and Breckets.
Could see that the problem occurred only when I used Dreamweaver.
Solved the problem by changing Dreamweaver's preferences
--> Code Format --> Line Break Type --> CR LF (Windows)
Sometimes it can be the server!
I just had this error on a page that appeared to be fully loaded but the style panel was completely empty.
A complete restart of Chrome (and verifying no processes) did not work.
Restarting my server (in this case a .NET Core app running locally in Visual Studio) then allowed the style panel to show.
I think there was some sort of connection leak or web socket limit - something of that nature which was confusing Chrome.
I think this may helpfull.. If it is an angular project > then simply run
ng serve --extract-css.