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.

Cannot stop watching a channel

See original GitHub issue

googleapi version: 12.4.0 api version: 3

Steps to reproduce

  1. Start watching a drive file

    drive.files.watch({
      fileId,
      resource: {
        id: 'my-chanel',
        type: 'web_hook',
        address: 'https://example.com/api/gsheets'
      }
    }, (err, result) => {
    ...
    });
    

    It works good, I get info about channel and start receiving notfnications about changes.

  2. Try to stop channel

    drive.channels.stop({
      resource: {
        id: 'my-channel',
        resourceId: 'given resource id goes here'
      }
    }, (err, result) => {
    ...
    });
    

Expected result

Some message about successful operation

Actual result

error:  Error: Channel 'my-channel' not found for project '636397034666'
    at Request._callback (/Users/jifeon/projects/plyo.web/node_modules/google-auth-library/lib/transporters.js:82:15)
    at Request.self.callback (/Users/jifeon/projects/plyo.web/node_modules/google-auth-library/node_modules/request/request.js:198:22)
    at emitTwo (events.js:100:13)
    at Request.emit (events.js:185:7)
    at Request.<anonymous> (/Users/jifeon/projects/plyo.web/node_modules/google-auth-library/node_modules/request/request.js:1057:14)
    at emitOne (events.js:95:20)
    at Request.emit (events.js:182:7)
    at IncomingMessage.<anonymous> (/Users/jifeon/projects/plyo.web/node_modules/google-auth-library/node_modules/request/request.js:1003:12)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (node.js:377:13)
    at process._tickDomainCallback (node.js:425:11)

and if I try to watch again, it says “Channel id is not unique”

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
SymmetricDesignscommented, Feb 7, 2018

Was getting the useless “Required” error above too. I had forgotten to put the “id” and “resourceId” inside a “resource” object. This structure is very poorly documented: var params = { "auth": { }, "resource": { "id": "...", "resourceId": "..." } }

6reactions
jessetanecommented, Nov 11, 2016

Also, it’s a little weird to not be able to stop channels with the params you used to create them - if you somehow forget to extract the resourceId from the response are you just stuck getting events until you hit the expiration time?

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 Ways to Quit Watching TV - wikiHow
1. Record how much time you spend watching TV. Bringing attention to your habit, without pressuring yourself to get rid of it, can...
Read more >
3 Ways to Stop Watching YouTube - wikiHow
1. Delete all apps and bookmarks. Get rid of temptation by deleting any one-click links and icons that you have on your computer...
Read more >
How can I stop watching TV shows and movies all the time?
Great to know that you have the right intentions to stop viewing excessive ... Forgetting that you can't go without watching movies, why...
Read more >
Addicted to Twitch? Here's How to Stop Watching.
Work out why you compulsively watch Twitch. Are you drawn to the platform to escape from negative feelings? Do you feel lonely and...
Read more >
For Those Who Can't Stop Watching YouTube
In most cases, we spend less time on our subscribed channels and more time watching suggested videos, especially the shorts. On mobile, try...
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