Closed fooman closed 3 years ago
created in Jira backlog for grooming/prioritization
Marked P2S3
For Mac, delete 'devcert' folder in /Users/usrs/Library/Application Support/devcert and run 'sudo yarn run buildpack create-custom-origin
@fooman This seems like a feature request for devcert, which has an upgrade process that ought to reconcile permissions problems for previous versions.
@zetlen I believe it's a buildpack issue. If memory serves me right this call here https://github.com/magento/pwa-studio/blob/develop/packages/pwa-buildpack/lib/Utilities/configureHost.js#L69 fails as it also requires sudo privileges. Moving this line up https://github.com/magento/pwa-studio/blob/develop/packages/pwa-buildpack/lib/Utilities/configureHost.js#L71 to before should solve it.
We're tracking this bug internally with the following ticket: https://jira.corp.magento.com/browse/PWA-504
I am getting "not a valid domain name" when I run yarn buildpack create-custom-origin packages/venia-concept Logs:
https://github.com/browserslist/browserslist#browsers-data-updating
Creating a local development domain requires temporary administrative privileges.
Please enter the password for Prakash on DESKTOP-AGHGK7Q.
(×) [pwa-buildpack:Utilities:configureHost.js] Could not setup development domain:
Error: "magento-venia-concept-viwo-.local.pwadev" is not a valid domain name.
at Object.<anonymous> (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\dist\index.js:39:19)
at Generator.next (<anonymous>)
at C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\node_modules\tslib\tslib.js:115:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\node_modules\tslib\tslib.js:111:16)
at Object.certificateFor (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\dist\index.js:34:20)
at C:\Users\Prakash\Desktop\pwa-studio\packages\pwa-buildpack\lib\Utilities\configureHost.js:95:47
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(×) Error: [pwa-buildpack:Utilities:configureHost.js] Could not setup development domain:
Error: "magento-venia-concept-viwo-.local.pwadev" is not a valid domain name.
at Object.<anonymous> (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\dist\index.js:39:19)
at Generator.next (<anonymous>)
at C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\node_modules\tslib\tslib.js:115:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\node_modules\tslib\tslib.js:111:16)
at Object.certificateFor (C:\Users\Prakash\Desktop\pwa-studio\node_modules\devcert\dist\index.js:34:20)
at C:\Users\Prakash\Desktop\pwa-studio\packages\pwa-buildpack\lib\Utilities\configureHost.js:95:47
at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
i am getting the same issue you are getting did you found the solution for this @PrakashLakhara ??
Hi, set the value for CUSTOM_ORIGIN_ADD_UNIQUE_HASH to false and it should work.
Describe the bug create-custom-origin can't read existing cert file on Macos
To reproduce Create 1st project - observe it works including running
yarn run buildpack create-custom-origin .
(this was with PWA Studio 5) Create 2nd project (this was with PWA Studio 6 beta.2). Runyarn run buildpack create-custom-origin .
errors withExpected behavior Multiple custom origins should be possible.
Possible solutions The sudo check seems to happen only after checking for alreadyProvisioned certificates but the previously created file belongs to the root user.
Workaround: Making the cert file readable with
sudo chmod 644 /Users/kristof/Library/Application\ Support/devcert/certificate-authority/certificate.cert
lets the command succeed.Please complete the following device information:
npm -v
: 6.13.4node -v
: v10.18.1Please let us know what packages this bug is in regards to:
venia-concept
venia-ui
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
create-pwa