Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] monday.storage.instance.deleteItem(key) failed when key does not exist #69

Closed
kulaone opened this issue Oct 5, 2022 · 2 comments

Comments

@kulaone
Copy link

kulaone commented Oct 5, 2022

Describe the bug
When trying to delete a key that does not exist, the Promise won't return and the error on the console is:
components-fa9c6aebdcd36ea0b03a.js:1 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': function(e){var t;if(2===x){if(!c)for(c={};t=Wt.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t} could not be cloned. at B.postMessage (https://cdn.monday.com/build/components-fa9c6aebdcd36ea0b03a.js:1:148412) at callback (https://cdn.monday.com/build/components-fa9c6aebdcd36ea0b03a.js:1:147993) at Object.<anonymous> (https://cdn.monday.com/build/main-4240d31c3d88e3b4f16b.js:1:3969554) at c (https://cdn.monday.com/assets/lib/jquery-1.11.2-39cc7e053fb2635f0759e107fe933746213d55b818b20d9b6b6a772bdcc87ea2.js:25:22505) at Object.fireWith [as rejectWith] (https://cdn.monday.com/assets/lib/jquery-1.11.2-39cc7e053fb2635f0759e107fe933746213d55b818b20d9b6b6a772bdcc87ea2.js:25:23325) at n (https://cdn.monday.com/assets/lib/jquery-1.11.2-39cc7e053fb2635f0759e107fe933746213d55b818b20d9b6b6a772bdcc87ea2.js:27:3985) at XMLHttpRequest.t (https://cdn.monday.com/assets/lib/jquery-1.11.2-39cc7e053fb2635f0759e107fe933746213d55b818b20d9b6b6a772bdcc87ea2.js:27:10196)

Steps to reproduce

  1. Embed the SDK in an app
  2. Call monday.storage.instance.deleteItem(key) with a key that has never been set.
  3. See the request fails

Expected behavior
Expect the crash to be caught and return the failure in the Promise

Context and environment
Chrome desktop browser

@goodpilotfish
Copy link

I saw the same behavior today when working with monday.storage.instance.deleteItem.

@gregra81
Copy link
Collaborator

gregra81 commented Feb 7, 2024

Hey @kulaone and @goodpilotfish , this should be solved now

@gregra81 gregra81 closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants