2

Postman コレクションをインポートしようとすると、アラート ダイアログに次のエラーが表示されます。

Import Failed
TypeError: null is not an object (evaluating 'postmanBodyData.length')

そして、これはコンソールで:

JS Exception Line 54. TypeError: null is not an object (evaluating 'postmanBodyData.length')

インポートに失敗したコレクションのサンプルを次に示します。

{
"id": "5eb54264-f906-b6d7-9ee4-d045875c8ad4",
"name": "SO Test",
"order": [
    "ee9c4b31-f6b3-0799-5d9d-298d8257d6d0",
    "513b4473-f1c3-469e-ce67-edaf33faf2d0"
],
"timestamp": 1448497158415,
"requests": [
    {
        "id": "513b4473-f1c3-469e-ce67-edaf33faf2d0",
        "url": "http://stackoverflow.com/questions/33901145/importing-postman-collection-fails?noredirect=1#comment55564842_33901145",
        "method": "GET",
        "headers": "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.69 Safari/537.36\nAccept-Encoding: gzip, deflate, sdch\nAccept-Language: en-US,en;q=0.8\nCookie: prov=41dcce2f-3878-4f81-b102-86ced2fc0edd; __qca=P0-107192378-1422497046148; gauthed=1; _ga=GA1.2.828174835.1422497046; __cfduid=df57f13c8f66daf4cca857b9bde72d0981447728327\n",
        "data": null,
        "dataMode": "params",
        "version": 2,
        "name": "http://stackoverflow.com/questions/33901145/importing-postman-collection-fails?noredirect=1#comment55564842_33901145",
        "description": "",
        "descriptionFormat": "html",
        "collectionId": "5eb54264-f906-b6d7-9ee4-d045875c8ad4"
    },
    {
        "id": "ee9c4b31-f6b3-0799-5d9d-298d8257d6d0",
        "url": "http://stackoverflow.com/posts/33901145/ivc/2e31?_=1448497117271",
        "method": "GET",
        "headers": "Accept: */*\nX-Requested-With: XMLHttpRequest\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.69 Safari/537.36\nReferer: http://stackoverflow.com/questions/33901145/importing-postman-collection-fails?noredirect=1\nAccept-Encoding: gzip, deflate, sdch\nAccept-Language: en-US,en;q=0.8\nCookie: prov=41dcce2f-3878-4f81-b102-86ced2fc0edd; __qca=P0-107192378-1422497046148; gauthed=1; _ga=GA1.2.828174835.1422497046; __cfduid=df57f13c8f66daf4cca857b9bde72d0981447728327\n",
        "data": null,
        "dataMode": "params",
        "version": 2,
        "name": "http://stackoverflow.com/posts/33901145/ivc/2e31?_=1448497117271",
        "description": "",
        "descriptionFormat": "html",
        "collectionId": "5eb54264-f906-b6d7-9ee4-d045875c8ad4"
    }
]

}

4

1 に答える 1

2

このバグは、空のボディを誤って渡したことが原因でした:

"data": null, "dataMode": "params", v1.1.2 で修正されました。

于 2015-11-27T20:00:28.257 に答える