Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Arduino installation failed due to the bogus output parsing design #189

Closed
reyang opened this issue May 3, 2017 · 6 comments
Closed

Arduino installation failed due to the bogus output parsing design #189

reyang opened this issue May 3, 2017 · 6 comments
Assignees

Comments

@reyang
Copy link
Member

reyang commented May 3, 2017

image

This is the wrong way of doing things - we should not try to parse the command ouput, instead we want to check the return code (e.g. %ERRORLEVEL% == 0).

@reyang reyang added the Bug label May 3, 2017
@liydu liydu assigned liydu, helenlivsc and Eskibear and unassigned liydu May 4, 2017
@helenlivsc
Copy link
Contributor

To know more info about the error, can you take the followings?

  1. Open a command window
  2. Expand to path c:\program files (x86)\Arduino
  3. Run the command Arduino_debug.exe then capture a screenshot to attach here
  4. Run the exact command in the screenshot above then capture a screenshot to attach here

@reyang
Copy link
Member Author

reyang commented May 4, 2017

It makes me feel that we're still trying to figure out what the output message is - this is wrong.
We need to check the return code, and forget about the output (if the output message is localized, do we end up parsing different languages? what if the wording changed?)

@helenlivsc
Copy link
Contributor

Per a quick research, the output should include the call stack of the failure.

@reyang
Copy link
Member Author

reyang commented May 4, 2017

There is nothing wrong with arduino_debug.exe, it finished successfully, with a message in stderr complaining about the DPI.

The correct way of fixing this problem should be:

  1. spawn the arduino_debug.exe by redirecting the stdout and stderr.
  2. when the process finished, check the error code, if the exit code equals to zero, report success and done
  3. if the error code is non-zero, report failure with whatever captured from stderr.

@helenlivsc
Copy link
Contributor

I am sorry for the mind slip and thanks for your explanation. I tried to fix it through optimizing the related Promise.

@helenlivsc
Copy link
Contributor

Tested the fix with a machine which presents the same issue and it works fine now. Shipped the fix to next installation package.

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

No branches or pull requests

4 participants