question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Info needed: BadResource: Bad resource ID

See original GitHub issue

Hi:

I run this code and it does indeed consume and report published messages.

      (async function () {
        try{
          for await (const { channel, message } of sub.receive()) {
            handler(message);
          }
        }catch(err){
          console.log(err);
        }

But, I get an error BadResource: Bad resource ID.

Any idea what this means. I will very much appreciate the help.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
reselbobcommented, Jun 17, 2020
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/std@v0.51.0/io/bufio.ts:85:18)
    at async BufReader.readByte (https://deno.land/std@v0.51.0/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
1reaction
reselbobcommented, Jun 20, 2020

I am happy I was able to help. Deno is important as is being able to use Redis with it! Thanks for your attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bad resource ID when awaiting a promise inside a for ... - GitHub
The error thrown is error: Uncaught BadResource: Bad resource ID . The code listens for changes in a directory and re-runs a Deno...
Read more >
Using Deno.close to close resources | The JS runtimes - Medium
If we try to read after closure, a BadResource error would be thrown. Deno.close(Deno.stdin.rid); prompt('abcd'); //error: Uncaught BadResource: Bad resource ID ...
Read more >
API response on bad resource id - Stack Overflow
I've got api controller with route /resource/{id} where id is required to be numeric. If request url is /resource/abc , then I'll get...
Read more >
v1.7.0 - Deno
[WILDCARD]error: Uncaught (in promise) BadResource: Bad resource ID[WILDCARD]. Deno Logo. Why Deno? Develop LocallyDeploy GloballyCompare to Node.js ...
Read more >
Deno - Mark Volkmann
The deno command supports many sub-commands for common tasks including running programs, starting a REPL, linting code, formatting code, displaying code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found