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

Chrome path is not being set correctly on mac when deploying VlocityCard #634

Open
vernemi2 opened this issue Jan 8, 2024 · 3 comments
Open

Comments

@vernemi2
Copy link

vernemi2 commented Jan 8, 2024

When running the following command:
vlocity -sfdx.username <<my-sf-org-username>> -job VlocityJob.yaml packDeploy

The VlocityJob.yaml:

projectPath: .
expansionPath: vlocity
autoRetryErrors: true
activate: true
useSfdxCli: true
ignoreLocalCompilationCards: true
manifest:
  - VlocityCard/cpqQuoteButtonsMobile

I'm getting following error:
Puppeteer initialization Failed, LWC Activation disabled - Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

When I try to override the path in the VlocityJob.yaml file with:
puppeteerExecutablePath: /Applications/Google Chrome.app
I'm getting the same error.

When looking through the repo it looks like I'm hitting this condition (https://github.com/vlocityinc/vlocity_build/blob/master/lib/utilityservice.js#L1657):

} else if (fs.existsSync(linux3)) {
        puppeteerOptions.executablePath = linux3;        
    }

While the puppeteerExecutablePath is being completely ignored for some reason.

My config:

  • Apple M2 Pro, Sonoma 14.2
  • Vlocity Build v1.17.6
  • Puppeteer 21.7.0
@pawel-id
Copy link

pawel-id commented Jan 9, 2024

The issue is because ancient dependencies of VBT. It fails on Apple silicon. In this particular example it is about puppeteer-core@5. See old (and actually not solved) issue #519

local workaround:

  1. clone repo locally: git clone git@github.com:vlocityinc/vlocity_build.git
  2. cd into this cd vlocity_build
  3. install dependencies npm i
  4. bump puppeteer a bit npm i puppeteer-core@6
  5. link this version to be used locally npm link
  6. from this moment you local vlocity command will point to your local clone with workaround

@vernemi2
Copy link
Author

vernemi2 commented Jan 9, 2024

Hi @pawel-id,

That did the trick.

Thanks a lot for your help.
Michal

@Schuchie
Copy link

Schuchie commented Aug 22, 2024

FYI: SF-Support: The issue will be solved in version 254 (coming in December).

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

3 participants