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

Invalid regular expression: missing / #1227

Open
Mittelblut9 opened this issue May 23, 2023 · 27 comments
Open

Invalid regular expression: missing / #1227

Mittelblut9 opened this issue May 23, 2023 · 27 comments

Comments

@Mittelblut9
Copy link

SyntaxError: Invalid regular expression: missing /
  File "node:vm", line 100, col 7, in new Script
  File "/app/node_modules/ytdl-core/lib/sig.js", line 116, col 51, in exports.decipherFormats
    const nTransformScript = functions.length > 1 ? new vm.Script(functions[1]) : null;
  File "node:internal/process/task_queues", line 95, col 5, in process.processTicksAndRejections
  File "index 0", in Promise.all
  File "/app/node_modules/ytdl-core/lib/info.js", line 401, col 17, in exports.getInfo
    let results = await Promise.all(funcs);
@Pnlvfx
Copy link

Pnlvfx commented May 23, 2023

same

@Pnlvfx
Copy link

Pnlvfx commented May 23, 2023

failed: evalmachine.:8
/,()[/,-71,//};Vla(ncode);
^

SyntaxError: Invalid regular expression: missing /
at new Script (node:vm:94:7)
at exports.decipherFormats (/Users/simo97/Desktop/api-bbs-music/node_modules/ytdl-core/lib/sig.js:116:51)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async exports.getInfo (/Users/simo97/Desktop/api-bbs-music/node_modules/ytdl-core/lib/info.js:401:17)

@azickri
Copy link

azickri commented May 24, 2023

Same here..

@Laiirton
Copy link

same here

@cgjeffries
Copy link

Also getting this issue.

@talyuk
Copy link

talyuk commented May 24, 2023

+1

@Currypan1229
Copy link

Currypan1229 commented May 24, 2023

me too

@milanbabiclibrafire
Copy link

same

@Roninanu777
Copy link

Same here

@4D5A90
Copy link

4D5A90 commented May 24, 2023

same

@Eol1881
Copy link

Eol1881 commented May 24, 2023

Same
This fix still works tho: #1110 (comment)

@ghost
Copy link

ghost commented May 24, 2023

Temporary fixed solution is downgrading ytdl-core version forked by @GreepTheSheep:

npm i ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

For mine, this fixed the "Invalid regular expression: missing / "

@Roninanu777
Copy link

For me the patch by @khlevon worked

"ytdl-core": "https://github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2"

@azickri
Copy link

azickri commented May 24, 2023

For me the patch by @khlevon worked

"ytdl-core": "https://github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2"

How about speed download?
Its throttle?

@milanbabiclibrafire
Copy link

This worked for me:
Using last ytdl version (same download speed)

  1. delete node_module, package-lock.json
  2. "ytdl-core": "github:milanbabiclibrafire/node-ytdl-core"
  3. npm i

@Mittelblut9
Copy link
Author

Mittelblut9 commented May 24, 2023

If you don't want to use a fork, you can also use a patch.

I use the patch-package to create a patch for a particular module

Example: https://github.com/Mittelbots/Mittelbot/blob/ae1ee59206ec51b15e51d4573c6aabec13bb3d53/patches/ytdl-core%2B4.11.4.patch

@Shajeel-Afzal
Copy link

Shajeel-Afzal commented May 24, 2023

"ytdl-core": "https://github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2"

It works perfectly on localhost however I am not able to deploy to Firebase Functions after adding this to package.json.
Any solution?

@talyuk
Copy link

talyuk commented May 24, 2023

@Mittelblut9 in your patch one important line is removed, here is a correct one https://gist.github.com/talyuk/6f197e6a58b7b8107a7c2d7f442b97ae

@Mittelblut9
Copy link
Author

@Mittelblut9 in your patch one important line is removed, here is a correct one https://gist.github.com/talyuk/6f197e6a58b7b8107a7c2d7f442b97ae

Fixed 😅🫡

@fpsone
Copy link

fpsone commented May 24, 2023

I recommend using @distubejs fork since it is active, has fast bug fixes, and has better performance with undici.
npm i @distube/ytdl-core

If you don't want to change your package name, you can overwrite the original package with this command.
npm i ytdl-core@npm:@distube/ytdl-core

It should work better since #1217 patch is copied from this fork

@Shajeel-Afzal
Copy link

npm i ytdl-core@npm:@distubejs/ytdl-core

It says 404 not found!

@fpsone
Copy link

fpsone commented May 25, 2023

npm i ytdl-core@npm:@distubejs/ytdl-core

It says 404 not found!

Sorry, their package org doesn't have js suffix, it should be @distube/ytdl-core. Edited

@alex-shestmincev
Copy link

Seems like the issue is fixed, at least "ytdl-core": "4.11.5" is working for me

@fpsone
Copy link

fpsone commented Nov 8, 2023

Seems like the issue is fixed, at least "ytdl-core": "4.11.5" is working for me

Downgrade should work but the download speed is throttled and extremely slow.
You can use "ytdl-core": "npm:@distube/ytdl-core@latest" for better performance.

@fpsone
Copy link

fpsone commented Nov 15, 2023

"ytdl-core": "4.11.5" is not working again

Changed to "ytdl-core": "npm:@distube/ytdl-core@latest" And it fails randomly with an error:

ffprobe exited with code 1
ffprobe version N-58069-gc253b180cb-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      57.  2.100 / 57.  2.100

I don't think ytdl-core use ffmpeg/ffprobe

@alex-shestmincev
Copy link

"ytdl-core": "4.11.5" is not working again
Changed to "ytdl-core": "npm:@distube/ytdl-core@latest" And it fails randomly with an error:

ffprobe exited with code 1
ffprobe version N-58069-gc253b180cb-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      57.  2.100 / 57.  2.100

I don't think ytdl-core use ffmpeg/ffprobe

Yeah, there is no ffmpeg/ffprobe inside it this package

But this is my internal logic to use downloaded files. And seems like "ytdl-core": "npm:@distube/ytdl-core@latest" is randomly downloading empty files

@azickri
Copy link

azickri commented Nov 16, 2023

"ytdl-core": "4.11.5" is not working again
Changed to "ytdl-core": "npm:@distube/ytdl-core@latest" And it fails randomly with an error:

ffprobe exited with code 1
ffprobe version N-58069-gc253b180cb-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      57.  2.100 / 57.  2.100

I don't think ytdl-core use ffmpeg/ffprobe

Yeah, there is no ffmpeg/ffprobe inside it this package

But this is my internal logic to use downloaded files. And seems like "ytdl-core": "npm:@distube/ytdl-core@latest" is randomly downloading empty files

After trying again, is it still the same?
I never found that issue

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