---
title: "uncaught exception: [Exception... \"Component returned failure code: 0x804b000f ["
author: "deepthink"
date: "2010-12-10T10:33:21Z"
tags: []
categories: ["Web前端"]
slug: "uncaught-exception-exception-component-returned-failure-code-0x804b000f"
draft: false
lastmod: "2010-12-10T10:37:42Z"
id: 838312
url: "https://5di.iteye.com/blog/838312"
---

直入正题吧：

uncaught exception: \[Exception... "Component returned failure code: 0x804b000f \[nsIXMLHttpRequest.setRequestHeader]"

 

这个错误的原因是，在一个request实例没有结束的时候，试图使用同一个实例再次发送请求造成的...

在jQuery下，如果timeout时间过短的时候会出现这个问题

 

解决的方法是：增加timeout的时间

或者，在发起第二次请求的时候abort正在执行的请求

 

这个问题在IE6下好像不会出现，但是在MF和IE8下都会出现，然后我从IE8的错误中复制了错误信息：

错误信息 写道

Webpage error details

User Agent: **Mozilla/4.0** (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; Tablet PC 2.0)  
Timestamp: Thu, 9 Dec 2010 13:00:54 UTC

Message: Unspecified error.  
Line: 47  
Char: 6  
Code: 0  
URI: http://localhost:8080/default/oawf/js/taroko.js

 

里面被我用红色标示出来的东西，呵呵，有意思吧...

 

完工...