Comments (6)
This issue is easily repeatable as so:
<html>
<head>
<title>Async Test</title>
<script type="text/javascript" src="https://github.com/caolan/async/raw/master/dist/async.min.js"></script>
</head>
<body>
<script type="text/javascript">
var test = [0, 1, 2, 3, 4];
async.forEachSeries(test, function(item, callback) {
alert(item);
setTimeout(callback, 1000);
}, function() {
alert('all done');
});
</script>
</body>
</html>
Open that in Firefox, and Chrome and IE.
In Chrome and IE, the page alerts 0 to 4 followed by all done in order every second.
In Firefox, it outputs 0 then 1 then all done.
It seems Firefox will only do the first couple of elements before getting confused and going to lie down.
from async.
Anyone?
from async.
+1, Im using forEachSeries and in chrome it works flawlessly, in firefox it processes the first item and gives up
from async.
Looks OK in firefox 20.
from async.
@robinduckett your issue is because in Firefox prior to 13, you are actually using setTimeout
incorrectly with async
. See, before Firefox 13, Firefox passed a non-standard parameter as the first argument to your callback function. async
expects this to be an error object, so upon seeing this, async
, stops the iteration and calls the "all done" alert. You can work-around this Firefox oddity if you change
setTimeout(callback, 1000);
to
setTimeout(function () { callback(); }, 1000);
Also to note, the function to async.forEachSeries
where you call "all done" gets an argument which is an error argument. If you were not ignoring it, you may have seen Firefox 8 returning an error that was a number.
from async.
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
[email protected]
Domain alizweb.com has exceeded the max emails per hour (141/120 (117%)) allowed. Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from o3.sgmail.github.com ([192.254.112.98]:51226)
by web107.webhotelli.fi with smtp (Exim 4.82)
(envelope-from [email protected])
id 1WTaNJ-0003cW-MI
for [email protected]; Fri, 28 Mar 2014 19:15:26 +0200
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sgmail.github.com;
h=from:reply-to:to:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=smtpapi; bh=6UVszlyvnBd9ZDHdO2KXQc7JTDA=; b=P7XFaZfb85Kg9RWbt8
UlvQ44hNt6GoadkNwtSb70SKLAvAYBdYHFBxlQ66RAyyJxJ4KsRVVDEx+lfc7OJB
wPBh2g46U8A3mR9rEAUu4dLKcLyXBTpyVmBMJGwJt48ZJoLCsTciYGEzPvYHtzIT
yzwnwVWHOLjUHGd3NvPTi0ZAY=
Received: by mf154.sendgrid.net with SMTP id mf154.14944.5335AE2C3
Fri, 28 Mar 2014 17:15:24 +0000 (UTC)
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16])
by ismtpd-020 (SG) with ESMTP id 14509b05c3b.68f9.c7628b
for [email protected]; Fri, 28 Mar 2014 17:15:24 +0000 (GMT)
Date: Fri, 28 Mar 2014 10:15:21 -0700
From: Caolan McMahon [email protected]
Reply-To: caolan/async [email protected]
To: caolan/async [email protected]
Message-ID: caolan/async/issue/67/issue_event/[email protected]
In-Reply-To: caolan/async/issues/[email protected]
References: caolan/async/issues/[email protected]
Subject: Re: [async] Async.js doesn't seem to work in firefox (8.0.1) (#67)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5335ae29b559c_79fe3fca27a452b4536d2";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Recipient: alizbazar
List-ID: caolan/async <async.caolan.github.com>
List-Archive: https://github.com/caolan/async
List-Post: mailto:[email protected]
List-Unsubscribe: mailto:unsub+i-2378652-f9390de15f64086583e48623d488df98e2261870-736771@reply.github.com,
https://github.com/notifications/unsubscribe/736771__eyJzY29wZSI6Ik5ld3NpZXM6TXV0ZSIsImV4cGlyZXMiOjE3MTE2NDYxMjEsImRhdGEiOnsiaWQiOjk1MTAyODV9fQ==--ca3b99bdcb02321fbd80748bfd1182ac44638d77
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: [email protected]
X-SG-EID: 5rfIfHKDtPgyesnn+oI6KEolssHw4+3gNZWDqeE2Y56lyFSgFB/KodHIn9QcGYEDH29FU/A4i/L+hk9w4CJd7uQesX83oA7gQHFgZjiHjDGhQquiDRl75KP4piBdrMYZGszTPeSb0c7SEP00xwrhZv4N5KkXjcXxlGKAMPkjL14=
----==_mimepart_5335ae29b559c_79fe3fca27a452b4536d2
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Closed #67.
Reply to this email directly or view it on GitHub:
#67
----==_mimepart_5335ae29b559c_79fe3fca27a452b4536d2
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Closed #67.
—
Reply to this email directly or view it on GitHub.
----==_mimepart_5335ae29b559c_79fe3fca27a452b4536d2--
from async.
Related Issues (20)
- functions called by `async.*` return values prematurely? HOT 6
- Is it possible to support `AsyncGenerator` HOT 2
- Support queue.clear besides queue.kill HOT 1
- Multicore HOT 2
- use 'async/mapLimit' in Chrome 43 has error HOT 2
- reflect does not use Error message HOT 1
- Enable OpenSSF Scorecard Github Action and Badge
- How to call functions to execute sequentially? HOT 1
- async package should distribute both cjs and esm HOT 1
- Add adaptive functions HOT 1
- with async.queue order of execution is different when using promises instead of callbacks but should be identical HOT 2
- How to figure version of async required? HOT 1
- Async causing issues with callback function HOT 2
- callback is not a function HOT 3
- Java
- Github
- Vulnerability in the async dependency HOT 1
- vulnerability in async module HOT 2
- Error propagation - Original error lost HOT 4
- How to reproduce Subtle Memory Leak? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async.