MicrosoftEdge / DevTools

Feedback and discussions about Microsoft Edge Developer Tools
MIT License
154 stars 50 forks source link

Issue with retrieving sourcemaps from symbol server: "Unknown error requesting source map: Failed to fetch" #245

Open captainbrosset opened 5 months ago

captainbrosset commented 5 months ago

So I am attempting to get this working, but whenever I check the sourcemap monitor all I see is "Unknown error requesting source map: Failed to fetch" I can confirm that the Sourcemaps are being tagged, and uploaded to the symbol server. In fact, if I check the requests via fiddler, I can see that Edge is hitting the symbol server and getting a 200 response followed by a 302 FOUND response.

When I put the URL of the 200 response into my browser, I do get the JSON response with the BlobUri information This URL is truncated by a NoRedirect parameter. If however, I remove the NoRedirect, I see in the DevTools Network tab that the initial 200 response of the URL I pasted is followed by a 302 response and the SourceMap is downloaded.

Is the 200 to 302 reponse expected? And should Edge be adding the NoRedirect url parameter?

Info: Edge Version 123.0.2420.81 (Official build) (64-bit) running on Windows 11 Enterprise 22631.3296

Originally posted by @WillGrayMSU in https://github.com/MicrosoftEdge/DevTools/issues/5#issuecomment-2045931933

AB#50075758

robpaveza commented 5 months ago

The NoRedirect parameter is required; DevTools issues a fetch call to the Symbol Server public API URL, which would issue a 302 redirect by default; but per spec, the fetch call would follow and include all of the original headers which breaks the API. NoRedirect enables DevTools to issue a subsequent call.

Can you clarify what you mean by "This URL is truncated by a NoRedirect parameter"? What is being truncated?

WillGrayMSU commented 5 months ago

Truncated probably wasn't the right word to use, I was just trying to say that the end of the URL has the NoRedirect parameter.

Yesterday, I was seeing a subsequent 302 in Fiddler after the initial 200. But today, I'm not seeing anything past the 200 response to artifacts.dev.azure.com. I do have a few 404's, but those are expected as we aren't generating the sourcemaps for those files.

Could the 3 or so 404s be causing the DevTools to abort downloading the sourcemaps we get 200s on?

WillGrayMSU commented 5 months ago

@robpaveza what should the JSON response be for the fetch be? I see this:

{
  "blobIdentifier": {
    "identifierValue": $value
  },
  "BlobUri": $URL,
  "ClientKey": $filename/sha256/filename,
  "InformationLevel": 340,
  "RequestId": "3d93af04db533f633896a40f5bc17cb06fbcd9b093ec5740bfdc74d1d10ffd47",
  "DomainId": "0",
  "Status": 1,
  "Size": 1113289,
  "CreatedBy": "3692d88d-371a-4903-9f88-f07b23216754",
  "CreatedDate": "2024-04-08T22:04:36Z",
  "Id": $filename/sha256/filename/FFFFFEAB",
  "StorageETag": "W/\"datetime'2024-04-08T22%3A04%3A36.4531641Z'\"",
  "Url": $artifactsURL/FFFFFFEAB
}

I've removed the actual values of idnetifierValue, BlobUri, ClientKey, ID, & URL for security purposes and substituted dummy values denoted by the $. But they seem correct in the uncensored response.

What I don't understand is the values at the end of the ID and URL. Both those entries end with FFFFFFEAB Do you know why that might be? It's not present in the original file's name.