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

During init: Got response in unexpected format when fetching metadata. Please try again. #742

Open
justinphelps opened this issue May 29, 2024 · 2 comments

Comments

@justinphelps
Copy link

Describe the bug
After logging in and scrolling through the boards, I choose my board and get:
" Got response in unexpected format when fetching metadata. Please try again."
The same happens when I choose "None" for default board.

Please provide following details

  1. JiraCLI Version:

(Version="1.5.1", GitCommit="0e0f82d52ef5a775d2cc662fbe38d9732b9b5c59", CommitDate="2024-01-20T10:48:06+00:00", GoVersion="go1.21.5", Compiler="gc", Platform="darwin/arm64")
2. Are you using Jira cloud or on-premise jira server?
This isn't available since I can't get past the init stage. We're on Cloud
3. What operating system are you using? Also mention version.
MacOS Sonoma Version 14.5 (23F79) 4. What terminal are you using? Also mention version.
MacOS Terminal Version 2.14 (453) ```

To Reproduce

Steps to reproduce the behavior:

  1. run jira init --debug --server https://nope.atlassian.net --installation cloud --login [email protected]
  2. Select default project: EE
  3. fail

Expected behavior
Take me to the board/issues.

Screenshots
image
Additional context

@justinphelps
Copy link
Author

A little more information. This is what the API returns whether I choose a default board or None:

#curl --request GET --url 'https://nope.atlassian.net/rest/api/2/issue/createmeta?projectKeys=EE&expand=projects.issuetypes.fields' --user "`[email protected]:$JIRA_API_TOKEN" --header 'Accept: application/json'

{"expand":"projects","projects":[]}

@tj-smith47
Copy link

tj-smith47 commented Jun 25, 2024

@justinphelps Try passing the --project <project> --board <board> flags as well.

$ JIRA_API_TOKEN=$(echo -e "$JIRA_API_TOKEN") jira init \
    --installation cloud \
    --server <url> \
    --login <email> \
    --project <project> \
    --board <board> \
    --debug

I'm able to auth via an automated script successfully without and prompts for input using this method. In my case, I also had to echo the API key with escaping (-e) to get the Jira API token to be read properly because it runs in kubernetes.

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

2 participants