youtube-studio
youtube-studio copied to clipboard
Cannot read property 'Symbol(Request internals)' of null
const SID= y_cred.SID; const HSID = y_cred.HSID; const SSID = y_cred.SSID; const APISID = y_cred.APISID; const SAPISID = y_cred.SAPISID;
async () => { try { await init({ SID, HSID, SSID, APISID, SAPISID, }); } catch (err) { console.log("error in youtube auth..",err.message) } };
const result = await upload({ channelId: environment.CHANNEL_ID, // your channelId stream:fs.createReadStream("./videos/" + info.videoId + ".mp4"), // your video stream
newTitle:vData.title, // optional, your video name
newDescription:vData.description,
newPrivacy: "PUBLIC", // optional (PRIVATE by default), ('PUBLIC', 'UNLISTED', 'PRIVATE' options available)
isDraft: false // optional, video can be a draft (false by default)
});
ERROR GOT:
TypeError: Cannot read property 'Symbol(Request internals)' of null
2021-07-09T21:53:25.012471071Z at isRequest (/app/node_modules/node-fetch/lib/index.js:1158:50)
2021-07-09T21:53:25.012478175Z at new Request (/app/node_modules/node-fetch/lib/index.js:1180:8)
2021-07-09T21:53:25.012482824Z at /app/node_modules/node-fetch/lib/index.js:1409:19
2021-07-09T21:53:25.012487102Z at new Promise (
can you please wrap upload
function with try/catch
?
Hey there, I got the same issue today.
I found out that caused by missing SESSION_TOKEN when you call "init". And the upload function doesn't check this before passing it to node-fetch.
PR on #33