Object doesn't support property or method '

2019-07-10 00:45发布

  • servicestack-client version 1.0.9
  • Microsoft Edge 38.14393.2068.0
  • Microsoft EdgeHTML 14.14393

I am getting the following Javascript error in Microsoft Edge 38.14393.2068.0:

"Object doesn't support property or method 'json'"

enter image description here

I suspecting that this Microsoft Edge Javascript error is coming from the ServiceStack Typescript JsonServiceClient, you can find this npm package's source code is here

Use the standalone app below to reproduce this issue in MS Edge:

You will see Chrome works fine but MS Edge fails with the "Object doesn't support property or method 'json'" error.

If there is a valid bearerToken, both MS EDGE and Chrome requests work.

1条回答
一纸荒年 Trace。
2楼-- · 2019-07-10 00:50

I can't reproduce this exact error but I've found an issue with MS Edge where it throws a DOMException when calling W3C fetch's .json() API on an empty JSON response which is resolved in this commit. This fix is available from v0.0.41 of servicestack-client that's now available on npm.

If this doesn't solve your issue, please create a small stand-alone example which we can run that repro's the issue.

查看更多
登录 后发表回答