[Bug 258573] www/chromium Could not install package: 'FAILED_TO_COPY_EXTENSION_FILE_TO_TEMP_DIRECTORY'

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 16 Jan 2022 18:37:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258573

--- Comment #15 from mario felicioni <marietto2008@gmail.com> ---
Hello.

I'm running FreeBSD 13 + chromium browser. Because of this bug I'm not able to
install any extension using the traditional method. Anyway I tried the
workaround suggested :

download the extension you want to install from the web, e.g.
"uBlock0_1.39.3b4.chromium.zip" and unzip it (the folder name is
"uBlock0.chromium"); 2) open Chromium, type "about://extensions" and activate
"Developer mode"; 3) drag the folder "uBlock0.chromium" with the extracted
plugin. This way it works fine.

I tried to compile adblockplus :

https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/

from source,but it failed : (someone has a similar extension,already compiled
and unpacked to suggest ? I can't "live" without an adblocker. thanks. 

marietto:/usr/home/marietto/Downloads/adblockplusui # npx gulp build -t chrome
-c development
npx: installed 324 in 38.142s

[19:11:08] Local modules not found in
/usr/home/marietto/Downloads/adblockplusui
[19:11:08] Try running: npm install
root@marietto:/usr/home/marietto/Downloads/adblockplusui # npm install
npm WARN read-shrinkwrap This version of npm is compatible with
lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2.
I'll try to do my best with it!

> canvas@2.7.0 install /usr/home/marietto/Downloads/adblockplusui/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404):
https://github.com/Automattic/node-canvas/releases/download/v2.7.0/canvas-v2.7.0-node-v93-freebsd-unknown-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for canvas@2.7.0 and
node@16.13.0 (node-v93 ABI, unknown) (falling back to source compile with
node-gyp) 
(node:13456) [DEP0150] DeprecationWarning: Setting process.config is
deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gmake: Entering directory
'/usr/home/marietto/Downloads/adblockplusui/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
../src/backend/Backend.cc:111:10: warning: address of stack memory associated
with local variable 'msg' returned [-Wreturn-stack-address]
  return msg.c_str();
         ^~~
2 warnings generated.
  CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/backend/PdfBackend.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/backend/SvgBackend.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/bmp/BMPParser.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/Backends.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/Canvas.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
../src/Canvas.cc:411:49: warning: result of comparison of constant 4294967296
with expression of type 'uint32_t' (aka 'unsigned int') is always false
[-Wtautological-constant-out-of-range-compare]
    if (static_cast<uint32_t>(canvas->nBytes()) > node::Buffer::kMaxLength) {
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/closure.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/color.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/Image.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
../src/Image.cc:1164:3: warning: 'rsvg_handle_get_dimensions' is deprecated:
Use 'rsvg_handle_get_intrinsic_size_in_pixels' instead
[-Wdeprecated-declarations]
  rsvg_handle_get_dimensions(_rsvg, dims);
  ^
/usr/local/include/librsvg-2.0/librsvg/rsvg.h:726:1: note:
'rsvg_handle_get_dimensions' has been explicitly marked deprecated here
RSVG_DEPRECATED_FOR(rsvg_handle_get_intrinsic_size_in_pixels)
^
/usr/local/include/librsvg-2.0/librsvg/rsvg.h:50:32: note: expanded from macro
'RSVG_DEPRECATED_FOR'
#define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API
                               ^
/usr/local/include/glib-2.0/glib/gmacros.h:1112:44: note: expanded from macro
'G_DEPRECATED_FOR'
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "'
instead")))
                                           ^
../src/Image.cc:1203:24: warning: 'rsvg_handle_render_cairo' is deprecated: Use
'rsvg_handle_render_document' instead [-Wdeprecated-declarations]
  gboolean render_ok = rsvg_handle_render_cairo(_rsvg, cr);
                       ^
/usr/local/include/librsvg-2.0/librsvg/rsvg-cairo.h:94:1: note:
'rsvg_handle_render_cairo' has been explicitly marked deprecated here
RSVG_DEPRECATED_FOR(rsvg_handle_render_document)
^
/usr/local/include/librsvg-2.0/librsvg/rsvg.h:50:32: note: expanded from macro
'RSVG_DEPRECATED_FOR'
#define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API
                               ^
/usr/local/include/glib-2.0/glib/gmacros.h:1112:44: note: expanded from macro
'G_DEPRECATED_FOR'
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "'
instead")))
                                           ^
3 warnings generated.
  CXX(target) Release/obj.target/canvas/src/ImageData.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/init.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  CXX(target) Release/obj.target/canvas/src/register_font.o
warning: unknown warning option '-Wno-cast-function-type'; did you mean
'-Wno-bad-function-cast'? [-Wunknown-warning-option]
1 warning generated.
  SOLINK_MODULE(target) Release/obj.target/canvas.node
  COPY Release/canvas.node
gmake: Leaving directory
'/usr/home/marietto/Downloads/adblockplusui/node_modules/canvas/build'

> chromedriver@96.0.0 install /usr/home/marietto/Downloads/adblockplusui/node_modules/chromedriver
> node install.js

Current existing ChromeDriver binary is unavailable, proceeding with download
and extraction.
Downloading from file: 
https://chromedriver.storage.googleapis.com/96.0.4664.45/chromedriver_mac64.zip
Saving to file: /tmp/96.0.4664.45/chromedriver/chromedriver_mac64.zip
Received 1040K...
Received 2080K...
Received 3120K...
Received 4160K...
Received 5200K...
Received 6240K...
Received 7280K...
Received 8041K total.
Extracting zip contents to /tmp/96.0.4664.45/chromedriver.
Copying from /tmp/96.0.4664.45/chromedriver to target path
/usr/home/marietto/Downloads/adblockplusui/node_modules/chromedriver/lib/chromedriver
Fixing file permissions.
Done. ChromeDriver binary available at
/usr/home/marietto/Downloads/adblockplusui/node_modules/chromedriver/lib/chromedriver/chromedriver

> node-sass@4.14.1 install /usr/home/marietto/Downloads/adblockplusui/node_modules/node-sass
> node scripts/install.js

Downloading binary from
https://github.com/sass/node-sass/releases/download/v4.14.1/freebsd-x64-93_binding.node
Cannot download
"https://github.com/sass/node-sass/releases/download/v4.14.1/freebsd-x64-93_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> electron@2.0.18 postinstall /usr/home/marietto/Downloads/adblockplusui/node_modules/electron
> node install.js

Downloading electron-v2.0.18-freebsd-x64.zip
Error: GET
https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-freebsd-x64.zip
returned 404
/usr/home/marietto/Downloads/adblockplusui/node_modules/electron/install.js:54
  throw err
  ^

Error: Failed to find Electron v2.0.18 for freebsd-x64 at
https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-freebsd-x64.zip
    at Request.<anonymous>
(/usr/home/marietto/Downloads/adblockplusui/node_modules/nugget/index.js:169:61)
    at Request.emit (node:events:390:28)
    at Request.onRequestResponse
(/usr/home/marietto/Downloads/adblockplusui/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (node:events:390:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming]
(node:_http_client:623:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:487:22)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
npm WARN The package glob is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current:
{"os":"freebsd","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@2.0.18 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@2.0.18 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-01-16T18_12_58_931Z-debug.log
root@marietto:/usr/home/marietto/Downloads/adblockplusui # npx gulp build -t
chrome -c development
npx: installed 324 in 27.892s
Local gulp not found in /usr/home/marietto/Downloads/adblockplusui
Try running: npm install gulp

marietto:/usr/home/marietto/Downloads/adblockplusui # npm install gulp

npm WARN read-shrinkwrap This version of npm is compatible with
lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2.
I'll try to do my best with it!
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade
to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and
could be using insecure binaries. Upgrade to fsevents 2.

> electron@2.0.18 postinstall /usr/home/marietto/Downloads/adblockplusui/node_modules/electron
> node install.js

Downloading electron-v2.0.18-freebsd-x64.zip
Error: GET
https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-freebsd-x64.zip
returned 404
/usr/home/marietto/Downloads/adblockplusui/node_modules/electron/install.js:54
  throw err
  ^

Error: Failed to find Electron v2.0.18 for freebsd-x64 at
https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-freebsd-x64.zip
    at Request.<anonymous>
(/usr/home/marietto/Downloads/adblockplusui/node_modules/nugget/index.js:169:61)
    at Request.emit (node:events:390:28)
    at Request.onRequestResponse
(/usr/home/marietto/Downloads/adblockplusui/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (node:events:390:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming]
(node:_http_client:623:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:487:22)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7
(node_modules/glob-watcher/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current:
{"os":"freebsd","arch":"x64"})
npm WARN stylelint-config-eyeo@1.0.3 requires a peer of stylelint@^8.0.0 but
none is installed. You must install peer dependencies yourself.
npm WARN stylelint-config-recommended@1.0.0 requires a peer of stylelint@^8.0.0
but none is installed. You must install peer dependencies yourself.
npm WARN stylelint-order@0.7.0 requires a peer of stylelint@^8.0.0 but none is
installed. You must install peer dependencies yourself.
npm WARN The package glob is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current:
{"os":"freebsd","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@2.0.18 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@2.0.18 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marietto/.npm/_logs/2022-01-16T18_14_10_748Z-debug.log

-- 
You are receiving this mail because:
You are the assignee for the bug.