RESOLVED FIXED 218061
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
https://bugs.webkit.org/show_bug.cgi?id=218061
Summary Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'va...
Devin Rousso
Reported 2020-10-21 16:46:30 PDT
not really sure what I was doing, but I was looking at cookies :| Uncaught Exceptions: ----------------------- - undefined is not an object (evaluating 'value.truncate') (at DOMStorageContentView.js:160:21) _truncateValue @ DOMStorageContentView.js:160:21 itemUpdated @ DOMStorageContentView.js:136:36 dispatch @ Object.js:165:30 dispatchEventToListeners @ Object.js:172:17 itemUpdated @ DOMStorageObject.js:135:38 itemUpdated @ DOMStorageManager.js:142:35 domStorageItemUpdated @ DOMStorageObserver.js:48:41 _dispatchEvent @ Connection.js:210:26 dispatch @ Connection.js:79:32 dispatchMessageFromTarget @ TargetManager.js:176:39 dispatchMessageFromTarget @ TargetObserver.js:47:51 _dispatchEvent @ Connection.js:210:26 dispatch @ Connection.js:79:32 dispatch @ InspectorBackend.js:232:52 ? @ MessageDispatcher.js:42:34 Additional Details: cause --> An uncaught exception was thrown while handling event: DOMStorage.domStorageItemUpdated ----------------------- Notes: Inspected URL: https://www.cbc.ca/account/profile Loading completed: true Frontend User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Dispatch Source: Protocol Event Protocol Event: {"method":"DOMStorage.domStorageItemUpdated","params":{"storageId":{"securityOrigin":"https://www.cbc.ca","isLocalStorage":true},"key":"_cX_atfr","oldValue":"&altm=1603323791017&arnd=kgk1l6splslgirr7&aatm=2&axtl=&awsz=2560x446&amvw=2560x593&ascp=45x593&aclk=0","newValue":"&altm=1603323791017&arnd=kgk1l6splslgirr7&aatm=29&axtl=&awsz=2560x446&amvw=2560x593&ascp=45x593&aclk=0"}}
Attachments
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') (1.70 KB, patch)
2020-10-27 17:22 PDT, Federico Bucchi
no flags
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') (2.08 KB, patch)
2020-10-27 20:43 PDT, Federico Bucchi
no flags
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') (1.88 KB, patch)
2020-10-28 15:59 PDT, Federico Bucchi
no flags
Patch (1.50 KB, patch)
2020-10-29 15:48 PDT, Federico Bucchi
no flags
Radar WebKit Bug Importer
Comment 1 2020-10-21 16:46:50 PDT
Devin Rousso
Comment 2 2020-10-21 16:52:21 PDT
(In reply to Devin Rousso from comment #0) > not really sure what I was doing, but I was looking at cookies :| sorry i meant session storage 😅
Federico Bucchi
Comment 3 2020-10-27 17:22:33 PDT
Created attachment 412482 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Devin Rousso
Comment 4 2020-10-27 17:30:22 PDT
Comment on attachment 412482 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') r-, as this covers up the issue instead of solving it I think the real problem is that `WI.DOMStorageObject.Event.ItemUpdated` dispatches with `{key, oldValue, newValue}` but `WI.DOMStorageContentView.prototype.itemUpdated` uses `value`.
Federico Bucchi
Comment 5 2020-10-27 20:43:47 PDT
Created attachment 412506 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Devin Rousso
Comment 6 2020-10-28 10:23:23 PDT
Comment on attachment 412506 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') View in context: https://bugs.webkit.org/attachment.cgi?id=412506&action=review > Source/WebInspectorUI/UserInterface/Models/DOMStorageObject.js:130 > - itemUpdated(key, oldValue, newValue) > + itemUpdated(key, value) This has to stay as it was before, as this is being called by `WI.DOMStorageObserver.prototype.domStorageItemUpdated` which comes from the protocol. Basically, I think all you need to do is change `{key, oldValue, newValue}` to `{key, value: newValue}`.
Federico Bucchi
Comment 7 2020-10-28 15:59:30 PDT
Created attachment 412581 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Federico Bucchi
Comment 8 2020-10-29 15:48:01 PDT
Devin Rousso
Comment 9 2020-10-29 15:54:56 PDT
Comment on attachment 412696 [details] Patch r=me
EWS
Comment 10 2020-10-29 17:55:20 PDT
Committed r269175: <https://trac.webkit.org/changeset/269175> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412696 [details].
Note You need to log in before you can comment on or make changes to this bug.