Skip to content

BUG: Empty variables on import. #976

@ShashwatXD

Description

@ShashwatXD

Describe the bug/problem

When importing a cURL command via Dashbot, environment variables are automatically created (e.g., BASE_URL_XXX) but they appear as invisible/empty rows in the Variables page. The variable data exists and works correctly (hovering over URL fields shows the substituted value, API requests work), but the text fields in the Variables tab remain empty and don't display the key or value.

Steps to Reproduce the bug/problem

  1. Open API Dash application
  2. Navigate to Dashbot (chat interface)
  3. Select "Import cURL" task
  4. Paste a cURL command with a URL (e.g., curl https://api.example.com/users)
  5. Click "Apply to Selected" or "Create New Request"
  6. Navigate to the Environments section → Variables tab
  7. Observe that a new row has been added (row count increases)
  8. Notice that the text fields for the variable name and value are empty
  9. Go back to the request and hover over the URL field → tooltip shows the variable is being substituted correctly (e.g., {{BASE_URL_API_EXAMPLE_COM}})
  10. Send the API request → it works, confirming the variable has the correct value

Video: The Variables page shows an empty row where the imported variable should be visible with its key and value.

Screen.Recording.2025-12-26.at.22.43.17.mov

Expected behavior

When a variable is automatically created during cURL import, it should immediately appear in the Variables tab with:

  • The variable key visible in the "Variable name" field (e.g., BASE_URL_API_EXAMPLE_COM)
  • The variable value visible in the "Variable value" field (e.g., https://api.example.com)
  • The checkbox showing the enabled state

Device Info (The device where you encountered this issue)

  • OS: macOS

Flutter Doctor

Please run the flutter doctor -v command and provide the details below:

[✓] Flutter (Channel stable, 3.35.2, on macOS 15.6.1 24G90 darwin-arm64, locale en-IN) [640ms]
    • Flutter version 3.35.2 on channel stable at /Users/shashwat/fvm/versions/3.35.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 05db968908 (4 months ago), 2025-08-25 10:21:35 -0700
    • Engine revision a8bfdfc394
    • Dart version 3.9.0
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
      cli-animations, enable-lldb-debugging

[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [2.8s]
    • Android SDK at /Users/shashwat/Library/Android/sdk
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1) [1,574ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17B100
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [7ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1) [7ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.84.2) [6ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.124.0

[✓] VS Code (version 1.105.0-insider) [6ms]
    • VS Code at /Users/shashwat/Downloads/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.125.20251201

[✓] Connected device (3 available) [7.7s]
    • Shashwat’s iPhone (wireless) (mobile) • 00008120-000C705021C3A01E • ios            • iOS 26.1 23B85
    • macOS (desktop)                       • macos                     • darwin-arm64   • macOS 15.6.1 24G90 darwin-arm64
    • Chrome (web)                          • chrome                    • web-javascript • Google Chrome 143.0.7499.170

[✓] Network resources [1,199ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions