Azure / Azure/azure-functions-core-tools
Exception - invalid wire type 7
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 13
Description
hi
Working on this Learn Module which works in Edge (83.0.478.37) and causes an exception in firefox (v76.0.1) then the azure-functions-core-tools dies (running version azure-functions-core-tools@2.7.2508).
https://docs.microsoft.com/en-us/learn/modules/build-api-azure-functions/10-exercise-cors-frontend
Exception has occurred: Error
Error: invalid wire type 7 at offset 539
at BufferReader.module.exports.Reader.skipType (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:5452:19)
at Type.RpcHttp$decode [as decode] (eval at Codegen (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:18075:33), :63:5)
at Type.decode_setup [as decode] (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:5998:25)
at TypedData$decode [as decode] (eval at Codegen (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:18075:33), :23:19)
at Type.decode_setup [as decode] (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:5998:25)
at Type.ParameterBinding$decode [as decode] (eval at Codegen (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:18075:33), :14:19)
at Type.decode_setup [as decode] (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:5998:25)
at Type.InvocationRequest$decode [as decode] (eval at Codegen (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:18075:33), :19:29)
at Type.decode_setup [as decode] (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:5998:25)
at Type.StreamingMessage$decode [as decode] (eval at Codegen (C:\Users\matt\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js:18075:33), :47:33)
Edge (working) request headers:
GET /api/products HTTP/1.1
Host: 127.0.0.1:7071
Connection: keep-alive
x-functions-key:
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37
Origin: http://localhost:5000
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:5000/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Firefox (not working) request headers:
Host: 127.0.0.1:7071
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Request-Method: GET
Access-Control-Request-Headers: x-functions-key
Referer: http://localhost:5000/
Origin: http://localhost:5000
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Contributor guide
Research direction
Start with the linked Learn Module CORS exercise and compare its Firefox preflight request with the working Edge request. Inspect the reported worker-bundle.js decoding path around Reader.skipType and RpcHttp$decode, then reproduce with azure-functions-core-tools@2.7.2508. Done means the Firefox request completes without the invalid wire type exception or terminating the tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, node.js
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100