-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Comments
Also having this issue on Manjaro |
Like you but I'm using ArchLinux :( |
I'm getting this with version 1.18.14 on Garuda. |
Same for me on ArchLinux. |
Getting this on Nobara 38 |
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? |
I was on wayland |
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? |
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. |
I have the same issue on openSUSE using the RPM and appimage |
Same problem here with EndeavourOS. |
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 |
Same issue with balena-etcher-1.19.3-1.x86_64.rpm on Fedora 39 |
also have same issue with balena-etcher-1.19.3-1.x86_64.rpm on Fedora 39 |
This issue does not occur on the appimage version of Etcher |
I use archlinux ,balenaEtcher-1.18.8-x64.AppImage can use |
…v1.19.2)" This reverts commit 3906e49. Reverting update(v1.19.2 -> v1.18.12) Upstream Bug #4150 - balena-io/etcher#4150
Thanks for the reports guys. |
Getting the same on Fedora 39 with version v1.19.3. Tried both RPM and AppImage formats. Same result. |
Same on Arch on both x11 and wayland, installed with yay from aur (since people above were talking abt wayland) AppImage works fine |
Unfortunately console does not have much info |
OS: Fedora 39 Looking at the inspector the error is thrown in the
https://github.com/balena-io/etcher/blob/v1.19.4/lib/gui/app/app.ts#L139-L157 Since |
still an issue on arch |
same problem, archlinux |
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. |
Same issue here on ElementaryOS and Zorin OS with balenaEtcher-1.19.5-x64.AppImage. |
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. |
Running into the same issue with balena-etcher-1.19.22-1.x86_64.rpm on Fedora Workstation 40. Downloading the .ZIP version for Linux appears to work properly. Digging a little further:
The
The etcher-util included in the RPM package is significantly smaller. Running the
Looks like the version of etcher-util that's getting bundled with the .RPM package is corrupted somehow. So I tried:
And now the version that was installed via RPM is working properly with the "fixed" version of etcher-util. Not sure what's different, but I suspect something with the .rpm (and maybe .deb?) build is failing or causing corruption, where the version in the .zip file is not. |
Same issue on AntiX running Debian 11 |
Just encountered the same issue on Clear Linux OS, version 42210. I ran into this error with both |
rpmbuild strips executables by default when generating an rpm packge. This was causing the JavaScript code bundled in the etcher-util file to be removed, causing "Pkg: Error reading from file." whenever etcher-util was called. This in turn caused balena-etcher to generate the error message `Error: (0, h.requestMetadata) is not a function` when attempting to write an SD card. This fixes the issue for RPM builds by replacing the `strip` command with `true` so that rpmbuild no longer strips the executables and the embeded code stays intact. See: balena-io#4150
rpmbuild strips executables by default when generating an rpm packge. This was causing the JavaScript code bundled in the etcher-util file to be removed, causing "Pkg: Error reading from file." whenever etcher-util was called. This in turn caused balena-etcher to generate the error message `Error: (0, h.requestMetadata) is not a function` when attempting to write an SD card. This fixes the issue for RPM builds by replacing the `strip` command with `true` so that rpmbuild no longer strips the executables and the embeded code stays intact. See: balena-io#4150 Signed-off-by: Richard Glidden <[email protected]>
I did a bunch of investigation, and found root cause of the problem, at least for the .RPM packages. By default, I submitted PR #4304 to work around the issue, at least for RPM builds. Ideally we could pass a custom .spec file into rpmbuild, but this is currently not possible. So the PR just disables the A better solution would be to add a custom .spec file to the repo, then pass that into I haven't had a chance to look into the AppImage yet, but it could be a similar issue. |
I took a really quick look at the AppImage, which is also failing for me on Fedora Workstation 40. It looks like it's a different issue that's causing the same error message. Running the .AppImage file directly fails with the same error message. But extracting the image with I might try to take a deeper look at it later. Sounds like a good opportunity to learn how AppImages work under the hood. :) |
Did a little more investigation on the AppImage. What's happening here is a bit different. In lib/gui/app/modules/api.ts there is a bit of code that tries to spawn the In the current AppImage, spawning either of these instances fails. Digging a bit further into the code, there is this routine that tries to determine the location of the async function writerArgv(): Promise<string[]> {
let entryPoint = await window.etcher.getEtcherUtilPath();
// AppImages run over FUSE, so the files inside the mount point
// can only be accessed by the user that mounted the AppImage.
// This means we can't re-spawn Etcher as root from the same
// mount-point, and as a workaround, we re-mount the original
// AppImage as root.
if (os.platform() === 'linux' && process.env.APPIMAGE && process.env.APPDIR) {
entryPoint = entryPoint.replace(process.env.APPDIR, '');
return [
process.env.APPIMAGE,
'-e',
`require(\`\${process.env.APPDIR}${entryPoint}\`)`,
];
} else {
return [entryPoint];
}
} This code is failing whenever it's in an AppImage. It's building up a command line that fails to execute, or at least fails to do the correct thing and start the utility. I was able to work around the first instance of this error for the unprivileged access by passing in the flag that indicates whether the child process needs to be privileged or not so that for the unprivileged helper it just returns the standard However, it still fails when it gets to actually writing to the target device, because at that point (as the comment above correctly notes) the mounted AppImage is no longer available to the I haven't figured out why exactly this is failing as I'm not exactly a JavaScript developer myself, and I don't fully understand what processes the flowchart LR
AppImage --> AppRun
AppRun --> balena-etcher
balena-etcher --> electron
electron --> JavaScript
And I'm not really sure which step in the process is responsible for deciding to run I'll keep poking at it, but hopefully this helps someone more familiar with the code narrow in on the issue. |
I did run into the same problem on MacOS Monterey 12.6.5 but after reloading the program, I was able to flash without issues. I had Etcher on this machine in the past, always worked, deleted it at some point, then reinstalled. For reference |
rpmbuild strips executables by default when generating an rpm packge. This was causing the JavaScript code bundled in the etcher-util file to be removed, causing "Pkg: Error reading from file." whenever etcher-util was called. This in turn caused balena-etcher to generate the error message `Error: (0, h.requestMetadata) is not a function` when attempting to write an SD card. This fixes the issue for RPM builds by replacing the `strip` command with `true` so that rpmbuild no longer strips the executables and the embeded code stays intact. See: balena-io#4150 Signed-off-by: Richard Glidden <[email protected]>
That solved if for me on my Ubuntu 24.04. Thanks. |
Thanks a lot. That one works as expected! |
Same issue on Sonoma 14.4.1. Restarted the app and worked ok. |
Same issue on windows 1.19.21 |
Thanks @rglidden 🙏. At least someone is looking deeper into this issue. I'd like ot know how you got that far but I know this is not the forum for those kind of questions. |
Well, it might help someone else troubleshoot it further, so... All I did was clone the repo, install the dev dependencies (I know enough about JavaScript that From there, I just modified the code to add extra debug logs where needed (use CTRL-SHIFT-I to see the logs while Etcher is running), then by reading the code, a bit of trial and error, and unpacking the resulting AppImage, I narrowed in on the areas that are failing. Some of the earlier comments in this thread and others also helped a bit. I'm confident that etcher-util is not starting when running in the AppImage. I just still don't understand what's supposed to respond to those command-line parameters to make it run. As far as I can tell, nothing processes the command-line arguments, unless there's some magic in Electron or JavaScript in general that I don't fully understand. |
same issue here on macos 12 while trying to flash Fedora-KDE-Live-x86_64-40-1.14.iso |
hmm weird... restarting the program helped |
For me, simply running balenaEtcher-1.19.21 as Administrator solved the problem. |
same issue, fedora 40, kde, wayland |
This has been driving me nuts as well... decided to finally dig in. :) Debian 12 Upon comparing the file changes from 1.8.12 to 1.8.13, I noticed there is a new file - lib/util/source-metadata.ts ... maybe this has something to do with it? Other notable changes are upgrades to electron and java packages. I am cuurently using 1.8.12 through AM with am --launcher /home/AppImages/balenaEtcher-1.18.12-x64.AppImage and that seems to be working fine for now. |
Unsure if this was the actual fix, but i'm on MacOS Sequoia and right clicking the application, get info and changing the read only permissions to read write for all users and drives worked for me. |
can confirm on windows that close then re-open the app work |
Same error opening source on LMDE6 with balenaEtcher-1.19.21-x64.AppImage version. |
Same error opening source on 1.19.21-1.x86_64 RPM and appimage. Running OpenSUSE Tumbleweed. Closing and reopening has no effect. The 1.18.11 appimage works fine. |
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
The text was updated successfully, but these errors were encountered: