Schroedinger-Hat / youtube-to-anchorfm

An automation process to convert YouTube video into audio file and uploading it to Anchor.fm podcast
MIT License
127 stars 70 forks source link

Failing to upload #14

Closed ghost closed 2 years ago

ghost commented 2 years ago

I run the action and Upload Episode from YouTube To Anchor.Fm part of the action continues to fail with following error:

...
+ puppeteer@10.4.0
added 55 packages from 73 contributors and audited 55 packages in 8.546s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module '/github/workspace/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
...

image

TheJoin95 commented 2 years ago

Can you share your directory structures and repository? Thank you

ghost commented 2 years ago

image

ghost commented 2 years ago

I think it's looking for index.js on my repo instead of here

ghost commented 2 years ago

I think if I would fork this repo and change details it would work

zephyrus3 commented 2 years ago

@grubeli Can you share the some lines from the step "Upload Episode from Youtube to Anchor.Fm" ? I need the one that starts with "/usr/bin/docker run ". In this case, It would be better share the text not a screenshot. Also, can you share your ".github/workflows/upload.yml" ?

ghost commented 2 years ago
/usr/bin/docker run --name e1cc51eb9c3f0b1b884af0bd7a11122cc86b5b_737fa5 --label e1cc51 --workdir /github/workspace --rm -e ANCHOR_EMAIL -e ANCHOR_PASSWORD -e EPISODE_PATH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/my_repo/my_repo":"/github/workspace" e1cc51:eb9c3f0b1b884af0bd7a11122cc86b5b
TheJoin95 commented 2 years ago

Did you try to fork this repo then edit the details? I guess it would work for sure

ghost commented 2 years ago

I'm sure it will work

zephyrus3 commented 2 years ago

The problem is that we have a problem on youtube-to-anchorfm@v0.1.5 that is already fixed on main. You can change the branch/tag on ".github/workflows/upload.yml" by changing

uses: Schrodinger-Hat/youtube-to-anchorfm@v0.1.5

to

uses: Schrodinger-Hat/youtube-to-anchorfm@main

@TheJoin95 Is it possible to do a new release to Marketplace with the latest changes?

TheJoin95 commented 2 years ago

@zephyrus3 just done it

zephyrus3 commented 2 years ago

@grubeli Can you test again with the new version (0.1.6) ?

ghost commented 2 years ago

Similar error:

/index.js:113
        throw error;
        ^

Error: ENOENT: no such file or directory, open '/github/workflow/episode.json'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at /index.js:34:42
    at ChildProcess.exithandler (child_process.js:299:7)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/github/workflow/episode.json'
}
TheJoin95 commented 2 years ago

This error occurs with the new action version or by forking the repo?

ghost commented 2 years ago

I just changed version, I didn't copy the repo

zephyrus3 commented 2 years ago

I think that the error could be the variable EPISODE_PATH on .github/workflows/upload.yml, @grubeli Could you change it from "/github/workflow" to "/github/workspace" and se if it works ? Maybe it will not fully work because we have a new problem that popped out on last Thursday related to the "Next" button on "Episode options" page, but I think in the next few days it will be fixed.

ghost commented 2 years ago

I only have .github/workflows/main.yml and episode.json

zephyrus3 commented 2 years ago

ok. Try to change the variable that I have mentioned in this file (.github/workflows/main.yml) and see if it works. If it still not working, please share the contents of .github/workflows/main.yml so we could have a better understanding on what could be happening.

cr0stata commented 2 years ago

Hi guys,

I modified the EPISODE_PATH solving the Error: ENOENT: no such file or directory, open '/github/workflow/episode.json' but now I got:

Error: No node found for selector: .styles__button___2oNPe.styles__purple___2u-0h.css-39f635
    at Object.exports.assert (/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26:15)
    at DOMWorld.click (/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:276:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /index.js:126:25

Here the action: https://github.com/cr0stata/youtube-to-anchorfm/runs/5259817974

Wabri commented 2 years ago

It seems that anchor site is changed, could we do something about it?

TheJoin95 commented 2 years ago

It's reasonable to change the selctor into something more generic. It should be easy, but right now I'm focused on other OSS project. Can someone on this issue find it out and send us a PR?

cr0stata commented 2 years ago

After a while the episode seems to be uploaded on anchor. Here the action stopped: https://github.com/cr0stata/youtube-to-anchorfm/actions/runs/1869422129

EDIT: I'm dumping all my podcast, and at the second shot it works smoothly -> https://github.com/cr0stata/youtube-to-anchorfm/actions/runs/1869750268

EDIT2: It definitely go -> https://github.com/cr0stata/youtube-to-anchorfm/actions

abe-101 commented 2 years ago

I think that the error could be the variable EPISODE_PATH on .github/workflows/upload.yml, @grubeli Could you change it from "/github/workflow" to "/github/workspace" and se if it works ?

It seems this change is necessary.

abe-101 commented 2 years ago

I think that the error could be the variable EPISODE_PATH on .github/workflows/upload.yml, @grubeli Could you change it from "/github/workflow" to "/github/workspace" and se if it works ? Maybe it will not fully work because we have a new problem that popped out on last Thursday related to the "Next" button on "Episode options" page, but I think in the next few days it will be fixed.

Should i open a pull request that changes the yml from /github/workflow to /github/workspace? I would also reflect that in the README.

Then this issue can be closed.

abe-101 commented 2 years ago

as of version v1.0.2 this is no longer an issue and can be closed @grubeli

Wabri commented 2 years ago

I will close for inactivity and seems the problem related to this issue is resolved! thanks @abe-101 🚀