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

Failing to import insomnia collection when username/password in auth is null #3294

Closed
2 tasks done
jake-owen-p opened this issue Oct 12, 2024 · 1 comment
Closed
2 tasks done
Assignees
Labels
bug Something isn't working onboarding

Comments

@jake-owen-p
Copy link
Contributor

jake-owen-p commented Oct 12, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When a user creates a request in insomnia, and sets the auth to "Basic", Insomnia will set the value of username and password to empty string.

BUT if the request has been imported from an older insomnia export, these values may be null instead of an empty string. Insomnia will not change the null value and persist it for future exports and less the field is modified. This results in the collection failing to import as it hits a .match condition which is expecting an empty string value.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Below ive added a screenshot insomnia export of a minimum example, as well as the error message

Screenshot 2024-10-12 at 01 21 44

Screenshot 2024-10-12 at 1 36 43 AM
{
    "_type": "export",
    "__export_format": 4,
    "__export_date": "2024-10-11T23:53:31.649Z",
    "__export_source": "insomnia.desktop.app:v2023.4.0",
    "resources": [
        {
            "_id": "req_5f21bcb1dec54e998cff46c961e37188",
            "parentId": "wrk_2ac90ac4f46f4382849700f28aa79c4b",
            "modified": 1728690792025,
            "created": 1728688919111,
            "url": "www.foo.com/bar",
            "name": "FooBarRequest",
            "description": "",
            "method": "PUT",
            "body": {},
            "parameters": [],
            "headers": [],
            "authentication": {
                "type": "basic",
                "useISO88591": false,
                "disabled": false,
                "username": null,
                "password": null
            },
            "metaSortKey": -1728688987306.25,
            "isPrivate": false,
            "settingStoreCookies": true,
            "settingSendCookies": true,
            "settingDisableRenderRequestBody": false,
            "settingEncodeUrl": true,
            "settingRebuildPath": true,
            "settingFollowRedirects": "global",
            "_type": "request"
        },
        {
            "_id": "wrk_2ac90ac4f46f4382849700f28aa79c4b",
            "parentId": null,
            "modified": 1728690783068,
            "created": 1728690714797,
            "name": "FooBarCollection",
            "description": "",
            "scope": "collection",
            "_type": "workspace"
        },
        {
            "_id": "env_d928fbede709438bbb731d59f529b2de",
            "parentId": "wrk_2ac90ac4f46f4382849700f28aa79c4b",
            "modified": 1728688893510,
            "created": 1728688893510,
            "name": "Base Environment",
            "data": {},
            "dataPropertyOrder": null,
            "color": null,
            "isPrivate": false,
            "metaSortKey": 1728688893510,
            "_type": "environment"
        },
        {
            "_id": "jar_5c3d885cb1444684abffe46787000766",
            "parentId": "wrk_2ac90ac4f46f4382849700f28aa79c4b",
            "modified": 1728688893514,
            "created": 1728688893514,
            "name": "Default Jar",
            "cookies": [],
            "_type": "cookie_jar"
        }
    ]
}
@helloanoop
Copy link
Contributor

This has now been fixed in v1.33.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working onboarding
Projects
None yet
Development

No branches or pull requests

3 participants