salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.64k stars 393 forks source link

Custom Formatter Failed: Uncaught TypeError: Cannot convert a Symbol value to a string #3687

Open mikhail-ivanov-tr opened 1 year ago

mikhail-ivanov-tr commented 1 year ago

Description

When I enabled "Use Lightning Web Security for Lightning web components and Aura components" session setting, inspect in Chrome my LWC component, call $0 in Console tab of Devtools, and try to open the LWC object, I got an error message "Custom Formatter Failed: Uncaught TypeError: Cannot convert a Symbol value to a string". The same issue is not reproducible with Lightning Locker.

2023-08-25_9-00-47

Also, the custom formatters don't work in LWS mode in all expected places, for example in Watch in Source tab of Devtools.

The exception is thrown in aura_proddebug.js in line 33019: ReflectApply$LWS(ArrayProtoSort$LWS, ownKeys$LWS, []);

Steps to Reproduce

My LWC:

<template>
    AAA
</template>
import {api, LightningElement} from 'lwc';

export default class Test extends LightningElement {
    @api val = ['ABC'];
}

Expected Results

Custom Formatters should show content instead of Proxy object.

Actual Results

Still Proxy objects are shown.

Browsers Affected

Chrome Version 116.0.5845.97 (Official Build) (64-bit)

arcadeteddy commented 1 year ago

FIX: https://github.com/salesforce/near-membrane/pull/440

mikhail-ivanov-tr commented 1 year ago

Thank you for the fix. May I know when the fix will be rolled over to SF orgs?