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

Failed to load browser process #366

Open
Lucetia opened this issue Apr 12, 2021 · 3 comments
Open

Failed to load browser process #366

Lucetia opened this issue Apr 12, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Lucetia
Copy link

Lucetia commented Apr 12, 2021

Since I couldn't get it to load chromium with puppeteer I had to go through and put in the manual path in the destreamer.ts file.

When I run destreamer I have it process a file that contains a bunch of links. Once it gets to Video 19 / 20 it will start to fail.

So basically Videos 1-18 or 1-19 (first time it stopped after 18, second time was 19). Then when it goes to download the next video and refresh the access token it comes up with a error. It looks like when the refresh goes to process it falls back to the puppeteer version of chromium (which I had issues with in the past and had to put in the manual path).

I'm not sure if this is enough information to help figure out what might be causing it, but this is what occurs on my screen:

Downloading video no.20 


Downloading video segments 

progress [███████████████████████████████████████████████████████████████████████████████] 100%   2.34 MB/s   0s

Downloading audio segments 

progress [███████████████████████████████████████████████████████████████████████████████] 100%   1.37 MB/s   0s


Merging and decrypting video and audio segments...

Decrypted!

Merging vdeo and audio together...

Done! Removing temp files...

Video no.20 downloaded!!



Downloading video no.21 

Trying to refresh access token...

[ERROR] Error: Failed to launch the browser process!
/home/pi/destreamerv3/node_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: 1: /home/pi/destreamerv3/node_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome: Syntax error: "(" unexpected


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

    at onClose (/home/pi/destreamerv3/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at Interface.helper_js_1.helper.addEventListener (/home/pi/destreamerv3/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
    at Interface.emit (events.js:203:15)
    at Interface.close (readline.js:397:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)



[FATAL ERROR] Unhandled error or uncaught exception! 
Please check your download directory/directories and try again. 
If this keep happening please report it on github "https://github.com/snobu/destreamer/issues" 
@Straitjacket99
Copy link

me too x

@snobu
Copy link
Owner

snobu commented May 17, 2021

You'll need to amend the browser path executablePath in this method as well -

export async function refreshSession(url: string): Promise<Session> {

We should fix this and make it common for anything that calls puppeteer but that requires time commitment so can't promise anything.

@snobu snobu pinned this issue May 17, 2021
@snobu snobu self-assigned this May 17, 2021
@snobu snobu added the bug Something isn't working label May 17, 2021
@CxrlosKenobi
Copy link

CxrlosKenobi commented May 22, 2021

I just solved the error on my Raspberry Pi 3b+, editing the src/TokenCache.ts and src/destreamer.ts files.
Just add the the next line at the end of const browser: ...

ignoreDefaultArgs: ['--disable-extensions']

Now my code looks like this and worked succesfully:

const browser: puppeteer.Browser = await puppeteer.launch({
  executablePath: '/usr/bin/chromium-browser',
  ...,
  ignoreDefaultArgs: ['--disable-extensions']
});

Hope this can help you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants