balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.27k stars 2.08k forks source link

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

Open wegank opened 8 months ago

wegank commented 8 months ago
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

Sargeanthost commented 8 months ago

Also having this issue on Manjaro

devM7MD commented 8 months ago

Like you but I'm using ArchLinux :(

polsvoice commented 8 months ago

I'm getting this with version 1.18.14 on Garuda.

myxor commented 8 months ago

Same for me on ArchLinux.

OffsetMonkey538 commented 8 months ago

Getting this on Nobara 38

Sargeanthost commented 8 months ago

Was initially trying on Hyprland, which is on Wayland. I download Cinnamon to test and Xorg environment and it worked for me. I used 1.8.13. Is anyone else on Wayland?

OffsetMonkey538 commented 8 months ago

I was on wayland

TerrorBite commented 8 months ago

I'm getting this issue on Manjaro with the 1.18.14 version from the AUR and I'm on X11. However, it lools like 1.18.14 released just a couple of days before #4132 was merged, meaning that the fix for #4138 wasn't included in that version. So any Arch/Manjaro issues (@Sargeanthost, @devM7MD, @myxor) should hopefully be fixed when 1.19.x lands on the AUR. Maybe I can try and manually build a 1.19 package and see if it works?

TerrorBite commented 8 months ago

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.

TobiPeterG commented 8 months ago

I have the same issue on openSUSE using the RPM and appimage

LITUATUI commented 8 months ago

Same problem here with EndeavourOS.

slagathor69 commented 7 months ago

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

shunkica commented 7 months ago

Same issue with balena-etcher-1.19.3-1.x86_64.rpm on Fedora 39

wthubhub commented 7 months ago

also have same issue with balena-etcher-1.19.3-1.x86_64.rpm on Fedora 39

eternallfrost commented 7 months ago

This issue does not occur on the appimage version of Etcher

dualrelax commented 7 months ago

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

aethernet commented 7 months ago

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) ?

ClassANetwork commented 7 months ago

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

Kaiddd commented 7 months ago

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

AppImage works fine

pamo22 commented 7 months ago

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) ?

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)
(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)

Unfortunately console does not have much info

JBlackCat commented 6 months ago

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.

nath1as commented 6 months ago

still an issue on arch

kdh8219 commented 6 months ago

Archlinux, Is this same problem? image

harperbolic commented 6 months ago

same problem, archlinux

Niskeletor commented 6 months ago

Experiencing the same issue here on Manjaro and Garuda Linux with balena-etcher-2:1.18.14-1.

Just as @Kaiddd commented, I can confirm that the balenaEtcher-1.5.109-x64.AppImage version works fine on both systems.

wasantosfi commented 6 months ago

Same issue here on ElementaryOS and Zorin OS with balenaEtcher-1.19.5-x64.AppImage. Confirmed that balenaEtcher-1.18.11-x64.AppImage worked on both systems.

dmophir commented 6 months ago

Experiencing this problem on my Dell XPS 9520 running Arch Linux. This is with balenaEtcher v1.18.14 from AUR, v1.18.12 AppImage, and v1.19.5 AppImage. Running GNOME 45.4 on Wayland with Intel GPU.

agoodfellow123 commented 6 months ago

Same on nix home-manager on arch, also if you open it as sudo it doesn't actually give that error however in my setup at least, root etcher doesn't show any graphics, it's just a white screen, but if you know where are the buttons are you can technically do it. Unsure of the safety of this since it's a root action. Not to mention if it gives an error there is no way of knowing it. Btw I'm on Wayland so if you get any graphics on x11 please let me know.

binarytrails commented 6 months ago

@aethernet thanks for the ctrl+shift+l trick! @kdh8219 I'm on latest greatest Arch Linux as of this day.

As temporary bypass I used a Windows 10 VM with latest portable build to flash it. It worked 10/10. https://github.com/balena-io/etcher/releases/download/v1.18.11/balenaEtcher-Portable-1.18.11.exe

Anyone got manual tricks to perform same task via terminal tools on Arch Linux?

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
gui.js:3 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: file:///usr/lib/balena-etcher/generated/lib/gui/app/css/fonts/SourceSansPro-SemiBold.ttf
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)
arbaes commented 6 months ago

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
pamo22 commented 6 months ago

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.

binarytrails commented 6 months ago

@pamo22 https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=etcher-bin looks legit and verifies binary sums, thanks!

Alex313031 commented 6 months ago

@aethernet @polsvoice @TerrorBite @myxor @JBlackCat @wegank @aethernet I have a fork I'm building, with Windows 7 support. I am also having this issue on MacOS and Windows (but not Linux, actually)

The thing is that pkg is not correctly bundling everything in etcher-util. Building 1.19.5 leads to a binary that is identical to the releases provided, except etcher-util is about half the size it should be. In the dev console, the same errors relating to etcher-util that people have noted above show up.

Integrating @aethernet your patch to use the new maintained pkg and node 20 types yields nothing. I also tried node 16, node 18, and node 20, and MSVS 2019 and MSVS 2022, to no avail. Also tried building it in git bash and MSYS2, again with no difference.

Alex313031 commented 5 months ago

@aethernet Pinging you again to take a look, as you seem to be the highest contributor, and this is affecting multiple users trying to run and trying to build Etcher on Linux & Windows (including me)

ShalokShalom commented 5 months ago

This just caused NixOS to remove the application from the repositories.

See: https://github.com/NixOS/nixpkgs/pull/295853

GarlandKey commented 5 months ago

OS: Arch Linux x86_64 Host: Framework 16 (AMD Ryzen 7040 Series) AJ Kernel: 6.8.1-arch1-1

Version: balenaEtcher (1.19.5).AppImage

Console log:

index.js:2 /tmp/.mount_balenaScyPgz/usr/lib/balena-etcher/resources/etcher-util
index.js:2 TypeError: (0 , h.requestMetadata) is not a function
    at index.js:140:1418
    at H.selectSource (index.js:140:2212)
    at H.openImageSelector (index.js:140:2543)
(anonymous) @ index.js:2
GarlandKey commented 5 months ago

OS: Arch Linux x86_64 Host: Framework 16 (AMD Ryzen 7040 Series) AJ Kernel: 6.8.1-arch1-1

Version: balenaEtcher (1.19.5).AppImage

Console log:

index.js:2 /tmp/.mount_balenaScyPgz/usr/lib/balena-etcher/resources/etcher-util
index.js:2 TypeError: (0 , h.requestMetadata) is not a function
    at index.js:140:1418
    at H.selectSource (index.js:140:2212)
    at H.openImageSelector (index.js:140:2543)
(anonymous) @ index.js:2
Alex313031 commented 5 months ago

@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?

ShalokShalom commented 5 months ago

Development on Etcher seems to have stopped. Personally, I switched to Ventoy and do not look back at all.

Alex313031 commented 5 months ago

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

Dagwal commented 5 months ago

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

gaby64 commented 4 months ago

wtf, this is still not fixed?

lh1207 commented 4 months ago

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
lekonai commented 4 months ago

thanks @lh1207 !

xZero707 commented 4 months ago

Sadly this remains unfixed. Tested on Fedora Linux 38 (Workstation Edition) with latest rpm. Etcher used to be a great tool.

florian6973 commented 4 months ago

Yes I have it on Redhat

aethernet commented 4 months ago

Guys, you're using pre-releases that are not marked as production ready for this exact reason.

6jarjar6 commented 4 months ago

Having this issue now on MacOS

djmadeira commented 4 months ago

Guys, you're using pre-releases that are not marked as production ready for this exact reason.

The problem for me at least is that the version available on AUR is an unstable release. Because Arch releases on a rolling basis there's no way for me to peg to the latest stable release other than checking out the source and building myself. So I think the issue is pushing prerelease builds to package repositories.

Alex313031 commented 4 months ago

@polsvoice @TerrorBite @myxor @gaby64 @wegank @lh1207 @GarlandKey @ShalokShalom @pamo22 @arbaes Looks like they finally fixed it with this commit > https://github.com/balena-io/etcher/commit/2dfa795129e287f887b9ea02f2eca717575d27ac