Comments (11)
error: Uncaught BadResource: Bad resource ID
at unwrapResponse ($deno$/ops/dispatch_minimal.ts:63:11)
at Object.sendAsyncMinimal ($deno$/ops/dispatch_minimal.ts:106:10)
at async Object.read ($deno$/ops/io.ts:39:17)
at async BufReader._fill (https://deno.land/[email protected]/io/bufio.ts:85:18)
at async BufReader.readByte (https://deno.land/[email protected]/io/bufio.ts:198:7)
at async readLine (https://raw.githubusercontent.com/keroxp/deno-redis/master/io.ts:91:15)
at async readArrayReply (https://raw.githubusercontent.com/keroxp/deno-redis/master/io.ts:141:16)
at async RedisSubscriptionImpl.receive (https://raw.githubusercontent.com/keroxp/deno-redis/master/pubsub.ts:64:20)
at async file:///Users/reselbob/Documents/source-tree/denodemo/pubbersubber/types/providers/redis.ts:70:46
from redis.
@keroxp I hope you don't mind me giving input...
@reselbob Can you provide the exact code you used? How you are running/using it? I assume the above is pseudo-code as well as it isn't valid code.
Usually I see Bad Resource ID
when a subprocess using Deno.run
isn't closed properly or passed invalid values
from redis.
Here is the code: https://github.com/reselbob/denodemo/blob/master/pubbersubber/types/providers/redis.ts
Here is the project it runs within: https://github.com/reselbob/denodemo/tree/master/pubbersubber
Here is the test: https://github.com/reselbob/denodemo/blob/master/pubbersubber/tests/connection_test.ts , starting at line 63:
You need to have rabbitmq and redis running. I've put this all in the test script found here:
https://github.com/reselbob/denodemo/blob/master/pubbersubber/tests/run_tests
Thanks for your attention. Any help will be appreciated a lot! If the error is due some bad programming on my part, which it very well might be, please forgive me.
from redis.
Sorry, the repo was private. Now it's not.
from redis.
@reselbob @ebebbington
Thanks for reporting this issue!
I was able to reproduce the same error.
I'll look into it.
from redis.
Steps to reproduce
I have a file named mod.ts
:
import { connect } from "https://deno.land/x/[email protected]/redis.ts";
const redis = await connect({ hostname: "localhost" });
const sub = await redis.subscribe("test");
(async () => {
for await (const { channel, message } of sub.receive()) {
console.log("channel: " + channel);
console.log("message: " + message);
}
})();
redis.close();
When running the mod.ts
, the following error occurs:
$ deno run --allow-net ./mod.ts
error: Uncaught BadResource: Bad resource ID
at unwrapResponse ($deno$/ops/dispatch_minimal.ts:63:11)
at Object.sendAsyncMinimal ($deno$/ops/dispatch_minimal.ts:106:10)
at async Object.read ($deno$/ops/io.ts:39:17)
at async BufReader._fill (https://deno.land/[email protected]/io/bufio.ts:85:18)
at async BufReader.readByte (https://deno.land/[email protected]/io/bufio.ts:198:7)
at async readLine (https://deno.land/x/[email protected]/io.ts:91:15)
at async readArrayReply (https://deno.land/x/[email protected]/io.ts:141:16)
at async RedisSubscriptionImpl.receive (https://deno.land/x/[email protected]/pubsub.ts:64:20)
at async file:///home/uki00a/projects/deno-redis/mod.ts:8:38
Environment
deno 1.1.0
v8 8.4.300
typescript 3.9.2
from redis.
@uki00a Shame I didn't have the time to help out more!
from redis.
I am happy I was able to help. Deno is important as is being able to use Redis with it! Thanks for your attention.
from redis.
@reselbob Doesn't seem like any of those links work?
from redis.
No problem! Do you have the error stack it displays too?
from redis.
@reselbob Hi! This problem has been fixed at v0.10.3. Please update to it.
@ebebbington Thanks for your help! It really helps us.
from redis.
Related Issues (20)
- Consider interpreting a Null Array as `null` rather than an empty array
- Connection stops responding HOT 3
- test: `pubsub` > `retry` seems flaky
- BREAKING: Change `BulkNil` from `undefined` to `null`
- Suggestion: Enforce using `deno fmt`
- Suggestion: Use docker-based redis for tests
- BREAKING: Rename `withScore` to `withScores`
- Re-enable `deno task make_mod` in CI
- BulkNil and execArrayReply breaking xread
- PubSub with binary messages HOT 1
- [feat] keepalive feature
- [feat] automatically reconnect when interrupted
- Bug: xrange failed to parse empty string
- deps: import `cluster-key-slot` and `lodash-es` from esm.sh
- Support for RedisJson - JSON.GET
- Support AbortController in a client HOT 1
- Watch vs tx HOT 1
- Subscribe / psubscribe hangs after calling sub.receive() HOT 1
- `Redis.scan` cursor parameter requires a number
- sendCommand api inconsistency HOT 1
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 redis.