-
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: 'MySQL' is not recognised as an internal or external command #1025
Comments
We've previously seen something very similar to this on Gitter https://gitter.im/resin-io/etcher?at=582a14e945c9e3eb4339d229 @jviotti Did we ever get any ideas what might be causing this? @RobertLutken Would you be willing to help us debug this? Do you currently have MySQL installed on your PC, or have you had it installed previously? |
@lurch I do indeed have MySQL installed, well MySQL workbench. |
Hey there @RobertLutken ! Thanks a lot for reporting! We've very recently fixed the Regarding the MySQL error, I think its simply output coming from your environment every time you type a command, and should be safely ignored by our drive detection parser (see balena-io-modules/drivelist#99). So just to confirm the issue is gone, can you try the following
Also, can you open |
Hello Same error message, in French this time :-) Etcher-1.0.0-beta.18-win32-x64 Anything I can do to help? |
Hi @daturach , Can you try running the Also, what happens if you any command on |
Hi @daturach , Can you also paste a screenshot of the error dialog? |
Hello @jviotti Thanks for your quick answer. As a side note, this dialog box is not even supporting accented chars...:-( Running win32.bat before the fix: This MySQL error message is displayed only once. Other commands run into the same cmd.exe does not show this message anymore. Running win32.bat after the fix displays the list of devices as above but without the error message if run in the same session. Command Hope that helps! |
I think I have a theory about this. While our YAML parser will ignore invalid keys (balena-io-modules/drivelist#99), the JavaScript code that executes the // See https://github.com/resin-io-modules/drivelist/blob/master/lib/scripts.js
if (stderr.trim().length) {
return callback(new Error(stderr));
} This seems to be what's happening given that the error contains both MySQL warning instead of just one (if the YAML parser would have been complaining about this, it would have complained about the first warning only, and we would have a YAML related stack trace). I'm not very sure about what to do here. We can of course ignore I guess another way to go about it would be to only omit warning messages that match certain patterns, although I worry we will be maintaining a huge list of warnings (in multiple languages). @lurch What do you think? |
In the mid-time, in order to validate this theory, I'll produce a custom Windows build that logs a warning instead of throwing an error if the child process includes |
Hmmm, given that we've only ever seen this error for MySQL (for a still-unknown reason) but for multiple times, I'd be tempted to filter out only any stderr messages starting with Also, should there be a separate issue for the French error-dialog not correctly showing accented characters? |
It seems to be a MySQL
Yeah, maybe, although the fact that a similar error might be reported in the future makes me feel a bit uncomfortable. I have an alternative solution: What about allowing the drivelist client to pass a function to handler A similar approach would be to allow some option in drivelist to print |
I googled, and as expected the first few results are from people actually trying to run
:-D |
@lurch, jviotti Running win32.bat with the PATH between "" does not produce any MySQL error. |
Amazing discovery! This might indeed be the reason! I'm uploading a custom build with these changes and we'll see how it goes :) |
@daturach Can you try the following custom build as well just to confirm? https://drive.google.com/open?id=0B7tkbonGU-RyNTRxdlBhRVgwQnc. |
Let me try here. I might have messed something up when editing the files straight in the asar archive. |
Try this one: https://drive.google.com/open?id=0B7tkbonGU-RyUnJxbm5WeVpSM1U. Indeed messed up the previous one, sorry about that :) |
Ok thanks; it's looking fine. MySQL error message disappeared. |
Woohoo! Thanks a lot for the help on this issue. I'll send a patch to apply this fix! |
All the credit to @lurch and his amazing observations of course \o/ |
Failing to do so can introduce problems when some of the directories in include spaces in their paths, eventually manifesting themselves as weird "is not recognized as an internal or external command, operable program or batch file" errors. See: balena-io/etcher#1025 Signed-off-by: Juan Cruz Viotti <[email protected]>
Change-Type: patch Changelog-Entry: Fix 'MySQL' is not recognised as an internal or external command error on Windows. See: balena-io-modules/drivelist#133 Fixes: #1025 Signed-off-by: Juan Cruz Viotti <[email protected]>
should we just be double-quoting everything-in-general and get it over
with? it seems so many issues end with "use double quotes"
…--
*Alexandros Marinos*
Founder & CEO, Resin.io
+1 206-637-5498
@alexandrosm
On Fri, Jan 27, 2017 at 1:47 PM, Juan Cruz Viotti ***@***.***> wrote:
All the credit to @lurch <https://github.com/lurch> and his amazing
observations of course \o/
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1025 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABLUCGjBlkP2d2KwzOBiuX8iYBWNrbR5ks5rWmXUgaJpZM4Li2lr>
.
|
Change-Type: patch Changelog-Entry: Fix 'MySQL' is not recognised as an internal or external command error on Windows. See: balena-io-modules/drivelist#133 Fixes: #1025 Signed-off-by: Juan Cruz Viotti <[email protected]>
I'll definitely check if we can use double quotes elsewhere. At least in the Windows script, everything else is quoted already. |
I've sent two PRs addressing issues highlighted by
This tool, among other improvements, highlighted all the places where we should quote for safety purposes. |
The text was updated successfully, but these errors were encountered: