webtorrent-desktop icon indicating copy to clipboard operation
webtorrent-desktop copied to clipboard

Apple Silicon Support for Mac

Open AngelKnight101 opened this issue 4 years ago • 8 comments

What version of WebTorrent Desktop are you using? WebTorrent Desktop Version 0.24.0 (0.108.6) Mac What operating system and version? MacOS Big Sur 11.0.1; Macbook Pro M1 Chip What problem do you want to solve? Update the App to support Apple Silicon Natively What do you think is the correct solution to this problem? The app runs a bit slow and also the torrent files played using the player skips frames from time to time! Updating the app will allow it to use the full power of the laptop and greatly optimise the app. It will also provide a better experience of using the app too.

AngelKnight101 avatar Dec 26 '20 13:12 AngelKnight101

This should get more attention! The version of electron implemented already supports building for Apple Silicon, the potential issues could be the dependencies

SethuSenthil avatar Jan 19 '21 04:01 SethuSenthil

Yes, when I try to compile on arm64, chromedriver fails:

error /Users/georghartmann/Downloads/webtorrent-desktop/node_modules/electron-chromedriver: Command failed.
Exit code: 1
Command: node ./download-chromedriver.js
Arguments: 
Directory: /Users/georghartmann/Downloads/webtorrent-desktop/node_modules/electron-chromedriver
Output:
node:internal/process/promises:227
          triggerUncaughtException(err, true /* fromPromise */);
          ^

GotError [HTTPError]: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip
    at EventEmitter.<anonymous> (/Users/georghartmann/Downloads/webtorrent-desktop/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (node:events:378:20)
    at module.exports (/Users/georghartmann/Downloads/webtorrent-desktop/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (/Users/georghartmann/Downloads/webtorrent-desktop/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (node:events:485:26)
    at ClientRequest.emit (node:events:390:22)
    at ClientRequest.origin.emit (/Users/georghartmann/Downloads/webtorrent-desktop/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:636:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
    at TLSSocket.socketOnData (node:_http_client:502:22) {
  host: 'github.com',
  hostname: 'github.com',
  method: 'GET',
  path: '/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip',
  socketPath: undefined,
  protocol: 'https:',
  url: 'https://github.com/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip',
  gotOptions: {
    path: '/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip',
    protocol: 'https:',
    slashes: true,
    auth: null,
    host: 'github.com',
    port: null,
    hostname: 'github.com',
    hash: null,
    search: null,
    query: null,
    pathname: '/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip',
    href: 'https://github.com/electron/electron/releases/download/v10.0.0/chromedriver-v10.0.0-darwin-arm64.zip',
    retry: {
      retries: [Function (anonymous)],
      methods: Set(6) { 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' },
      statusCodes: Set(7) { 408, 413, 429, 500, 502, 503, 504 },
      errorCodes: Set(8) {
        'ETIMEDOUT',
        'ECONNRESET',
        'EADDRINUSE',
        'ECONNREFUSED',
        'EPIPE',
        'ENOTFOUND',
        'ENETUNREACH',
        'EAI_AGAIN'
      }
    },
    headers: {
      'user-agent': 'got/9.6.0 (https://github.com/sindresorhus/got)',
      'accept-encoding': 'gzip, deflate'
    },
    hooks: {
      beforeRequest: [],
      beforeRedirect: [],
      beforeRetry: [],
      afterResponse: [],
      beforeError: [],
      init: []
    },
    decompress: true,
    throwHttpErrors: true,
    followRedirect: true,
    stream: true,
    form: false,
    json: false,
    cache: false,
    useElectronNet: false,
    method: 'GET'
  },
  statusCode: 404,
  statusMessage: 'Not Found',
  headers: {
    server: 'GitHub.com',
    date: 'Fri, 12 Feb 2021 17:22:39 GMT',
    'content-type': 'text/plain; charset=utf-8',
    vary: 'X-PJAX, Accept-Encoding, Accept, X-Requested-With',
    'cache-control': 'no-cache',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    'x-frame-options': 'deny',
    'x-content-type-options': 'nosniff',
    'x-xss-protection': '1; mode=block',
    'referrer-policy': 'no-referrer-when-downgrade',
    'expect-ct': 'max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"',
    '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'",
    'content-encoding': 'gzip',
    'set-cookie': [
      '_gh_sess=lDOhFXPY7IY%2FMkkiZF1E%2FFcdS5mUzQOuvEoUzbYYvWMXtXlvQeo5O5NtfYnJDfxE%2F8PI7keonqQqxoQQZA3wMFSBRfmqq7pp8AKPrC6cA8yjDCVWSeRMOweZH7ToolRFwiyXfzaUDD1c%2BG6L3gKfFp7L%2FB5EiPMk88iVfGAfYTFI6fNn0Nz390r%2Bcu77m0GbZBx4bqnrhPxwrwxIInCPWnGeDpWdnlvBml%2Fx8pNestO%2FvIe72%2BEYG%2ByXmLchbyiHgUQHF4viWpxCLlH94kOhPw%3D%3D--LkRDT5KXTId0RhRn--ARwFa51INZOjg3DtVFbrlg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax',
      '_octo=GH1.1.1191868951.1613150559; Path=/; Domain=github.com; Expires=Sat, 12 Feb 2022 17:22:39 GMT; Secure; SameSite=Lax',
      'logged_in=no; Path=/; Domain=github.com; Expires=Sat, 12 Feb 2022 17:22:39 GMT; HttpOnly; Secure; SameSite=Lax'
    ],
    'content-length': '40',
    'x-github-request-id': 'FF31:5164:38F82E:5B1FDD:6026B95F',
    connection: 'close'




brasilikum avatar Feb 12 '21 17:02 brasilikum

@brasilikum any luck getting this to build?

slayerjain avatar Feb 26 '21 21:02 slayerjain

@slayerjain No. I fiddled around with it a little but I am not familiar for the complexity of electron.

brasilikum avatar Feb 28 '21 01:02 brasilikum

I tried but faced this problem - https://github.com/webtorrent/webtorrent-desktop/issues/1923

slayerjain avatar Mar 12 '21 12:03 slayerjain

As far as I can tell, @feross's commit on November 16th 2020 (https://github.com/webtorrent/webtorrent-desktop/commit/b5fad54f4a42410479a0023d78e84d9fe766e6b4#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519), upgraded to Electron 11, which adds support for Apple Silicon.

It looks like the only issue now is the build process (https://github.com/webtorrent/webtorrent-desktop/blob/master/bin/package.js)? And the fact that there hasn't been a release in over a year?

I'd be happy to try to spend some time to help push this forward. Just let me know.

fishcharlie avatar Nov 06 '21 03:11 fishcharlie

How is going? Get someone working native version on Mac?

Pepe424 avatar Mar 28 '22 07:03 Pepe424