name: Bug Report
description: Create a report to help us improve
title: '[Bug]: '
labels: ['type: bug']
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this bug report! Using this template makes it a lot easier for us to diagnose your problem, so please fill in as many fields as possible.

  - type: textarea
    id: description
    attributes:
      label: Summary
      description: A short description of the problem
      placeholder: |
        Include what you expected to happen, and what actually happened.
    validations:
      required: true
  - type: textarea
    id: steps-to-reproduce
    attributes:
      label: Steps to reproduce
      description: Steps to reproduce the behavior
      placeholder: |
        1. Go to '...'
        2. Click on '....'
        3. Scroll down to '....'
        4. See error
    validations:
      required: true
  - type: input
    id: link-to-reproduction
    attributes:
      label: A link to a reproduction repository
      description: The fastest way to describe your bug is to provide a reproduction repository.
      placeholder: https://github.com/project/link-to-your-reproduction-repo

  - type: markdown
    attributes:
      value: |
        Check out [CONTRIBUTING.md](https://github.com/netlify/next-runtime/blob/main/CONTRIBUTING.md#what-is-a-reproducible-test-case) for advice on producing a reproduction repo.
  - type: input
    id: runtime-version
    attributes:
      label: Next Runtime version
      description: The version of `@netlify/plugin-nextjs` that you are using. (This is in the build logs)
      placeholder: x.x.x
    validations:
      required: true

  - type: checkboxes
    id: more-info
    attributes:
      label: More information about your build
      options:
        - label: I am building using the CLI
        - label: I am building using file-based configuration (`netlify.toml`)
  - type: dropdown
    id: which-os
    attributes:
      label: What OS are you using?
      description: (If you're using the CLI) What OS are you using?
      options:
        - Windows
        - Mac OS
        - Linux
        - Other
  - type: textarea
    id: netlify-toml
    attributes:
      label: Your netlify.toml file
      description: (If you're using file-based config) Please provide a copy of your `netlify.toml` file.
      value: |
        <details>
          <summary>`netlify.toml`</summary>

        ```toml
        # Paste content of your `netlify.toml` file here
        ```

        </details>

  - type: textarea
    id: redirects-file
    attributes:
      label: Your public/_redirects file
      description: Please provide a copy of your `_redirects` file if you have one.
      value: |
        <details>
          <summary>`_redirects`</summary>

        ```toml
        # Paste content of your `_redirects` file here
        ```

        </details>

  - type: textarea
    id: next-config
    attributes:
      label: Your `next.config.js` file
      description: Please provide a copy of your `next.config.js` file.
      value: |
        <details>
          <summary>`next.config.js`</summary>

        ```toml
        # Paste content of your `next.config.js` file here. Check there is no private info in there.
        ```

        </details>

  - type: textarea
    id: build-logs
    attributes:
      label: Builds logs (or link to your logs)
      value: |
        <details>
          <summary>Build logs</summary>

        ```
        # Paste logs here
        ```

        </details>

  - type: textarea
    id: function-logs
    attributes:
      label: Function logs
      description: If it is a runtime error, please provide a copy of the relevant function logs.
      value: |
        <details>
          <summary>Function logs</summary>

        ```
        # Paste logs here
        ```

        </details>

  - type: textarea

    id: next-build
    attributes:
      label: .next JSON files
      description:
        (e.g. `.next/required-server-files.json`, `.next/routes-manifest.json` and `.next/prerender-manifest.json`).
      value: |
        <details>
          <summary>generated .next JSON files</summary>

        ```
        # Paste file contents here. Please check there isn't any private info in them
        # You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.
        ```

        </details>
