Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wegank opened this issue Dec 21, 2023 · 51 comments
Open

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

wegank opened this issue Dec 21, 2023 · 51 comments

Comments

@wegank
Copy link

wegank commented Dec 21, 2023

  • 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

@Sargeanthost
Copy link

Also having this issue on Manjaro

@devM7MD
Copy link

devM7MD commented Dec 24, 2023

Like you but I'm using ArchLinux :(

@polsvoice
Copy link

I'm getting this with version 1.18.14 on Garuda.

@myxor
Copy link

myxor commented Dec 26, 2023

Same for me on ArchLinux.

@OffsetMonkey538
Copy link

Getting this on Nobara 38

@Sargeanthost
Copy link

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
Copy link

I was on wayland

@TerrorBite
Copy link

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
Copy link

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
Copy link

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

@LITUATUI
Copy link

LITUATUI commented Jan 8, 2024

Same problem here with EndeavourOS.

@slagathor69
Copy link

slagathor69 commented Jan 14, 2024

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
Copy link

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

@wthubhub
Copy link

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

@dualrelax
Copy link

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

scottfurry pushed a commit to scottfurry/FurCaT_Gentoo that referenced this issue Jan 19, 2024
…v1.19.2)"

This reverts commit 3906e49.

Reverting update(v1.19.2 -> v1.18.12)
Upstream Bug #4150 - balena-io/etcher#4150
@aethernet
Copy link
Contributor

aethernet commented Jan 23, 2024

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
Copy link

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
Copy link

Kaiddd commented Feb 3, 2024

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

AppImage works fine

@pamo22
Copy link

pamo22 commented Feb 9, 2024

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
Copy link

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
Copy link

nath1as commented Feb 12, 2024

still an issue on arch

@kdh8219
Copy link

kdh8219 commented Feb 14, 2024

Archlinux, Is this same problem?
image

@harperbolic
Copy link

same problem, archlinux

@Niskeletor
Copy link

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
Copy link

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
Copy link

dmophir commented Feb 19, 2024

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
Copy link

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
Copy link

binarytrails commented Feb 22, 2024

@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
Copy link

arbaes commented Feb 23, 2024

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
Copy link

pamo22 commented Feb 26, 2024

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
Copy link

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

@Alex313031
Copy link

@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
Copy link

@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
Copy link

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

See: NixOS/nixpkgs#295853

@GarlandKey
Copy link

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

1 similar comment
@GarlandKey
Copy link

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
Copy link

Alex313031 commented Apr 9, 2024

@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
Copy link

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

@Alex313031
Copy link

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

@Dagwal
Copy link

Dagwal commented Apr 10, 2024

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
Copy link

gaby64 commented Apr 14, 2024

wtf, this is still not fixed?

@lh1207
Copy link

lh1207 commented Apr 14, 2024

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
Copy link

lekonai commented Apr 15, 2024

thanks @lh1207 !

@xZero707
Copy link

xZero707 commented Apr 15, 2024

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

@florian6973
Copy link

florian6973 commented Apr 24, 2024

Yes I have it on Redhat

@aethernet
Copy link
Contributor

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

@6jarjar6
Copy link

Having this issue now on MacOS

@djmadeira
Copy link

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
Copy link

@polsvoice @TerrorBite @myxor @gaby64 @wegank @lh1207 @GarlandKey @ShalokShalom @pamo22 @arbaes Looks like they finally fixed it with this commit > 2dfa795

@LeeBinder
Copy link

@Alex313031 that's great news, thanks for letting us all know 👍

I can confirm this bug indeed fixed with https://github.com/balena-io/etcher/releases/tag/v1.19.16 🥇

@ShalokShalom
Copy link

Can we close this? @wegank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests