Cannot stop watching a channel
See original GitHub issuegoogleapi version: 12.4.0 api version: 3
Steps to reproduce
-
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.
-
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:
- Created 7 years ago
- Comments:21 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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": "..." } }
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?