17:44:33 IDE server has started, listening on http://127.0.0.1:4596017:44:33 initialization finished17:44:33 uploading project...17:44:33 { i [StatusCodeError]: 400 - "{\"code\":40000,\"error\":\"错误 TypeError: Cannot read property 'toLowerCase' of undefined\"}"17:44:33 at new i (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:157:49969)17:44:33 at H.callback (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:157:48818)17:44:33 at H.e.callback.a.callback [as _callback] (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:157:47872)17:44:33 at H.a._callback.a.callback.a.callback (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:187:5433)17:44:33 at H.emit (events.js:193:13)17:44:33 at H.<anonymous> (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:187:18246)17:44:33 at H.emit (events.js:193:13)17:44:33 at IncomingMessage.<anonymous> (/Users/tinman/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/common/cli/index.js:187:17088)17:44:33 at Object.onceWrapper (events.js:281:20)17:44:33 at IncomingMessage.emit (events.js:198:15)17:44:33 name: 'StatusCodeError',17:44:33 statusCode: 400,17:44:33 message:17:44:33 `400 - "{\\"code\\":40000,\\"error\\":\\"错误 TypeError: Cannot read property 'toLowerCase' of undefined\\"}"`,17:44:33 error:17:44:33 `{"code":40000,"error":"错误 TypeError: Cannot read property 'toLowerCase' of undefined"}`,17:44:33 options:17:44:33 { url:17:44:33 'http://127.0.0.1:45960/upload?cli=1&projectpath=%252FUsers%252Ftinman%252Fjenkins_workspace%252Fworkspace%252Fjojo_new_read&version=1.29.0.258&desc=build&infooutput=',17:44:33 resolveWithFullResponse: true,17:44:33 proxy: false,17:44:33 callback: [Function],17:44:33 transform: undefined,17:44:33 simple: true,17:44:33 transform2xxOnly: false },17:44:33 response:17:44:33 IncomingMessage {17:44:33 _readableState:17:44:33 ReadableState {17:44:33 objectMode: false,17:44:33 highWaterMark: 16384,17:44:33 buffer: BufferList { head: null, tail: null, length: 0 },17:44:33 length: 0,17:44:33 pipes: null,17:44:33 pipesCount: 0,17:44:33 flowing: true,17:44:33 ended: true,17:44:33 endEmitted: true,17:44:33 reading: false,17:44:33 sync: true,17:44:33 needReadable: false,17:44:33 emittedReadable: false,17:44:33 readableListening: false,17:44:33 resumeScheduled: false,17:44:33 paused: false,17:44:33 emitClose: true,17:44:33 autoDestroy: false,17:44:33 destroyed: false,17:44:33 defaultEncoding: 'utf8',17:44:33 awaitDrain: 0,17:44:33 readingMore: true,17:44:33 decoder: null,17:44:33 encoding: null },17:44:33 readable: false,17:44:33 _events:17:44:33 [Object: null prototype] {17:44:33 end: [Array],17:44:33 close: [Array],17:44:33 data: [Function],17:44:33 error: [Function] },17:44:33 _eventsCount: 4,17:44:33 _maxListeners: undefined,17:44:33 socket:17:44:33 Socket {17:44:33 connecting: false,17:44:33 _hadError: false,17:44:33 _parent: null,17:44:33 _host: null,17:44:33 _readableState: [ReadableState],17:44:33 readable: true,17:44:33 _events: [Object],17:44:33 _eventsCount: 7,17:44:33 _maxListeners: undefined,17:44:33 _writableState: [WritableState],17:44:33 writable: false,17:44:33 allowHalfOpen: false,17:44:33 _sockname: null,17:44:33 _pendingData: null,17:44:33 _pendingEncoding: '',17:44:33 server: null,17:44:33 _server: null,17:44:33 parser: null,17:44:33 _httpMessage: [ClientRequest],17:44:33 [Symbol(asyncId)]: 35,17:44:33 [Symbol(kHandle)]: [TCP],17:44:33 [Symbol(lastWriteQueueSize)]: 0,17:44:33 [Symbol(timeout)]: null,17:44:33 [Symbol(kBytesRead)]: 0,17:44:33 [Symbol(kBytesWritten)]: 0 },17:44:33 connection:17:44:33 Socket {17:44:33 connecting: false,17:44:33 _hadError: false,17:44:33 _parent: null,17:44:33 _host: null,17:44:33 _readableState: [ReadableState],17:44:33 readable: true,17:44:33 _events: [Object],17:44:33 _eventsCount: 7,17:44:33 _maxListeners: undefined,17:44:33 _writableState: [WritableState],17:44:33 writable: false,17:44:33 allowHalfOpen: false,17:44:33 _sockname: null,17:44:33 _pendingData: null,17:44:33 _pendingEncoding: '',17:44:33 server: null,17:44:33 _server: null,17:44:33 parser: null,17:44:33 _httpMessage: [ClientRequest],17:44:33 [Symbol(asyncId)]: 35,17:44:33 [Symbol(kHandle)]: [TCP],17:44:33 [Symbol(lastWriteQueueSize)]: 0,17:44:33 [Symbol(timeout)]: null,17:44:33 [Symbol(kBytesRead)]: 0,17:44:33 [Symbol(kBytesWritten)]: 0 },17:44:33 httpVersionMajor: 1,17:44:33 httpVersionMinor: 1,17:44:33 httpVersion: '1.1',17:44:33 complete: true,17:44:33 headers:17:44:33 { 'content-type': 'application/json; charset=utf-8',17:44:33 date: 'Thu, 21 Nov 2019 09:44:33 GMT',17:44:33 connection: 'close',17:44:33 'transfer-encoding': 'chunked' },17:44:33 rawHeaders:17:44:33 [ 'Content-Type',17:44:33 'application/json; charset=utf-8',17:44:33 'Date',17:44:33 'Thu, 21 Nov 2019 09:44:33 GMT',17:44:33 'Connection',17:44:33 'close',17:44:33 'Transfer-Encoding',17:44:33 'chunked' ],17:44:33 trailers: {},17:44:33 rawTrailers: [],17:44:33 aborted: false,17:44:33 upgrade: false,17:44:33 url: '',17:44:33 method: null,17:44:33 statusCode: 400,17:44:33 statusMessage: 'Bad Request',17:44:33 client:17:44:33 Socket {17:44:33 connecting: false,17:44:33 _hadError: false,17:44:33 _parent: null,17:44:33 _host: null,17:44:33 _readableState: [ReadableState],17:44:33 readable: true,17:44:33 _events: [Object],17:44:33 _eventsCount: 7,17:44:33 _maxListeners: undefined,17:44:33 _writableState: [WritableState],17:44:33 writable: false,17:44:33 allowHalfOpen: false,17:44:33 _sockname: null,17:44:33 _pendingData: null,17:44:33 _pendingEncoding: '',17:44:33 server: null,17:44:33 _server: null,17:44:33 parser: null,17:44:33 _httpMessage: [ClientRequest],17:44:33 [Symbol(asyncId)]: 35,17:44:33 [Symbol(kHandle)]: [TCP],17:44:33 [Symbol(lastWriteQueueSize)]: 0,17:44:33 [Symbol(timeout)]: null,17:44:33 [Symbol(kBytesRead)]: 0,17:44:33 [Symbol(kBytesWritten)]: 0 },17:44:33 _consuming: false,17:44:33 _dumped: false,17:44:33 req:17:44:33 ClientRequest {17:44:33 _events: [Object],17:44:33 _eventsCount: 5,17:44:33 _maxListeners: undefined,17:44:33 outputData: [],17:44:33 outputSize: 0,17:44:33 writable: true,17:44:33 _last: true,17:44:33 chunkedEncoding: false,17:44:33 shouldKeepAlive: false,17:44:33 useChunkedEncodingByDefault: false,17:44:33 sendDate: false,17:44:33 _removedConnection: false,17:44:33 _removedContLen: false,17:44:33 _removedTE: false,17:44:33 _contentLength: 0,17:44:33 _hasBody: true,17:44:33 _trailer: '',17:44:33 finished: true,17:44:33 _headerSent: true,17:44:33 socket: [Socket],17:44:33 connection: [Socket],17:44:33 _header:17:44:33 'GET /upload?cli=1&projectpath=%252FUsers%252Ftinman%252Fjenkins_workspace%252Fworkspace%252Fjojo_new_read&version=1.29.0.258&desc=build&infooutput= HTTP/1.1\r\nhost: 127.0.0.1:45960\r\nConnection: close\r\n\r\n',17:44:33 _onPendingData: [Function: noopPendingOutput],17:44:33 agent: [Agent],17:44:33 socketPath: undefined,17:44:33 timeout: undefined,17:44:33 method: 'GET',17:44:33 path:17:44:33 '/upload?cli=1&projectpath=%252FUsers%252Ftinman%252Fjenkins_workspace%252Fworkspace%252Fjojo_new_read&version=1.29.0.258&desc=build&infooutput=',17:44:33 _ended: true,17:44:33 res: [Circular],17:44:33 aborted: false,17:44:33 timeoutCb: null,17:44:33 upgradeOrConnect: false,17:44:33 parser: null,17:44:33 maxHeadersCount: null,17:44:33 [Symbol(isCorked)]: false,
17:44:33 17:44:33 caseless: t { dict: [Object] },17:44:33 body:17:44:33 `{"code":40000,"error":"错误 TypeError: Cannot read property 'toLowerCase' of undefined"}` } }17:44:34 Already up to date. |

调用的http服务的”预览“接口,https://developers.weixin.qq.com/miniprogram/dev/devtools/http.html
神奇的是这个在本机windows上不会出现,只在windows的服务器上能重现
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)