bdkjones / CodeKit-1-Old

147 stars 1 forks source link

Chrome not refreshing #672

Closed cinnamonrowles closed 10 years ago

cinnamonrowles commented 10 years ago

Hi,

When I save my css files, and sometimes the main HTML file, chrome does not always show the changes. I'm using the most up to date version of chrome and codekit. I can't find a pattern yet for when this happens. I'm not using LESS or SASS when this happens.

Thanks!

bdkjones commented 10 years ago

I'm afraid I'll need a lot more information. What browser plugins are you running? Can you send me the project demoing the issue?

cinnamonrowles commented 10 years ago

Hi, thanks for getting back to me so quickly!

I am running chrome with no plugins, but I almost always have the developer tools window open. I put the entire project on my github. Please let me know if you have any issues viewing it - I just started using github today.

Thanks,

Rebecca

On Sep 18, 2013, at 5:41 PM, bdkjones notifications@github.com wrote:

I'm afraid I'll need a lot more information. What browser plugins are you running? Can you send me the project demoing the issue?

— Reply to this email directly or view it on GitHub.

cinnamonrowles commented 10 years ago

One more thought - I had to add this script to the end of my files because Chrome was acting strangely on refresh (refreshing without saving through codekit):

    <script type="text/javascript">document.write('<link rel="stylesheet" type="text/css" media="screen" href="/Style%20Library/package/css/mainfile.css?v=' + Math.floor((Math.random()*1000)+1) + '"></' + 'link>');</script>

When refreshing without codekit, chrome would continually apply less and less of my css to the page. I googled the issue, found that other people have had the same problem, and that they have had success using the script above.

Hope that helps!

On Sep 18, 2013, at 6:45 PM, Rebecca Rowles tootsierowles@gmail.com wrote:

Hi, thanks for getting back to me so quickly!

I am running chrome with no plugins, but I almost always have the developer tools window open. I put the entire project on my github. Please let me know if you have any issues viewing it - I just started using github today.

Thanks,

Rebecca

On Sep 18, 2013, at 5:41 PM, bdkjones notifications@github.com wrote:

I'm afraid I'll need a lot more information. What browser plugins are you running? Can you send me the project demoing the issue?

— Reply to this email directly or view it on GitHub.

cinnamonrowles commented 10 years ago

And one MORE thought - I've noticed this happens more often when deleting styles rather than adding them.

On Sep 18, 2013, at 6:59 PM, Rebecca Rowles tootsierowles@gmail.com wrote:

One more thought - I had to add this script to the end of my files because Chrome was acting strangely on refresh (refreshing without saving through codekit):

    <script type="text/javascript">document.write('<link rel="stylesheet" type="text/css" media="screen" href="/Style%20Library/package/css/mainfile.css?v=' + Math.floor((Math.random()*1000)+1) + '"></' + 'link>');</script>

When refreshing without codekit, chrome would continually apply less and less of my css to the page. I googled the issue, found that other people have had the same problem, and that they have had success using the script above.

Hope that helps!

On Sep 18, 2013, at 6:45 PM, Rebecca Rowles tootsierowles@gmail.com wrote:

Hi, thanks for getting back to me so quickly!

I am running chrome with no plugins, but I almost always have the developer tools window open. I put the entire project on my github. Please let me know if you have any issues viewing it - I just started using github today.

Thanks,

Rebecca

On Sep 18, 2013, at 5:41 PM, bdkjones notifications@github.com wrote:

I'm afraid I'll need a lot more information. What browser plugins are you running? Can you send me the project demoing the issue?

— Reply to this email directly or view it on GitHub.

bdkjones commented 10 years ago

Hi Rebecca,

First, you didn't send me a link to the GitHub page.

Secondly, wow --- that is one ugly hack there. That's almost certainly the issue, because you've essentially got a script that's reloading CSS files as CodeKit tries to reload CSS files. I can virtually guarantee that's the cause of the problem. However, I've never heard of Chrome "applying less and less" of stylesheets. Can you send me a link to that discussion?

-Bryan

On 2013 Sep 18, at 15:45 , cinnamonrowles notifications@github.com wrote:

Hi, thanks for getting back to me so quickly!

I am running chrome with no plugins, but I almost always have the developer tools window open. I put the entire project on my github. Please let me know if you have any issues viewing it - I just started using github today.

Thanks,

Rebecca

On Sep 18, 2013, at 5:41 PM, bdkjones notifications@github.com wrote:

I'm afraid I'll need a lot more information. What browser plugins are you running? Can you send me the project demoing the issue?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

asumaran commented 10 years ago

This also happens to me. Codekit successfully refreshes HAML files but when I update SASS files, compiles and tries to refresh Chrome but without success

In the console says this error: Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist. r.refreshStylesheets (anonymous function) (anonymous function)

I'm running Codekit 1.8.1 (8326) with the latest Chrome (Versión 29.0.1547.76) with all plugins disabled.

Happens the same with the latest Chrome Canary

Console error:

Uncaught NotFoundError: Failed to execute 'insertBefore' on 'ContainerNode': The node before which the new node is to be inserted is not a child of this node. VM28:1 r.refreshStylesheets VM28:1 (anonymous function) VM28:1 (anonymous function)

Related file: https://gist.github.com/asumaran/6759450

UPDATE:

Forget it. My html was invalid. Now it's fixed. My bad. I'm leaving the comment in case help someone

bdkjones commented 10 years ago

You're likely running a Javascript library on this page that's incompatible with CSS injections. Prefrixfree.js is a big offender, for example.

On 2013 Sep 30, at 00:45 , Alfredo Sumaran notifications@github.com wrote:

This also happens to me. Codekit successfully refreshes HAML files but when I update SASS files, compiles and tries to refresh Chrome but without success

In the console says this error: Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist. r.refreshStylesheets (anonymous function) (anonymous function)

I'm running the latest Chrome Versión 29.0.1547.76 with all plugins disabled.

Happens the same with the latest Chrome Canary

Console error:

Uncaught NotFoundError: Failed to execute 'insertBefore' on 'ContainerNode': The node before which the new node is to be inserted is not a child of this node. VM28:1 r.refreshStylesheets VM28:1 (anonymous function) VM28:1 (anonymous function)

Related file: https://gist.github.com/asumaran/6759450

— Reply to this email directly or view it on GitHub.

asumaran commented 10 years ago

I've updated my previous comment. My html was invalid. Something like:

<html></html>
<head>
 ...
</head>
<body>
...
</body>
cinnamonrowles commented 10 years ago

Hi again,

I removed the script above but I am still having the issue. Usually what happens is I will remove some code in the CSS file (usually the file called 'og-styles.css') and when I hit save the changes are not made in the Chrome browser.

Here is the link to my project: https://github.com/cinnamonrowles/surflombok

Thanks