Bug 1958259 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

bug 1942306 changed the serialization format of `nsCSPContext` without the `nsCSPContext::Read` method being backwards-compatible. Consequently, after updating to Firefox 136 (or later) from a pre-136 profile, the console reported the error below.

Similarly, bug 1942306 introduces another new field in 138, so when that version reaches release, something similar will happen.

This is not the first time that sessions failed to restore properly due to missing backwards compatibility, see bug 1784045 for a prior example.

Relevant diffs:

- https://searchfox.org/mozilla-central/diff/c7d941910cc5d21565cb219a826a7fcab8a8aee6/dom/security/nsCSPContext.cpp#2085-2094
- https://searchfox.org/mozilla-central/diff/084bbe908aedc51d11d585793f3903aecb744356/dom/security/nsCSPContext.cpp#2157-2179

> ProcessSwitch: Failed to deserialize csp_b64 'CdntGuXUQAS/4CfOuSPZrAAAAAAAAAAAwAAAAAAAAEYB3pRy0IA0EdOTmQAQS6D9QJIHOlRteE8wkTq4cYEyCMYAAAAC/////wAAAbsBAAAAP2h0dHBzOi8vY2hhdC5tb3ppbGxhLm9yZy8jL3Jvb20vIWVhRmVUa2lTdHZyYnhqQmJ4Uzptb3ppbGxhLm9yZwAAAAAAAAAFAAAACAAAABAAAAAI/////wAAAAj/////AAAACAAAABAAAAAYAAAAJwAAABgAAAABAAAAGAAAAAEAAAAZAAAAAAAAABn/////AAAAAP////8AAAAY/////wAAABoAAAAlAQAAAAAAAAAAAGR7IjEiOnsiMCI6Imh0dHBzOi8vY2hhdC5tb3ppbGxhLm9yZy8jL3Jvb20vIWVhRmVUa2lTdHZyYnhqQmJ4Uzptb3ppbGxhLm9yZyIsIjIiOiJedXNlckNvbnRleHRJZD02In19AAAAAgAAABYAZgByAGEAbQBlAC0AYQBuAGMAZQBzAHQAbwByAHMAIAAnAHMAZQBsAGYAJwAAAAABcgBkAGUAZgBhAHUAbAB0AC0AcwByAGMAIAAnAG4AbwBuAGUAJwA7ACAAcwB0AHkAbABlAC0AcwByAGMAIAAnAHMAZQBsAGYAJwAgACcAdQBuAHMAYQBmAGUALQBpAG4AbABpAG4AZQAnADsAIABzAGMAcgBpAHAAdAAtAHMAcgBjACAAJwBzAGUAbABmACcAIAAnAHcAYQBzAG0ALQB1AG4AcwBhAGYAZQAtAGUAdgBhAGwAJwAgAGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAHIAZQBjAGEAcAB0AGMAaABhAC4AbgBlAHQALwByAGUAYwBhAHAAdABjAGgAYQAvACAAaAB0AHQAcABzADoALwAvAHcAdwB3AC4AZwBzAHQAYQB0AGkAYwAuAGMAbwBtAC8AcgBlAGMAYQBwAHQAYwBoAGEALwA7ACAAaQBtAGcALQBzAHIAYwAgACoAIABiAGwAbwBiADoAIABkAGEAdABhADoAOwAgAGMAbwBuAG4AZQBjAHQALQBzAHIAYwAgACoAIABiAGwAbwBiADoAOwAgAGYAbwBuAHQALQBzAHIAYwAgACcAcwBlAGwAZgAnACAAZABhAHQAYQA6ADsAIABtAGUAZABpAGEALQBzAHIAYwAgACoAIABiAGwAbwBiADoAIABkAGEAdABhADoAOwAgAGMAaABpAGwAZAAtAHMAcgBjACAAKgAgAGIAbABvAGIAOgAgAGQAYQB0AGEAOgA7ACAAdwBvAHIAawBlAHIALQBzAHIAYwAgACcAcwBlAGwAZgAnACAAYgBsAG8AYgA6ADsAIABmAHIAYQBtAGUALQBzAHIAYwAgACoAIABiAGwAbwBiADoAIABkAGEAdABhADoAOwAgAGYAbwByAG0ALQBhAGMAdABpAG8AbgAgACcAcwBlAGwAZgAnADsAIABtAGEAbgBpAGYAZQBzAHQALQBzAHIAYwAgACcAcwBlAGwAZgAnAAE=' [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISerializationHelper.deserializeObject]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/E10SUtils.sys.mjs :: deserializeCSP :: line 325"  data: no]

stack (from Firefox 137.0)

> deserializeCSP resource://gre/modules/E10SUtils.sys.mjs:329
    deserializeEntry resource://gre/modules/sessionstore/SessionHistory.sys.mjs:585
    restore resource://gre/modules/sessionstore/SessionHistory.sys.mjs:384
    restoreFromParent resource://gre/modules/sessionstore/SessionHistory.sys.mjs:53
    _restoreHistory resource:///modules/sessionstore/SessionStore.sys.mjs:7617
    _sendRestoreHistory resource:///modules/sessionstore/SessionStore.sys.mjs:7873
    restoreTab resource:///modules/sessionstore/SessionStore.sys.mjs:6083
    restoreTabs resource:///modules/sessionstore/SessionStore.sys.mjs:5931
    ssi_restoreWindow resource:///modules/sessionstore/SessionStore.sys.mjs:5683
    _restoreWindowsFeaturesAndTabs resource:///modules/sessionstore/SessionStore.sys.mjs:5769
    _restoreWindowsInReversedZOrder resource:///modules/sessionstore/SessionStore.sys.mjs:5793
    ssi_restoreWindows resource:///modules/sessionstore/SessionStore.sys.mjs:5869
bug 1901492 changed the serialization format of `nsCSPContext` without the `nsCSPContext::Read` method being backwards-compatible. Consequently, after updating to Firefox 136 (or later) from a pre-136 profile, the console reported the error below.

Similarly, bug 1942306 introduces another new field in 138, so when that version reaches release, something similar will happen.

This is not the first time that sessions failed to restore properly due to missing backwards compatibility, see bug 1784045 for a prior example.

Relevant diffs:

- https://searchfox.org/mozilla-central/diff/c7d941910cc5d21565cb219a826a7fcab8a8aee6/dom/security/nsCSPContext.cpp#2085-2094
- https://searchfox.org/mozilla-central/diff/084bbe908aedc51d11d585793f3903aecb744356/dom/security/nsCSPContext.cpp#2157-2179

> ProcessSwitch: Failed to deserialize csp_b64 'CdntGuXUQAS/4CfOuSPZrAAAAAAAAAAAwAAAAAAAAEYB3pRy0IA0EdOTmQAQS6D9QJIHOlRteE8wkTq4cYEyCMYAAAAC/////wAAAbsBAAAAP2h0dHBzOi8vY2hhdC5tb3ppbGxhLm9yZy8jL3Jvb20vIWVhRmVUa2lTdHZyYnhqQmJ4Uzptb3ppbGxhLm9yZwAAAAAAAAAFAAAACAAAABAAAAAI/////wAAAAj/////AAAACAAAABAAAAAYAAAAJwAAABgAAAABAAAAGAAAAAEAAAAZAAA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tAGUALQBzAHIAYwAgACoAIABiAGwAbwBiADoAIABkAGEAdABhADoAOwAgAGYAbwByAG0ALQBhAGMAdABpAG8AbgAgACcAcwBlAGwAZgAnADsAIABtAGEAbgBpAGYAZQBzAHQALQBzAHIAYwAgACcAcwBlAGwAZgAnAAE=' [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISerializationHelper.deserializeObject]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/E10SUtils.sys.mjs :: deserializeCSP :: line 325"  data: no]

stack (from Firefox 137.0)

> deserializeCSP resource://gre/modules/E10SUtils.sys.mjs:329
    deserializeEntry resource://gre/modules/sessionstore/SessionHistory.sys.mjs:585
    restore resource://gre/modules/sessionstore/SessionHistory.sys.mjs:384
    restoreFromParent resource://gre/modules/sessionstore/SessionHistory.sys.mjs:53
    _restoreHistory resource:///modules/sessionstore/SessionStore.sys.mjs:7617
    _sendRestoreHistory resource:///modules/sessionstore/SessionStore.sys.mjs:7873
    restoreTab resource:///modules/sessionstore/SessionStore.sys.mjs:6083
    restoreTabs resource:///modules/sessionstore/SessionStore.sys.mjs:5931
    ssi_restoreWindow resource:///modules/sessionstore/SessionStore.sys.mjs:5683
    _restoreWindowsFeaturesAndTabs resource:///modules/sessionstore/SessionStore.sys.mjs:5769
    _restoreWindowsInReversedZOrder resource:///modules/sessionstore/SessionStore.sys.mjs:5793
    ssi_restoreWindows resource:///modules/sessionstore/SessionStore.sys.mjs:5869

Back to Bug 1958259 Comment 0