Skip to content

Continuing in browser fails for new issue create #2509

Closed

Description

@astrochun

Describe the bug

Creating a new issue with gh, and choosing the option to continue in browser after providing the body only returns the link to stdout, and fails to open a new browser tab.

gh --version:
gh version 1.3.0 (2020-11-24)

Steps to reproduce the behavior

  1. Type this: gh issue create
  2. Provide body of message using nano.
  3. Save the body through nano
  4. Select the "Continue in browser" option in "What's next?"

Expected vs actual behavior

See above. The stdout message should be:
"Opening astrochun/Metallicity_Stack_Commons#85 in your browser"

Logs


Creating issue in astrochun/Metallicity_Stack_Commons

? Title Use GitHub Actions for CI
? Body <Received>
? What's next? Continue in browser
https://github.com/astrochun/Metallicity_Stack_Commons/issues/85
(base) ___$

Note that other browser viewing options (e.g., gh issue list -w will work fine)

Activity

  1. added
    bug
    on Nov 30, 2020
  2. mislav commented on Nov 30, 2020

    @mislav
    Contributor

    Thank you for reporting. If you retry with DEBUG=1 gh issue create, it will start verbose output mode which will display the commands invoked. Here, gh will read the BROWSER environment variable to determine which browser program to use for "Continue in browser". Do you have anything set under that variable in your environment? Please check echo $BROWSER

  3. added
    more-info-needed
    on Nov 30, 2020
  4. astrochun commented on Nov 30, 2020

    @astrochun
    Author

    Thank you for reporting. If you retry with DEBUG=1 gh issue create, it will start verbose output mode which will display the commands invoked. Here, gh will read the BROWSER environment variable to determine which browser program to use for "Continue in browser". Do you have anything set under that variable in your environment? Please check echo $BROWSER

    @mislav, here's the full DEBUG output:

    (base) ___$ DEBUG=1 gh issue create
    [git remote -v]
    * Request at 2020-11-30 10:57:26.561606 -0700 MST m=+0.058338840
    * Request to https://api.github.com/repos/cli/cli/releases/latest
    [git config --get-regexp ^remote\..*\.gh-resolved$]
    [git rev-parse --show-toplevel]
    
    Creating issue in astrochun/Metallicity_Stack_Commons
    
    * Request at 2020-11-30 10:57:26.615896 -0700 MST m=+0.112627322
    * Request to https://api.github.com/graphql
    * Request took 564.787609ms
    * Request took 546.721913ms
    ? Title gh cli testing
    ? Body <Received>
    ? What's next? Continue in browser
    * Request at 2020-11-30 10:57:48.904579 -0700 MST m=+22.401046240
    * Request to https://api.github.com/graphql
    * Request took 454.543317ms
    https://github.com/astrochun/Metallicity_Stack_Commons/issues/86
    (base) ___$ 
    

    BROWSER environment is not set. Note that: gh repo view cli/cli -w does open a web browser. Here's the verbose output:

    (base) ___$ DEBUG=1 gh repo view cli/cli -w
    * Request at 2020-11-30 11:01:37.092972 -0700 MST m=+0.016128089
    * Request to https://api.github.com/graphql
    * Request took 529.427389ms
    Opening github.com/cli/cli in your browser.
    [open https://github.com/cli/cli]
    
  5. added
    priority-1
    and removed
    more-info-needed
    on Dec 1, 2020
  6. mislav commented on Dec 1, 2020

    @mislav
    Contributor

    Thank you for the details. I see now that this is a regression in #2386.

    Please hold off using "Continue in browser" until this is patched. 🙇

  7. changed the title [-]Contining in browser fails for new issue create[/-] [+]Continuing in browser fails for new issue create[/+] on Dec 1, 2020
  8. astrochun commented on Dec 1, 2020

    @astrochun
    Author

    I figured it was a major refactor since it was fine in v1.2.0. Thanks for confirming that it wasn't just me! 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions