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

Electron's link for Darwin arm64 version is not available #2858

Closed
stordopoulos opened this issue Apr 1, 2021 · 2 comments
Closed

Electron's link for Darwin arm64 version is not available #2858

stordopoulos opened this issue Apr 1, 2021 · 2 comments

Comments

@stordopoulos
Copy link

What are you trying to achieve?

Trying to create a new CodeceptJS project in an empty folder with npx create-codeceptjs .

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

║   ╠╦╝ ║╣  ╠═╣  ║  ║╣
 ╚═╝ ╩╚═ ╚═╝ ╩ ╩  ╩  ╚═╝

 ╔═╗ ╔═╗ ╔╦╗ ╔═╗ ╔═╗ ╔═╗ ╔═╗ ╔╦╗  ╦ ╔═╗
 ║   ║ ║  ║║ ║╣  ║   ║╣  ╠═╝  ║   ║ ╚═╗
 ╚═╝ ╚═╝ ═╩╝ ╚═╝ ╚═╝ ╚═╝ ╩    ╩  ╚╝ ╚═╝


 🔌 Supercharged End 2 End Testing 🌟

Creating CodeceptJS project in /Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright

Powered by Playwright engine
package.json found, adding codeceptjs dependencies & scripts into it
Installing packages:  codeceptjs@3, @codeceptjs/ui, @codeceptjs/examples, @codeceptjs/configure, playwright@1
npm ERR! code 1
npm ERR! path /Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! node:internal/process/promises:245
npm ERR!           triggerUncaughtException(err, true /* fromPromise */);
npm ERR!           ^
npm ERR!
npm ERR! GotError [HTTPError]: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip
npm ERR!     at EventEmitter.<anonymous> (/Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright/node_modules/got/source/as-stream.js:35:24)
npm ERR!     at EventEmitter.emit (node:events:369:20)
npm ERR!     at module.exports (/Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright/node_modules/got/source/get-response.js:22:10)
npm ERR!     at ClientRequest.handleResponse (/Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright/node_modules/got/source/request-as-event-emitter.js:155:5)
npm ERR!     at Object.onceWrapper (node:events:476:26)
npm ERR!     at ClientRequest.emit (node:events:381:22)
npm ERR!     at ClientRequest.origin.emit (/Users/demetres/Library/Mobile Documents/com~apple~CloudDocs/Code/Playwright/node_modules/@szmarczak/http-timer/source/index.js:37:11)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:636:27)
npm ERR!     at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
npm ERR!     at TLSSocket.socketOnData (node:_http_client:502:22) {
npm ERR!   host: 'github.com',
npm ERR!   hostname: 'github.com',
npm ERR!   method: 'GET',
npm ERR!   path: '/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip',
npm ERR!   socketPath: undefined,
npm ERR!   protocol: 'https:',
npm ERR!   url: 'https://github.com/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip',
npm ERR!   gotOptions: {
npm ERR!     path: '/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip',
npm ERR!     protocol: 'https:',
npm ERR!     slashes: true,
npm ERR!     auth: null,
npm ERR!     host: 'github.com',
npm ERR!     port: null,
npm ERR!     hostname: 'github.com',
npm ERR!     hash: null,
npm ERR!     search: null,
npm ERR!     query: null,
npm ERR!     pathname: '/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip',
npm ERR!     href: 'https://github.com/electron/electron/releases/download/v7.3.3/electron-v7.3.3-darwin-arm64.zip',
npm ERR!     retry: {
npm ERR!       retries: [Function (anonymous)],
npm ERR!       methods: Set(6) { 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' },
npm ERR!       statusCodes: Set(7) { 408, 413, 429, 500, 502, 503, 504 },
npm ERR!       errorCodes: Set(8) {
npm ERR!         'ETIMEDOUT',
npm ERR!         'ECONNRESET',
npm ERR!         'EADDRINUSE',
npm ERR!         'ECONNREFUSED',
npm ERR!         'EPIPE',
npm ERR!         'ENOTFOUND',
npm ERR!         'ENETUNREACH',
npm ERR!         'EAI_AGAIN'
npm ERR!       }
npm ERR!     },
npm ERR!     headers: {
npm ERR!       'user-agent': 'got/9.6.0 (https://github.com/sindresorhus/got)',
npm ERR!       'accept-encoding': 'gzip, deflate'
npm ERR!     },
npm ERR!     hooks: {
npm ERR!       beforeRequest: [],
npm ERR!       beforeRedirect: [],
npm ERR!       beforeRetry: [],
npm ERR!       afterResponse: [],
npm ERR!       beforeError: [],
npm ERR!       init: []
npm ERR!     },
npm ERR!     decompress: true,
npm ERR!     throwHttpErrors: true,
npm ERR!     followRedirect: true,
npm ERR!     stream: true,
npm ERR!     form: false,
npm ERR!     json: false,
npm ERR!     cache: false,
npm ERR!     useElectronNet: false,
npm ERR!     method: 'GET'
npm ERR!   },
npm ERR!   statusCode: 404,
npm ERR!   statusMessage: 'Not Found',
npm ERR!   headers: {
npm ERR!     server: 'GitHub.com',
npm ERR!     date: 'Thu, 01 Apr 2021 12:28:05 GMT',
npm ERR!     'content-type': 'text/plain; charset=utf-8',
npm ERR!     vary: 'X-PJAX, Accept-Encoding, Accept, X-Requested-With',
npm ERR!     'cache-control': 'no-cache',
npm ERR!     'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
npm ERR!     'x-frame-options': 'deny',
npm ERR!     'x-content-type-options': 'nosniff',
npm ERR!     'x-xss-protection': '0',
npm ERR!     'referrer-policy': 'no-referrer-when-downgrade',
npm ERR!     'expect-ct': 'max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"',
npm ERR!     'content-security-policy': "default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline'",
npm ERR!     'content-encoding': 'gzip',
npm ERR!     'content-length': '29',
npm ERR!     'x-github-request-id': '3248:BBCA:4A1FE7:4C2C27:6065BC55',
npm ERR!     connection: 'close'
npm ERR!   },
npm ERR!   body: undefined
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/demetres/.npm/_logs/2021-04-01T12_28_06_695Z-debug.log
node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Details

  • CodeceptJS version: codeceptjs@3.0.5
  • NodeJS Version:node 15.12.0
  • Operating System: macOS BigSur 11.2.3 (MacBook Air M1)
@stordopoulos stordopoulos changed the title Electron link to Darwin arm64 version doesn't seem to work Electron's link for Darwin arm64 version is not available Apr 2, 2021
@DavertMik
Copy link
Contributor

THis looks like a temporary issue of Playwright. Let's wait for them to release M1 support

@stordopoulos
Copy link
Author

@DavertMik, I opened an issue on Playwright and @mxschmitt made this comment:

It seems like it's not an issue on Playwright side. When you create a project with npx create-codeceptjs . you get the following dependency @codeceptjs/ui which refers to Electron 7.2.4 so it installs a very old version of Electron which is around a year old. Back then Electron builds provided no separate M1 compilation target.

Indeed the reference in codeceptjs /ui /package.json points to "electron": "^7.2.4". Having said that, maybe using caret (^) is not the best way forward to Electron. Maybe using latest is preferable, since that's probably the version we want to work with anyway.

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

2 participants