NetrisTV / ws-scrcpy

Web client prototype for scrcpy.
MIT License
1.62k stars 317 forks source link

Fedora 36 does not install properly. #199

Closed Alion548 closed 2 years ago

Alion548 commented 2 years ago

I updated my system to Fedora 36 and found that ws-scrcpy could not be installed.

npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDosregression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDosregression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDosregression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDosregression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDosregression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 677 packages, and audited 678 packages in 24s

47 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (1 moderate, 9 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

npm audit
# npm audit report

ansi-regex  4.0.0 - 4.1.0
Severity: moderate
 Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/cliui/node_modules/ansi-regex
node_modules/string-width/node_modules/ansi-regex
node_modules/wrap-ansi/node_modules/ansi-regex

async  <2.6.4
Severity: high
Prototype Pollution in async - https://github.com/advisories/GHSA-fwr7-v2mv-hh25
fix available via `npm audit fix --force`
Will install @devicefarmer/adbkit@3.2.2, which is a breaking change
node_modules/async
node_modules/portfinder/node_modules/async
  @devicefarmer/adbkit-monkey  *
  Depends on vulnerable versions of async
  node_modules/@devicefarmer/adbkit-monkey
    @devicefarmer/adbkit  *
    Depends on vulnerable versions of @devicefarmer/adbkit-monkey
    Depends on vulnerable versions of node-forge
    node_modules/@devicefarmer/adbkit

glob-parent  <5.1.2
Severity: high
Regular expression denial of service in glob-parent - https://github.com/advisories/GHSA-ww39-953v-wcq6
fix available via `npm audit fix`
node_modules/watchpack-chokidar2/node_modules/glob-parent
  chokidar  1.0.0-rc1 - 2.1.8
  Depends on vulnerable versions of glob-parent
  node_modules/watchpack-chokidar2/node_modules/chokidar
    watchpack-chokidar2  *
    Depends on vulnerable versions of chokidar
    node_modules/watchpack-chokidar2
      watchpack  1.7.2 - 1.7.5
      Depends on vulnerable versions of watchpack-chokidar2
      node_modules/watchpack
        webpack  4.44.0 - 4.46.0
        Depends on vulnerable versions of watchpack
        node_modules/webpack

minimist  <1.2.6
Severity: critical
Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h
fix available via `npm audit fix`
node_modules/minimist

node-forge  <=1.2.1
Severity: high
Improper Verification of Cryptographic Signature in node-forge - https://github.com/advisories/GHSA-x4jg-mjrx-434g
Improper Verification of Cryptographic Signature in `node-forge` - https://github.com/advisories/GHSA-2r2c-g63r-vccr
Improper Verification of Cryptographic Signature in node-forge - https://github.com/advisories/GHSA-cfm4-qjh2-4765
Open Redirect in node-forge - https://github.com/advisories/GHSA-8fr3-hfg3-gpgp
Prototype Pollution in node-forge debug API. - https://github.com/advisories/GHSA-5rrq-pxf6-6jx5
URL parsing in node-forge could lead to undesired behavior. - https://github.com/advisories/GHSA-gf8q-jrpm-jvxq
fix available via `npm audit fix --force`
Will install @devicefarmer/adbkit@3.2.2, which is a breaking change
node_modules/@devicefarmer/adbkit/node_modules/node-forge

11 vulnerabilities (1 moderate, 9 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force
node -v
v16.14.0

npm version
{
  'ws-scrcpy': '0.7.1',
  npm: '8.7.0',
  node: '16.14.0',
  v8: '9.4.146.24-node.20',
  uv: '1.44.1',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '93',
  nghttp2: '1.46.0',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '3.0.0',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0'
}
drauggres commented 2 years ago

Hi.

I'm aware of the problems with dependencies (https://github.com/NetrisTV/ws-scrcpy/pull/193).

Installation finished succesfully, everything should work. Those messages are just warning, there is nothing really dangerous.

But yes, they are annoying. I will try to review and merge #193 soon.

Alion548 commented 2 years ago

Hi.

I'm aware of the problems with dependencies (#193).

Installation finished succesfully, everything should work. Those messages are just warning, there is nothing really dangerous.

But yes, they are annoying. I will try to review and merge #193 soon.

Hi, I tried to start the service but it failed.

npm start

> ws-scrcpy@0.7.1 start
> npm run dist && npm run start:dist

> ws-scrcpy@0.7.1 dist
> npm run dist:prod

> ws-scrcpy@0.7.1 dist:prod
> npm run build:prod:webpack && npm run copy:package.json && npm run copy:license

> ws-scrcpy@0.7.1 build:prod:webpack
> webpack --config webpack/ws-scrcpy.prod.ts

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/root/service/ws-scrcpy/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/root/service/ws-scrcpy/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/root/service/ws-scrcpy/node_modules/webpack/lib/NormalModule.js:471:10)
    at /root/service/ws-scrcpy/node_modules/webpack/lib/NormalModule.js:503:5
    at /root/service/ws-scrcpy/node_modules/webpack/lib/NormalModule.js:358:12
    at /root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at makeSourceMapAndFinish (/root/service/ws-scrcpy/node_modules/ts-loader/dist/index.js:59:5)
    at successLoader (/root/service/ws-scrcpy/node_modules/ts-loader/dist/index.js:41:5)
    at Object.loader (/root/service/ws-scrcpy/node_modules/ts-loader/dist/index.js:24:5)
    at LOADER_EXECUTION (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
    at runSyncOrAsync (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
    at iterateNormalLoaders (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/root/service/ws-scrcpy/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/root/service/ws-scrcpy/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /root/service/ws-scrcpy/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /root/service/ws-scrcpy/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
drauggres commented 2 years ago
Error: error:0308010C:digital envelope routines::unsupported

This is caused by breaking change in node v17 (https://github.com/NetrisTV/ws-scrcpy/issues/172#issuecomment-1032560585).

It will require to upgrade to webpack@5 to fix this (i.e. to make ws-scrcpy compatible with node v17).

You can downgrade to node v16 (it is LTS) or use --openssl-legacy-provider with node v17 (more info)

drauggres commented 2 years ago
Error: error:0308010C:digital envelope routines::unsupported

fixed in #218