doyensec / inql

InQL is a robust, open-source Burp Suite extension for advanced GraphQL testing, offering intuitive vulnerability detection, customizable scans, and seamless Burp integration.
https://doyensec.com/
Apache License 2.0
1.51k stars 156 forks source link

Any Reason why Im getting Task: rebuildAltair FAILED #128

Closed santikris2003 closed 8 months ago

santikris2003 commented 10 months ago

While build InQL jar file using ./gradlew getting this error ./gradlew

Configure project : Version from git tag: v5.0.2

Task :rebuildAltair FAILED

build mkdir -p build && cp -r node_modules/altair-static/build/dist/ build/ && cp -f index.html build/index.html

cp: node_modules/altair-static/build/dist/: No such file or directory

FAILURE: Build failed with an exception.

BUILD FAILED in 6s 3 actionable tasks: 2 executed, 1 up-to-date

maimsing commented 10 months ago

git checkout master

execveat commented 10 months ago

Yeah, the dev is broken right now, you need to run npm install manually a bunch of times. I'm looking into a way to parallelize that process as it takes 40 seconds right now. Please use master for now, roll back to a previous commit or install node dependencies manually.

santikris2003 commented 10 months ago

I tried that getting this error now git checkout master Switched to branch 'master' Your branch is up to date with 'origin/master'. $ git submodule init $ git submodule update $ ./gradlew Downloading https://services.gradle.org/distributions/gradle-8.0.2-bin.zip ...........10%............20%............30%............40%............50%............60%...........70%............80%............90%............100%

Welcome to Gradle 8.0.2!

Here are the highlights of this release:

For more details see https://docs.gradle.org/8.0.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

BUILD FAILED in 12s

Recordatio commented 10 months ago

I got the same error as @santikris2003 . Tried both from dev and master as well, same issue.

diophant0x commented 10 months ago

Same issue here while build InQL jar file using ./gradlew, it failed on both Mac OS and Ubuntu.

execveat commented 10 months ago

I've migrated part of the build process to Taskfile. Please, check out our new build instructions: https://github.com/doyensec/inql/tree/dev#computer-building-the-inql-extension-from-git

This change (and the past build breakage) only affects dev branch for now (also, dev isn't stable and contains known bugs). I'm puzzled by the errors @santikris2003 is getting in the master branch, but I cannot reproduce those. Please, nuke the repo (and gradle caches seen in the error) and try re-cloning it from GitHub, if the error persists in the master.

santikris2003 commented 10 months ago

thanks for sharing the new set of instructions ,here's what I get when I execute those steps

$ task all task: [Run all commands] task init task: Task "Initializing git submodules" is up to date task: [Run all commands] task deps task: [Installing dependencies for playground] yarn install task: [Installing dependencies for voyager] yarn install task: [Installing dependencies for graphiql] yarn install task: [Installing dependencies for altair] yarn install yarn install v1.22.19 yarn install v1.22.19 yarn install v1.22.19 yarn install v1.22.19 warning package.json: No license field warning No license field [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [1/4] 🔍 Resolving packages... [1/4] 🔍 Resolving packages... [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [2/4] 🚚 Fetching packages... [2/4] 🚚 Fetching packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz: ENOENT: no such file or directory, open '/Users/santikris2003/Library/Caches/Yarn/v6/npm-@babel-code-frame-7.22.13-e3c1c099402598483b7a8c46a721d1038803755e-integrity/node_modules/@babel/code-frame/.yarn-tarball.tgz'". info If you think this is a bug, please open a bug report with the information provided in "/Users/santikris2003/Downloads/inql/lib/playground/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. error An unexpected error occurred: "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz: EINVAL: invalid argument, open '/Users/santikris2003/Library/Caches/Yarn/v6/npm-@babel-code-frame-7.22.13-e3c1c099402598483b7a8c46a721d1038803755e-integrity/node_modules/@babel/code-frame/.yarn-tarball.tgz'". info If you think this is a bug, please open a bug report with the information provided in "/Users/santikris2003/Downloads/inql/lib/graphiql/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... ✨ Done in 0.57s. error https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/Users/santikris2003/Library/Caches/Yarn/v6/npm-caniuse-lite-1.0.30001538-9dbc6b9af1ff06b5eb12350c2012b3af56744f3f-integrity/node_modules/caniuse-lite/data/regions/MS.js'" info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. info There appears to be trouble with your network connection. Retrying... exit status 1 task: Failed to run task "all": exit status 1

execveat commented 10 months ago

I think you might be running out of the disk space? The node depedencies do take a lot of space - around 1GB in total.

santikris2003 commented 10 months ago

I'm afraid not , I have 500+ GB of free space , not sure why Im getting this error

execveat commented 10 months ago

You probably need to nuke your node package cache, it seems broken. I can't replicate this issue whatsoever. Does it occur in other VMs / other environments? Please clean your environment, redownload InQL repo and try building again, just to make sure it's not due to previously cached artifacts:

git clone git@github.com:doyensec/inql.git; cd inql
git checkout dev
task all
execveat commented 9 months ago

Managed to replicate the error. Going into lib/* folders and running yarn install manually, then returning back to the project root and rerunning task all fixed it. I wonder what's going on, will debug this later.

lokiuox commented 8 months ago

I believe ffd37a01ce9fd2dd280a8556871d4b4bd0736df9 should have fixed this issue, closing this for now. Please reopen it if it still happens on the latest dev commit.