Skip to content

Unable to build #126

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

Open
1Map opened this issue Aug 2, 2020 · 3 comments
Open

Unable to build #126

1Map opened this issue Aug 2, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@1Map
Copy link

1Map commented Aug 2, 2020

Unable to build - Keep on failing with
Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip

androidjs b -f
Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip
failed to download, retrying..
re-trying
failed to download, retrying..
re-trying
failed to download, retrying..
re-trying

@Chhekur
Copy link
Member

Chhekur commented Aug 2, 2020

Do you have active and stable internet connection?

@RFlintstone
Copy link

Do you have active and stable internet connection?

I have a stable internet connection and I have pretty much the same problem.

Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip
C:\Users\rwfli\AppData\Roaming\npm\node_modules\androidjs-builder\src\modules\Html\ProgressBar.js:35
        process.stdout.clearLine();
                       ^

TypeError: process.stdout.clearLine is not a function
    at LoadingBar.clear (C:\Users\rwfli\AppData\Roaming\npm\node_modules\androidjs-builder\src\modules\Html\ProgressBar.js:35:24)
    at LoadingBar.next (C:\Users\rwfli\AppData\Roaming\npm\node_modules\androidjs-builder\src\modules\Html\ProgressBar.js:23:14)
    at Timeout._onTimeout (C:\Users\rwfli\AppData\Roaming\npm\node_modules\androidjs-builder\src\modules\Html\ProgressBar.js:42:18)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

@Chhekur Chhekur added the help wanted Extra attention is needed label Sep 13, 2020
@blacklight
Copy link

I'm experiencing the same issue here.

I can usually build without problems if I run the process manually from the command line:

$ npm install
$ androidjs build --release

However, I bump into the same issue reported above when I run the build process from an external script. In my case, I'm embedding the build script into the F-Droid app build pipeline, and that's when I encounter the issue.

The reason in my case is that the androidjs build command is run from another process that does not have access to the terminal drawing primitives, therefore clearLine and cursorTo are not available.

I have put together a very dirty fix in my fork (I don't feel like opening a proper pull request with this workaround) and in my F-Droid build script I have done some even dirtier tricks by sed-in the dist files to comment those lines.

However, this issue should definitely be tackled by the developers of AndroidJS. The build won't always be launched from a nice user terminal, and when it's launched from a script, a CI/CD pipeline or a Docker instance it will fail miserably. Please provide an option to at least skip the fancy on-terminal progress bar - even though my workarounds make things work the output of the process will still clutter the output log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants