导入邮差收集失败

时间:2015-11-24 18:27:57

标签: paw-app

尝试导入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"
    }
]

}

1 个答案:

答案 0 :(得分:2)

这个错误是由于错误地传递了一个空体:

"data": null, "dataMode": "params", 它已在v1.1.2

中修复