diff --git a/src/app-logic/constants.ts b/src/app-logic/constants.ts index be047a25b2..79816e7b02 100644 --- a/src/app-logic/constants.ts +++ b/src/app-logic/constants.ts @@ -121,7 +121,7 @@ export const PROFILER_SERVER_ORIGIN = 'https://api.profiler.firefox.com'; // [1] https://github.com/mstange/profiler-symbol-server/ // This is the default server. -export const SYMBOL_SERVER_URL = 'https://symbolication.services.mozilla.com'; +export const SYMBOL_SERVER_URL = 'https://mozilla.symbols.samplyprofiler.com'; // See the MarkerPhase type for more information. export const INSTANT: MarkerPhase = 0; diff --git a/src/selectors/url-state.ts b/src/selectors/url-state.ts index ecb21e6103..a47b3a707b 100644 --- a/src/selectors/url-state.ts +++ b/src/selectors/url-state.ts @@ -329,6 +329,7 @@ function _shouldAllowSymbolServerUrl(symbolServerUrl: string) { const otherAllowedHostnames = [ 'symbols.mozilla.org', 'symbolication.services.mozilla.com', + 'mozilla.symbols.samplyprofiler.com', ]; if (!otherAllowedHostnames.includes(url.hostname)) { console.error( diff --git a/src/test/__snapshots__/url-handling.test.ts.snap b/src/test/__snapshots__/url-handling.test.ts.snap index bd9e77b27a..93fb601058 100644 --- a/src/test/__snapshots__/url-handling.test.ts.snap +++ b/src/test/__snapshots__/url-handling.test.ts.snap @@ -7,7 +7,7 @@ exports[`symbolServerUrl will allow an allowed https host 1`] = `Array []`; exports[`symbolServerUrl will error when switching to an allowed but non-https host 1`] = ` Array [ Array [ - "HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://symbolication.services.mozilla.com.", + "HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://mozilla.symbols.samplyprofiler.com.", ], ] `; @@ -15,7 +15,7 @@ Array [ exports[`symbolServerUrl will error when switching to an invalid host 1`] = ` Array [ Array [ - "The symbol server URL was not valid. Rejecting invalid and defaulting to https://symbolication.services.mozilla.com.", + "The symbol server URL was not valid. Rejecting invalid and defaulting to https://mozilla.symbols.samplyprofiler.com.", [TypeError: Invalid URL: invalid], ], ] @@ -24,7 +24,7 @@ Array [ exports[`symbolServerUrl will error when switching to an unknown host 1`] = ` Array [ Array [ - "The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://symbolication.services.mozilla.com.", + "The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://mozilla.symbols.samplyprofiler.com.", ], ] `; diff --git a/src/test/store/receive-profile.test.ts b/src/test/store/receive-profile.test.ts index bd0d50cdea..95dcb045fb 100644 --- a/src/test/store/receive-profile.test.ts +++ b/src/test/store/receive-profile.test.ts @@ -77,6 +77,7 @@ import { simulateOldWebChannelAndFrameScript, simulateWebChannel, } from '../fixtures/mocks/web-channel'; +import { SYMBOL_SERVER_URL } from 'firefox-profiler/app-logic/constants'; function simulateSymbolStoreHasNoCache() { // SymbolStoreDB is a mock, but Flow doesn't know this. That's why we use @@ -815,7 +816,7 @@ describe('actions/receive-profile', function () { expect( window.fetchMock.callHistory.lastCall( - 'https://symbolication.services.mozilla.com/symbolicate/v5' + `${SYMBOL_SERVER_URL}/symbolicate/v5` )?.options ).toEqual( expect.objectContaining({ @@ -833,7 +834,7 @@ describe('actions/receive-profile', function () { expect( window.fetchMock.callHistory.lastCall( - 'https://symbolication.services.mozilla.com/symbolicate/v5' + `${SYMBOL_SERVER_URL}/symbolicate/v5` )?.options ).toEqual( expect.objectContaining({ @@ -913,7 +914,7 @@ describe('actions/receive-profile', function () { 'https://storage.googleapis.com/profile-store/FAKEHASH', unsymbolicatedProfile ) - .post('https://symbolication.services.mozilla.com/symbolicate/v5', {}); + .post(`${SYMBOL_SERVER_URL}/symbolicate/v5`, {}); simulateSymbolStoreHasNoCache(); @@ -925,7 +926,7 @@ describe('actions/receive-profile', function () { expect( window.fetchMock.callHistory.lastCall( - 'https://symbolication.services.mozilla.com/symbolicate/v5' + `${SYMBOL_SERVER_URL}/symbolicate/v5` )?.options ).toEqual( expect.objectContaining({ @@ -1425,7 +1426,7 @@ describe('actions/receive-profile', function () { expect( window.fetchMock.callHistory.lastCall( - 'https://symbolication.services.mozilla.com/symbolicate/v5' + `${SYMBOL_SERVER_URL}/symbolicate/v5` )?.options ).toEqual( expect.objectContaining({ diff --git a/src/utils/fetch-assembly.ts b/src/utils/fetch-assembly.ts index eca1606a0a..e470a781c8 100644 --- a/src/utils/fetch-assembly.ts +++ b/src/utils/fetch-assembly.ts @@ -74,8 +74,8 @@ export async function fetchAssembly( // local symbol servers. Check the symbol server URL to avoid hammering the // official Mozilla symbolication server with requests it can't handle. // This check can be removed once it adds support for /asm/v1. -function _serverMightSupportAssembly(symbolServerUrl: string): boolean { - return isLocalURL(symbolServerUrl); +function _serverMightSupportAssembly(_symbolServerUrl: string): boolean { + return true; } // Convert the response from the JSON format into our own DecodedInstruction