-
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
Command failed: C:\Users\<username>\AppData\Local\Temp\XXXX.tmp.bat (code 1) #1054
Comments
Looks like an issue with our drive scanner script in your PC. Can you try running the following |
output as follows:
|
Can you try running |
returns 0 I tested both by running it from the command line and including the the cmd file. both returned 0 Tim |
Hi @timjstone , That's weird. Your error comes from a The only I have two theories:
To validate this theory, try running Etcher and the win32.bat with different combinations of drives plugged in, and see if you can reproduce the failure only when a certain drive is there.
Here is the Let me know how that goes! |
i have checked the script and yes it is identical to the temporary bat files created and run. the file you pointed to me works the same (i.e. no errors when run manually) i have disconnected all the drives i can (the laptop i am using has two built in drives both SSDs (one on a M2 interface) running as an administrator still fails (so doesn't seem to be permissions related). the error seems to imply that it is having a problem closing the child process. for reference i am using the newest Windows 10 preview build 15014 |
@jviotti Would it be easy to add some custom logging here, to determine whether the .bat file can't be executed at all, or if it started executing and failed mid-way through? (and if so, at which point it failed?) |
@lurch If the script didn't complete successfully we don't inspect its Most of these errors hide their root cause as subtleties in the error message. I wonder if by copy pasting the error, some of this information got lost. @timjstone Do you mind posting a screenshot of the error window? |
Weird. Maybe this is also failing because of stderr output, like #1025? @timjstone Do you mind trying this custom build? |
I'm honestly clueless about this one. I sent a PR to |
@timjstone Can you run the following custom build: Once the error happens, click OK, and then once Etcher opens up, press Ctrl+Alt+I to open DevTools, go to the Console pane, and copy paste what you see there here. |
|
for info, when i try to select a drive in step 2, it says no removable drives. Tim |
Hi Tim, Thank you very much for the fast response, that's really appreciated! So it looks like the drive detection shell script exits with code 1, even though it outputs valid stuff to I'm pretty sure that if it was a VBScript error, stderr would include at least a useful error message pointing the VBScript problematic line, which makes me think this comes from the batch wrapper: set "PATH=%PATH%;%SYSTEMROOT%\System32"
cscript //nologo "%~f0?.wsf"
exit /b %ERRORLEVEL% Here comes the nice part. If a command fails, it sets @timjstone Can you confirm that the output you pasted above includes all your connected drives?
Yeah, that's expected. The drive scanner is failing, so you'll not be able to select any drives. |
In order to confirm this theory, I'll create a new custom build that resets the error level at the beginning of the batch script. |
The way that error level works is absurd. Almost no command resets the error level, but some internal ones do. Even worse, if you do |
Turns out ERRORLEVEL might carry errors from previous commands, given that not every command resets it when exitting successfully. This prevents us from getting false error alerts and helps us know for sure that an exit code originated from drivelist. See: balena-io/etcher#1054 Signed-off-by: Juan Cruz Viotti <[email protected]>
@timjstone Here's a new custom build containing the patch described above: https://drive.google.com/open?id=0B7tkbonGU-Ryb1hybnVvYlYtQ1k Let us know how it goes, and thank you very much for you help debugging this issue! |
unfortunately, the same problem Tim |
@timjstone Is it the same code number in the error title? E.g: (code 1) |
@timjstone Do you mind trying this little program? https://drive.google.com/file/d/0B7tkbonGU-RyT0Z0Qm8zOHFuVk0/view?usp=sharing You should execute it from cmd.exe or PowerShell by running the Its basically Node v6.1.0 (which we use on Etcher) calling |
yes we get the same error
or: Command failed: C:\Program Files
(x86)\Etcher\node_modules\drivelist\scripts\win32.bat
(code 1)
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
…On Mon, 6 Mar 2017 at 21:13 Juan Cruz Viotti ***@***.***> wrote:
@timjstone <https://github.com/timjstone> Do you mind trying this little
program?
https://drive.google.com/file/d/0B7tkbonGU-RyT0Z0Qm8zOHFuVk0/view?usp=sharing
You should execute it from cmd.exe or PowerShell by running the run.bat
script in there.
Its basically Node v6.1.0 (which we use on Etcher) calling drivelist. If
this fails with the same error message, then we're in good track, since
we'd have a very small reproducible example. If this doesn't fail, then I
honestly have no clue about what might be going on, so let's hope it fails
:)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1054 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMUjF8dzWOJnIuA1GI31euwU9Lx_-M_ks5rjHcRgaJpZM4Lur9t>
.
|
I only use Windows defender, no other anti virus installed, if that is any help Tim |
*shrug* I suspect there's so many different virus-scanner programs, who knows how they all work! ;-) |
@lurch "windows defender" is the default microsoft one.
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Wed, May 3, 2017 at 7:39 PM, Andrew Scheller ***@***.***> wrote:
*shrug* I suspect there's so many different virus-scanner programs, who
knows how they all work! ;-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1054 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCFFjfXHwWpZvCXwMRguntfV-_Hbmks5r2MnxgaJpZM4Lur9t>
.
|
@alexandrosm My comment was directed at @jhermsmeier , rather than at @timjstone ;) |
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Signed-off-by: Juan Cruz Viotti <[email protected]>
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) - Cleanup temporary scripts after execution Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Fixes: #1571 Signed-off-by: Juan Cruz Viotti <[email protected]>
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) - Cleanup temporary scripts after execution Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Fixes: #1571 Signed-off-by: Juan Cruz Viotti <[email protected]>
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) - Cleanup temporary scripts after execution Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Fixes: #1571 Signed-off-by: Juan Cruz Viotti <[email protected]>
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) - Cleanup temporary scripts after execution This PR also sets the DRIVELIST_DEBUG environment variable to enable debug information from Windows' drivelist implementation. Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Fixes: #1571 See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md Signed-off-by: Juan Cruz Viotti <[email protected]>
This version contains various improvements on the drive detection system mainly on Windows. The improvements can be summarized as follows: - Drivelist no longer spawns a .bat script to perform its job. This means that a lot of spawning related issues are now fixed - Drivelist doesn't fetch drive sizes from WMI anymore, which was known to incorrectly report a very small size for certain drives, causing the famous "0.0 GB" Windows issues (see balena-io-modules/drivelist#142) - Cleanup temporary scripts after execution This PR also sets the DRIVELIST_DEBUG environment variable to enable debug information from Windows' drivelist implementation. Change-Type: patch Changelog-Entry: Implement Windows drive detection using C++ Changelog-Entry: Fix various Windows `.bat` spawning issues Changelog-Entry: Fix 0.0 GB Windows drive detection issues Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems Fixes: #1108 Fixes: #1054 Fixes: #995 Fixes: #1483 Fixes: #1142 Fixes: #1571 See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md Signed-off-by: Juan Cruz Viotti <[email protected]>
Please see #1574 (comment) |
@babi-bibaak that error doesn't seem to have anything to do with Etcher |
@babi-bibaak Please ensure that you're using the latest version of Etcher v1.2.1 |
I posted a solution that worked for me in #1793 |
Which USB adapter are you using? I own a USB cd/DVD adapter, and it's just
not very high quality and doesn't work most times I try to use it.
…On Thu, Sep 13, 2018 at 6:57 PM, Frank Gorham-Engard < ***@***.***> wrote:
I posted a solution that worked for me in #1793
<#1793>
SD micro card was plugged in to a USB adapter when it was formatted by SD
formatter. But after I reformatted in the SD adapter, I was able to install
the image successfully with Etcher.
Something about formatting in a USB adapter?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1054 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADpgDjP86Ydp-w3K-rHch-6CbofSdWOtks5uawz1gaJpZM4Lur9t>
.
|
when starting Etcher, i get the following, and Etcher doesn't start
The text was updated successfully, but these errors were encountered: