etcher: Error: (0 , h.requestMetadata) is not a function

  • Etcher version: 1.18.13 - 1.19.3
  • Operating system and architecture: NixOS, x86_64-linux
  • Image flashed: Arbitrary image
  • What do you think should have happened: Image selected successfully, being able to select target
  • What happened: Can’t select any image
  • Do you see any meaningful error information in the DevTools? No, same error as above.
Capture d’écran 2023-12-21 à 18 37 00

In Nixpkgs we package Etcher on the basis of the official deb. The procedure no longer works as of 1.18.13.

Likely a continuation of #4138. Probably that issue should be reopened? @dfunckt

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Reactions: 14
  • Comments: 52 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Like you but I’m using ArchLinux 😦

On arch linux, installed https://aur.archlinux.org/packages/etcher-bin from the AUR and it works, https://aur.archlinux.org/packages/balena-etcher shows the error. For what is worth, the etcher-bin pkg was last updated 2023-07-15, while balena-etcher was updated 2023-12-20.

Same issue on Ubuntu 22.04 with X11 using balenaEtcher-1.19.3-x64.AppImage but no error when using balenaEtcher-1.18.11-x64.AppImage

Also having this issue on Manjaro

On arch linux, installed https://aur.archlinux.org/packages/etcher-bin from the AUR and it works, https://aur.archlinux.org/packages/balena-etcher shows the error. For what is worth, the etcher-bin pkg was last updated 2023-07-15, while balena-etcher was updated 2023-12-20.

Thanks!!! etcher-bin is worked for me

Archlinux, Is this same problem? image

this has been an issue for 5 months with the balena-etcher aur. upon removing balena-etcher and replacing with etcher-bin, the issue is resolved.

yay -R balena-etcher
yay -S etcher-bin

wtf, this is still not fixed?

OS: Fedora 39 pkg: balena-etcher-1.19.4-1.x86_64.rpm

Looking at the inspector the error is thrown in the source-selector component here… https://github.com/balena-io/etcher/blob/v1.19.4/lib/gui/app/components/source-selector/source-selector.tsx#L425

requestMetadata which is imported from app is still undefined.

https://github.com/balena-io/etcher/blob/v1.19.4/lib/gui/app/app.ts#L139-L157

Since requestMetadata is initially defined as undefined there needs to be an additional check in selectSource to know that requestMetadata has been defined. It appears the only way to know this is listening for the emitted scan event, but I didn’t deep dive on a solution.

I use archlinux ,balenaEtcher-1.18.8-x64.AppImage can use

It looks like the move to building with electron-forge causes build issues on Arch, and this is why the AUR package is still on version 1.18.

Can we close this? @wegank

@ShalokShalom I might base my fork on the 1.18.x branch instead.

@aethernet @dfunckt @klutchell Is someone going to look at this? I’ve been waiting 2 months now. It prevents making working builds on Linux and Windows. I have a fork that still supports Windows 7, and this is blocking me from doing any more work on it. pkg or yao-pkg is not bundling all the native modules into etcher-util properly. I say yao-pkg because I tried @aethernet two patches related to this (and updating to Node 20, with no luck). Running pkg with --debug, the only thing I see is it complains about no prebuilt binaries. But shouldn’t it be building from source with electron-rebuild anyway?

Hello, same error here:

index.css:1     Failed to load resource: net::ERR_FILE_NOT_FOUND
gui.js:320  _____ _       _
|  ___| |     | |
| |__ | |_ ___| |__   ___ _ __
|  __|| __/ __| '_ \ / _ \ '__|
| |___| || (__| | | |  __/ |
\____/ \__\___|_| |_|\___|_|

Interested in joining the Etcher team?
Drop us a line at join+etcher@balena.io

Version = 1.18.14, Type = local
node:events:491 Uncaught Error: spawn /usr/lib/balena-etcher/generated/etcher-util ENOENT
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at __node_internal_errnoException (node:internal/errors:620:12)
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
gui.js:3 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
  Policy set or a policy with "unsafe-eval" enabled. This exposes users of
  this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ gui.js:3
gui.js:3 TypeError: requestMetadata is not a function
    at gui.js:278:1759
    at SourceSelector.selectSource (gui.js:278:2719)
    at SourceSelector.openImageSelector (gui.js:278:3117)
(anonymous) @ gui.js:3
gui.js:3 TypeError: requestMetadata is not a function
    at gui.js:278:1759
    at SourceSelector.selectSource (gui.js:278:2719)
    at SourceSelector.openImageSelector (gui.js:278:3117)
(anonymous) @ gui.js:3

Same on Arch on both x11 and wayland, installed with yay from aur (since people above were talking abt wayland)

AppImage works fine

Thanks for the reports guys. This basically means the sub-process etcher-utils could not be spawned properly (or is not yet ready). There might be more infos in the debug console. Can you check what it says ( Ctrl + Shift + I should open it) ?

Getting the same on Fedora 39 with version v1.19.3. Tried both RPM and AppImage formats. Same result. -1706048290684.log

Thanks for the reports guys. This basically means the sub-process etcher-utils could not be spawned properly (or is not yet ready). There might be more infos in the debug console. Can you check what it says ( Ctrl + Shift + I should open it) ?

Same problem here with EndeavourOS.