Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejected promise #14

Closed
DavidTxx opened this issue Jul 25, 2020 · 3 comments
Closed

Rejected promise #14

DavidTxx opened this issue Jul 25, 2020 · 3 comments

Comments

@DavidTxx
Copy link

DavidTxx commented Jul 25, 2020

Hi,

Thanks for this repo, however I can't manage to download any track due to a rejected promise.
I followed the steps (providing a CLIENT_ID from soundcloud from the Chrome DevTools Network's tab), trying both with and without CLIENT_ID, similarly resulting in the following undhandled promise rejection:

(node:20171) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'transcodings' of undefined at /Users/davidthery/Desktop/node_modules/soundcloud-downloader/dist/index.js:58:73 at step (/Users/davidthery/Desktop/node_modules/soundcloud-downloader/dist/index.js:33:23) at Object.next (/Users/davidthery/Desktop/node_modules/soundcloud-downloader/dist/index.js:14:53) at fulfilled (/Users/davidthery/Desktop/node_modules/soundcloud-downloader/dist/index.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Usenode --trace-warnings ...to show where the warning was created) (node:20171) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:20171) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm using Node v14.6.0.

If you have any clue?
Thanks,
David

@zackradisic
Copy link
Owner

Thanks for bringing this to my attention, I'll take a look at this later, can you post your code so I can try to reproduce the error?

@DavidTxx
Copy link
Author

Quite simple, run with node (the client ID comes from soundcloud):

`const scdl = require('soundcloud-downloader')
const fs = require('fs')

const SOUNDCLOUD_URL = 'https://soundcloud.com/folamour/sets/umami-lp-mhmlp001'
const CLIENT_ID = 'UlLPjebQv7v50PMLub2mbFUhW7WWUp7P'

scdl.download(SOUNDCLOUD_URL, CLIENT_ID).then(stream => stream.pipe(fs.createWriteStream('audio.mp3')))
`

@zackradisic
Copy link
Owner

zackradisic commented Jul 27, 2020

Sorry for the delay, the problem is that the link you are using is a link to a playlist, not a single track. Playlists are not supported in this module, but I am interested in creating the ability to get the info for the tracks in the playlist, which you can then use to manually play each track in the playlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants