Github Copilot : Extension host terminated unexpectedly VS Code - debugging

Github Copilot v1.5.3295
VSCode Version : 1.61.2 Arm64
Apple M1 Chip
ERR Extension host (LocalProcess) terminated unexpectedly. The following extensions were running: vscode.microsoft-authentication, mechatroner.rainbow-csv, Dart-Code.dart-code, vscode.debug-auto-launch, vscode.git, GitHub.copilot, jeroen-meijer.pubspec-assist, ms-python.python, ms-vscode.cpptools, Shan.code-settings-sync, vscode.github-authentication, Dart-Code.flutter, ms-vscode.js-debug, vscode.github, ms-iot.vscode-ros, ms-python.vscode-pylance, vscode.emmet, vscode.merge-conflict, eamodio.gitlens, softwaredotcom.swdc-vscode, usernamehw.errorlens, softwaredotcom.swdc-100-days-of-code, vscode.configuration-editing, vscode.json-language-features, vscode.typescript-language-features
internal/fs/watchers.js:226 throw error; ^Error: ENOENT: no such file or directory, watch '/Users/incals/.software/flowChange.json' at FSWatcher.<computed> (internal/fs/watchers.js:218:26) at Object.watch (fs.js:1525:34) at new u (/Users/incals/.vscode/extensions/softwaredotcom.swdc-vscode-2.6.1/dist/extension.js:2:1279288) at Function.getInstance (/Users/incals/.vscode/extensions/softwaredotcom.swdc-vscode-2.6.1/dist/extension.js:2:1279505) at Timeout._onTimeout (/Users/incals/.vscode/extensions/softwaredotcom.swdc-vscode-2.6.1/dist/extension.js:2:1246531) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { errno: -2, syscall: 'watch', code: 'ENOENT', path: '/Users/incals/.software/flowChange.json', filename: '/Users/incals/.software/flowChange.json'}

This issue caused by this plugin, disabled this plugin and now working fine.
100-days-of-code
https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-100-days-of-code
and Code Time v2.6.1
https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode

Related

Vite won't compile on laravel 9 project. Error: EMFILE: too many open files

ghoul138
OP
Posted 1 second ago
Errors compiling Vite on the new Laravel 9 installation.
I've worked with Laravel v5.x and v6.x for years but decided to start a new small site on Laravel v9.x using "Laravel Sail" and surprisingly haven't had many issues until now.
I started working on a dashboard and making small changes, all of which have shown except for some style class tags for tailwind. I used 'sail down' to pull everything down and run 'sudo npm run dev' to see if that would fix it. Unfortunately, that brought about this error:
sudo npm run dev
> test#1.0.0 dev
> vite
node:internal/errors:491
ErrorCaptureStackTrace(err);
^
Error: EMFILE: too many open files, watch '/home/user/mount/Websites/test/app/View/Components'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2315:34)
at createFsWatchInstance (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48596:17)
at setFsWatchListener (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48643:15)
at NodeFsHandler._watchWithNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:48798:14)
at NodeFsHandler._handleDir (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49034:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async NodeFsHandler._addToNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49084:16)
at async file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50100:21
at async Promise.all (index 0)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50296:10)
at NodeFsHandler._addToNodeFs (file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:49112:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/user/mount/Websites/test/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:50100:21
at async Promise.all (index 0) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
path: '/home/user/mount/Websites/test/app/View/Components',
filename: '/home/user/mount/Websites/test/app/View/Components'
}
Node.js v18.13.0
I'm so lost and can't seem to find any good topics on this specific issue. Has this happened to anyone else?

sass with auto-refresh using parcel , getting errno: -4058, code: 'ENOENT' when running start script

I'm trying to setup Sass with auto-refresh using parcel,
and when I'm using script "start": "parcel src/index.html", I'm constantly getting the following error:
Error: ENOENT: no such file or directory, open 'D:\vscodeprojects\RSSchool\dict\dict.txt'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at makeCompression (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\lmdb\dist\index.cjs:2047:19)
at Object.open (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\lmdb\dist\index.cjs:2057:25)
at new LMDBCache (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\cache\lib\LMDBCache.js:81:34)
at resolveOptions (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\resolveOptions.js:125:168)
at async Parcel._init (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\Parcel.js:218:27)
at async Parcel.watch (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\Parcel.js:315:7)
at async run (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\parcel\lib\cli.js:351:9) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'D:\vscodeprojects\RSSchool\dict\dict.txt'
}
This dict file outside of the project folder doesn't make sense.
Please advise.
I cloned into your repo and run with below package.json config
Replaced "start":"parcel src/index.html" with "start":"parcel"
App runs

yarn deploy give error with Command failed with exit code 1 when running collection-examples-as

I am trying to run the collection-examples-as near example but when I run yarn deploy it gives me the following error
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: ENOENT: no such file or directory, open './contract.wasm'
[Error: ENOENT: no such file or directory, open './contract.wasm'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './contract.wasm'
}
error Command failed with exit code 1.
I think the error is it can't find the path to ./contract.wasm so I run yarn build the I tried to deploy it again using yarn deploy but I got another error which is:
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: Can not sign transactions for account dev-1637744501224-6323200 on network
default, no matching key pair found in
InMemorySigner(MergeKeyStore(UnencryptedFileSystemKeyStore(/home/rasha/.near-
credentials), UnencryptedFileSystemKeyStore(/home/rasha/collection-examples-
as/neardev))).
{
type: 'KeyNotFound',
context: undefined
}
any help or suggestions?
There's an issue with old versions of near-cli and dev-deploy.
As a workaround, you can try running the latest cli directly from your terminal:
near dev-deploy --wasmFile="./contract.wasm" -f
Just check that you installed the latest version of near-cli, currently 2.2.0. You can check your version with near --version.
Be sure to run yarn build first, so you'll have the compiled contract.wasm file.
Note: When you run yarn deploy, it uses the old near-cli version defined in package.json. (probably some old version like 1.6.0)
You might also want to check this GitHub issue (dev-deploy error): https://github.com/near/create-near-app/issues/1408

yarn permission problems on OSX high sierra

I'm really scratching my head on this one, and have spent around 1.5 days on trying to resolve the problem
the problem I think has to do with permissions that somehow got reset -
I suspect it happened after I got boot camp assistant to partition for windows dual boot
Environment:
Writing selenium test cases in typescript, using Alsatian and Zalenium frameworks over ts-node - the following command being used to initialise the test runner
yarn run ts-node Tests/runner.ts --tap
yarn environment is running through brew
package.json:
{
"dependencies": {
"#types/dotenv": "^4.0.2",
"#types/selenium-webdriver": "^3.0.8",
"alsatian": "^2.2.1",
"axios": "^0.17.1",
"dotenv": "^5.0.0",
"moment": "^2.20.1",
"selenium-webdriver": "^4.0.0-alpha.1",
"tap-spec": "^4.1.1",
"ts-node": "^4.1.0",
"tslib": "1.8.1",
"typescript": "^2.6.2"
}
}
runner.ts:
import tapSpec = require('tap-spec');
import { TestSet, TestRunner } from "alsatian";
import { config as dotenv } from 'dotenv';
(async () =>
{
// Load up any pseudo environment variables
dotenv({ path: __dirname + '/../.env' });
// Setup the alsatian test runner
let testRunner = new TestRunner();
let tapStream = testRunner.outputStream;
let testSet = TestSet.create();
testSet.addTestsFromFiles('/**/*/*.spec.ts');
// This will output a human readable report to the console.
tapStream.pipe(tapSpec()).pipe(process.stdout);
// Runs the tests
await testRunner.run(testSet);
})()
.catch(e =>
{
console.error(e);
process.exit(1);
});
Problem:
I suspect the problems started after I installed dual boot windows using bootcamp assistant
I worked in windows for 3-4 days on another project and when I came back, started getting permission problems
initially they were along the lines of { Error: EACCES: permission denied, scandir '/Library/Application Support/xxxx'
which I resolved using chmod as stated below - now I'm stuck - read points 7 and 8, I don't know whats causing the problem - but I suspect it's yarn permissions
I had - also updated to typescript 2.7.1 earlier because I'm using the option "strictPropertyInitialization": false, in tsconfig - initially I thought that had cause some problem, but reverting to 2.6.2 hasn't resolved it
removed and rebuilt node_modules
ran first aid from disk utility on partition
reset permissions : https://support.apple.com/en-us/HT203538
re-installed yarn
re-installed brew
granted each complained folder sudo chmod -R 777 '/Library/Application Support', now complaining about no access to '/System/Library/User Template' , cannot use chmod here because I get the error, operation not allowed
yarn run ts-node Tests/runner.ts --tap gives:
warning package.json: No license field
$ /Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/.bin/ts-node Tests/runner.ts --tap
{ Error: EACCES: permission denied, scandir '/System/Library/User Template'
at Object.fs.readdirSync (fs.js:924:18)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:288:41)
at GlobSync._readdirInGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:267:20)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:276:17)
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:137:22)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)0
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:207:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)
at GlobSync._processGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:380:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:130:10)
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/System/Library/User Template' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
sudo yarn run ts-node Tests/runner.ts --tap gives:
{ Error: EBADF: bad file descriptor, scandir '/dev/fd/13'
at Object.fs.readdirSync (fs.js:924:18)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:288:41)
at GlobSync._readdirInGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:267:20)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:276:17)
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:137:22)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:207:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)
at GlobSync._processGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:380:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:130:10)
errno: -9,
code: 'EBADF',
syscall: 'scandir',
path: '/dev/fd/13' }
error Command failed with exit code 1.
UPDATE 1 - 19 FEB 2017:
I've placed a test.ts file - which does nothing but print to console , if I call that from yarn ts-node, that works fine
yarn run ts-node Tests/test.ts
output:
yarn run v1.3.2
warning package.json: No license field
$ /Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/.bin/ts-node Tests/test.ts
this is a test
✨ Done in 0.61s.
test.ts:
(async () =>
{
console.log("this is a test");
})()
.catch(e =>
{
console.error(e);
process.exit(1);
});
I have also attempted, what the comment has suggested by #ILI - I fixed the permissions using First Aid in disk utility on the mac partition , since brew no longer supports sudo, I uninstalled yarn from brew, and added it to global packages using
sudo yarn install yarn -g
but still have the same EACCESS error - Error: EACCES: permission denied, scandir '/Library/Application Support/OpenVPN/profile'
Also tried running yarn --verbose, didn't get much detail from there
yarn run --verbose ts-node Tests/runner.ts --tap
yarn run v1.3.2
warning package.json: No license field
verbose 0.331 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/.npmrc".
verbose 0.331 Checking for configuration file "/Users/dshamim/.npmrc".
verbose 0.331 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/.npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/.npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/.npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/Projects/Acurus/.npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/Projects/.npmrc".
verbose 0.332 Checking for configuration file "/Users/dshamim/.npmrc".
verbose 0.333 Checking for configuration file "/Users/.npmrc".
verbose 0.333 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/.yarnrc".
verbose 0.333 Checking for configuration file "/Users/dshamim/.yarnrc".
verbose 0.334 Found configuration file "/Users/dshamim/.yarnrc".
verbose 0.334 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 0.334 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/.yarnrc".
verbose 0.334 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/anex/.yarnrc".
verbose 0.334 Checking for configuration file "/Users/dshamim/Projects/Acurus/ANEX/.yarnrc".
verbose 0.335 Checking for configuration file "/Users/dshamim/Projects/Acurus/.yarnrc".
verbose 0.337 Checking for configuration file "/Users/dshamim/Projects/.yarnrc".
verbose 0.338 Checking for configuration file "/Users/dshamim/.yarnrc".
verbose 0.338 Found configuration file "/Users/dshamim/.yarnrc".
verbose 0.338 Checking for configuration file "/Users/.yarnrc".
verbose 0.34 current time: 2018-02-19T00:39:49.960Z
$ /Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/.bin/ts-node Tests/runner.ts --tap
{ Error: EACCES: permission denied, scandir '/Library/Application Support/OpenVPN/profile'
at Object.fs.readdirSync (fs.js:924:18)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:288:41)
at GlobSync._readdirInGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:267:20)
at GlobSync._readdir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:276:17)
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:137:22)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)
at GlobSync._processReaddir (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:207:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:132:10)
at GlobSync._processGlobStar (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:380:10)
at GlobSync._process (/Users/dshamim/Projects/Acurus/ANEX/anex/ANEX.Website.ManagementPortal.Tests/node_modules/glob/sync.js:130:10)
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/Library/Application Support/OpenVPN/profile' }
verbose 51.049 Error: Command failed with exit code 1.
at /usr/local/Cellar/yarn/1.3.2/libexec/lib/cli.js:35620:15
at Generator.throw (<anonymous>)
at step (/usr/local/Cellar/yarn/1.3.2/libexec/lib/cli.js:92:30)
at /usr/local/Cellar/yarn/1.3.2/libexec/lib/cli.js:105:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Some times it's the simple things that we miss, don't worry we have all been here.
This is a case of over thinking the issue, to steal a line from an Aussie beer commercial, you need to "UNDERTHINK IT". https://youtu.be/1MdAhVetBq8
The fact that your simple test script worked but the main test runner didn't, would have pointed me in the direction of stepping through the test runner script, rather than looking at yarn or any other culprit.
Turns out you were telling alsatian to search your entire hard drive for test cases, in which some folders it did not have permissions to access.
Change:
testSet.addTestsFromFiles('/**/*/*.spec.ts');
To:
testSet.addTestsFromFiles('**/*/*.spec.ts');
Or:
testSet.addTestsFromFiles('./**/*/*.spec.ts');
And all should work as you expect.

Ionic build android failed with 403 Http respose from Gradle, JAVA_HOME not valid

I am using Windows 7X64 machine and trying to build Andriod application using cordova/ionic CLI v1.5.5. I am getting this error that I couldn't solve.
"You may not have the required environment or OS to build this project"
with commands ionic build android and cordova build android. The command ionic platform add android was successful. I am working with Android sdk (API 22) using the Android SDK Manager. I also made sure that PATH variable is correctly set.
Full transcript of process is:
C:\Users\ddevkota\Desktop\freshIonic>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\ddevkota\Desktop\fr
eshIonic\hooks\after_prepare\010_add_platform_class.js C:\Users\ddevkota\Desktop
\freshIonic
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\ddevkota\Desktop\freshIonic\platforms\andr
oid\cordova\build.bat""
ANDROID_HOME=C:\Users\ddevkota\AppData\Local\Android\sdk
JAVA_HOME=C:\Progra~1\Java\jdk1.7.0_15
Running: C:\Users\ddevkota\Desktop\freshIonic\platforms\android\gradlew cdvBuild
Debug -b C:\Users\ddevkota\Desktop\freshIonic\platforms\android\build.gradle -Do
rg.gradle.daemon=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Serv
er returned HTTP response code: 403 for URL: http://services.gradle.org/distribu
tions/gradle-2.2.1-all.zip
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL:
http://services.gradle.org/distributions/gradle-2.2.1-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1625)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
C:\Users\ddevkota\Desktop\freshIonic\platforms\android\cordova\node_modules\q\q.
js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\Users\ddevkota\Desktop\freshI
onic\platforms\android\gradlew cdvBuildDebug -b C:\Users\ddevkota\Desktop\freshI
onic\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\ddevkota\AppData\Roaming\npm\node_modules
\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Thanks for help in advance.
NOTE: This turns out to be a permission issue in client (403). I connected my machine to different network and it started working. All build process. If you wanna do it manually here is how far I got.
Solution for not Valid JAVA_HOME
After spending days and uninstalling all versions of java, reinstalling only one version and setting up Environment VariableJAVA_HOME as C:\Program Files\Java\jdk1.7.0_15 I solved the problem.
However there was another issue of ionic build android error when downloading gradle.
This was solved as I added gradle to my project offline.
Solution for not Gradle 403 Http response
Do the following:
After downloading gradle from issued link (here is https://services.gradle.org/distributions/gradle-2.2.1-all.zip) paste it in somewhere likes myApp\platforms\android\gradle\gradle-2.2.1-all.zip and in build.js from myApp\platforms\android\cordova\lib\build.js find this:
var distributionUrl = 'distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip';
And replace it with your own file's location:
var distributionUrl = 'distributionUrl=../gradle-2.2.1-all.zip';
Still working on build and will keep on posting the solution. A thread about other issues is created in ionic forum and it is here.
Solution for not Gradle 403 Http response
find distributionUrl variable in:
myapp\platforms\android\cordova\lib\builders\GradleBuilder.js
change http value to https in this line:
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip';

Resources