fawazahmed0 / youtube-uploader

Free youtube video uploader with no limits
MIT License
330 stars 80 forks source link

waiting for file chooser failed on Github Actions #142

Open naptestdev opened 1 year ago

naptestdev commented 1 year ago

The problem still persists. I'm using version 1.3.70. Here's my code

import { upload } from "youtube-videos-uploader";
import dotenv from "dotenv";
dotenv.config();

const res = await upload(
  {
    email: process.env.EMAIL,
    pass: process.env.PASSWORD,
    recoveryemail: process.env.RECOVERY_EMAIL,
  },
  [
    {
      path: "./video.mp4",
      title: `My test video`,
      description: "Test description",
      language: "english",
      skipProcessingWait: true,
      onProgress: (progress) => console.log("Progress: ", progress),
      onSuccess: (url) => console.log("Uploaded: ", url),
      channelName: "Code Weather Videos",
    },
  ],
  {
    headless: true,
    args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-extensions"],
  }
);

console.log(res);

The github actions workflow

name: Upload video
on:
  workflow_dispatch:
jobs:
  render:
    name: Upload video
    runs-on: ubuntu-latest
    env:
      EMAIL: ${{ secrets.EMAIL }}
      PASSWORD: ${{ secrets.PASSWORD }}
      RECOVERY_EMAIL: ${{ secrets.RECOVERY_EMAIL }}
    steps:
      - uses: actions/checkout@main
      - uses: actions/setup-node@main
      - run: sudo apt update
      - run: sudo apt install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget libgbm-dev
      - run: npm i
      - run: node index.js

Here's the error

image
github-actions[bot] commented 1 year ago

Paid support is available for quick resolution, new features etc. For paid support, please write mail to youtube-uploader@datascraping.pp.ua

pierreminiggio commented 1 year ago

I'm having a similar issue that might be related : the scripts simply never stops, it's stuck on this line of code : https://github.com/fawazahmed0/youtube-uploader/blob/db8c5b14f655b105d7ab89b67d8b186fd1822b9e/src/upload.ts#L177 Added a line of code before to take a screenshot of the page, and changed the timeout for 5 minutes and screenshoted after 5 minutes, and in both cases, it shows a disabled upload button : image

pierreminiggio commented 1 year ago

I tested a few things, but I can't pin point what exactly goes wrong. I can't manage to reproduce consistantly on another machine than on my server on which I have the issue.

a11rew commented 1 year ago

@pierreminiggio did you figure this out by any chance? Having the same issue running in a VM

pierreminiggio commented 1 year ago

It's been more than 6 months, the code is a bit different now. On my own instance it's working just fine.