Skip to content
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

ATAC not running in project directory #91

Open
urizennnn opened this issue Aug 10, 2024 · 6 comments
Open

ATAC not running in project directory #91

urizennnn opened this issue Aug 10, 2024 · 6 comments

Comments

@urizennnn
Copy link

urizennnn commented Aug 10, 2024

Issue: Error Running atac -d . Command

Description

When I try running the atac -d . command in my project directory, I encounter several issues that prevent the tool from functioning correctly.

Steps to Reproduce

  1. Navigate to the project directory.
  2. Run the command: atac -d ..

Expected Behavior

atac should parse the files in the directory and provide the expected output without errors.

Actual Behavior

I receive the following error messages:

No key bindings file found

Checking: ./.gitignore
Checking: ./run_staging_app.sh
Checking: ./LICENSE
Checking: ./main.go
Checking: ./run_production_app.sh
Checking: ./run_development_app.sh
Checking: ./nginx.conf
Checking: ./app.env
Checking: ./go.sum
Checking: ./.dockerignore
Checking: ./docker-compose-production.yml
Checking: ./README.md
Checking: ./dump.rdb
Checking: ./app-sample.env
Checking: ./ecosystem.config.js
Checking: ./Dockerfile
Checking: ./atac.log
Nothing to parse here
Checking: ./development_app
Checking: ./docker-compose-staging.yml
Checking: ./docker-compose-development.yml
Checking: ./go.mod
Checking: ./log.json

Error:
    Could not parse JSON collection
    missing field `name` at line 20 column 1

Key Issues

  1. No key bindings file found: It seems like the tool is expecting a key bindings file

  2. Nothing to parse here: Despite the tool checking multiple files, it doesn't seem to find anything to process or parse. I

  3. JSON Parsing Error: The tool fails to parse the log.json file due to a missing name field at line 20, column 1. I'm unsure of the correct structure required for this file.

Environment

  • OS: [Arch]
  • atac version: [0.6.0]

Additional Information

Upon inspection to logs i found out that it looks for atac.json file, and i don't seem to find that in the repo , but when i run it in a fresh folder it runs perfectly

@urizennnn
Copy link
Author

with further looks into the error i moved a json file from created by atac into the project directory

No key bindings file found

Checking: ./.gitignore

Checking: ./run_staging_app.sh

Checking: ./LICENSE

Checking: ./main.go

Checking: ./run_production_app.sh

Checking: ./run_development_app.sh

Checking: ./nginx.conf

Checking: ./app.env

Checking: ./hng.json
Collection file parsed!

Checking: ./go.sum

Checking: ./.dockerignore

Checking: ./docker-compose-production.yml

Checking: ./README.md

Checking: ./dump.rdb

Checking: ./app-sample.env

Checking: ./ecosystem.config.js

Checking: ./Dockerfile

Checking: ./development_app

Checking: ./docker-compose-staging.yml

Checking: ./docker-compose-development.yml

Checking: ./go.mod

Checking: ./log.json
Error:
        Could not parse JSON collection
        missing field `name` at line 20 column 1

which then gives me this error
so now i don't have the slighest clue as to why this is happening atm

@NachoNievaG
Copy link

related

@urizennnn
Copy link
Author

urizennnn commented Aug 10, 2024

related

the error is coming from line 29 in the collection.rs file not sure why
EDIT: If possible when creating the new json file suffx -atac to the name and let atac look for that file

@urizennnn
Copy link
Author

@NachoNievaG please check out the PR made

@Julien-cpsn
Copy link
Owner

Julien-cpsn commented Aug 12, 2024

Hello!

Here is my feedback regarding your issue

Key Issues

  1. No key bindings file found: It seems like the tool is expecting a key bindings file

The app just tells you that it didn't find any key bindings file, but it's no problem because they are default key mappings applied

  1. Nothing to parse here: Despite the tool checking multiple files, it doesn't seem to find anything to process or parse.

Same as the previous issue, the app just tells you that the file was empty or is not meant to be parsed. In this case, the log file is not meant to be parsed.

  1. JSON Parsing Error: The tool fails to parse the log.json file due to a missing name field at line 20, column 1. I'm unsure of the correct structure required for this file.

I personally think that the problem is here, I think you are missing a collection or request name in your JSON. You can check the examples in base_collection to know more about the general file structure.

E.g.
image

Have a geat day!!

@urizennnn
Copy link
Author

Hello!

Here is my feedback regarding your issue

Key Issues

  1. No key bindings file found: It seems like the tool is expecting a key bindings file

The app just tells you that it didn't find any key bindings file, but it's no problem because they are default key mappings applied

  1. Nothing to parse here: Despite the tool checking multiple files, it doesn't seem to find anything to process or parse.

Same as the previous issue, the app just tells you that the file was empty or is not meant to be parsed. In this case, the log file is not meant to be parsed.

  1. JSON Parsing Error: The tool fails to parse the log.json file due to a missing name field at line 20, column 1. I'm unsure of the correct structure required for this file.

I personally think that the problem is here, I think you are missing a collection or request name in your JSON. You can check the examples in base_collection to know more about the general file structure.

E.g. image

Have a geat day!!

i see that but in an empty folder it runs even with no collection.json or something of that sort and it generates one,but in a folder where any .json file exists it errors

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

No branches or pull requests

3 participants