CSS 错误显示“无法获取样式表 (#) 的文本:找不到具有给定 ID 的样式表”,这是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26894718/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error shows "Failed to get text for stylesheet (#): No style sheet with given id found", what does this mean?
提问by Calvin Fisher
I'm getting this error in Chrome when it loads this application I am working on:
当 Chrome 加载我正在处理的应用程序时,我在 Chrome 中收到此错误:
Failed to get text for stylesheet 50: No style sheet with given id found
无法获取样式表 50 的文本:找不到具有给定 ID 的样式表
Subsequent page loads repeat the error, but with a different number:
后续页面加载会重复该错误,但编号不同:
Failed to get text for stylesheet 152: No style sheet with given id found
无法获取样式表 152 的文本:找不到具有给定 ID 的样式表
This only happens in Chrome, and only with this application. There is no stack trace, reference, or any other information about what id is given, what the stylesheet in question is, or what is causing this generally. How can I find what is causing this error and fix it?
这仅在 Chrome 中发生,并且仅在此应用程序中发生。没有堆栈跟踪、参考或任何其他关于给出什么 id、有问题的样式表是什么或通常导致这种情况的任何其他信息。如何找到导致此错误的原因并修复它?
回答by Taysky
I had the same problem. It looks like a bug in Chrome's live-edit CSS/JS. Notice how the number changes on each request.
我有同样的问题。它看起来像是 Chrome 实时编辑 CSS/JS 中的一个错误。注意每个请求的数字是如何变化的。
I fixed it byclosing all the files that I had edited in the dev tools 'source' tab and then refreshed the page.
我通过关闭我在开发工具“源”选项卡中编辑的所有文件来修复它,然后刷新页面。
The error went away after I closed all the files in the 'source' tab.
关闭“源”选项卡中的所有文件后,错误消失了。
I tried to reproduce it after closing the files, but I can't seem to recreate it, yet.
我试图在关闭文件后重现它,但我似乎无法重现它,但。
Here is a picture showing where to find the 'source' tab:
这是一张图片,显示了在哪里可以找到“源”选项卡:
回答by Albuquerque Web Design
Fixt it by holding [Ctrl] + [Shift] and refresh the page
按住 [Ctrl] + [Shift] 修复它并刷新页面
回答by ajaykarwal
Still present in Chrome 46.0.2490.80 m (64-bit). Closing sources tabs 'fixed' it.
仍然存在于 Chrome 46.0.2490.80 m(64 位)中。关闭源标签“修复”了它。
回答by lewma
Just experienced this today if you have a .css file open in the dev tools. If you close the .css file and reload, the issue does not happen.
如果您在开发工具中打开了一个 .css 文件,今天刚刚经历了这一点。如果关闭 .css 文件并重新加载,则不会发生该问题。
Chrome 48.0.2564.109 (64-bit)
Chrome 48.0.2564.109(64 位)