Skip to content

[🐞] v2 Signal returns a Proxy on deserialization #7660

Open
@GrandSchtroumpf

Description

@GrandSchtroumpf

Which component is affected?

Qwik Runtime

Describe the bug

In v2, Signal returns a Proxy which are not transferable:

export default component$(() => {
  const searchSignal = useSignal('');
  const typesSignal = useSignal([]);
  useTask$(({ track }) => {
    const search = track(searchSignal);
    const types = track(typesSignal);
    worker.postMessage({ search, types }); // Not Working
  });
  return <input bind:value={searchSignal} />
})

The main problem for me are:

  1. There is no way to know this is a Proxy
  2. It's not a Proxy anymore once we change the value in the browser
  3. We don't have any tools to unwrap the proxy if it's signal (like unwrapStore for example)

Reproduction

https://qwikdev-build-v2.qwik-8nx.pages.dev/playground/#f=Q0o0JmYW2BKNDrySBLMg9TCF7RNoxQ8u6KAG2iIM11BXBzoOpgqURIqxKIqOBSuC1%2BAa1dD6uBZuDapFQN1gBRrI9oLNQLEKrgzJYqgqYM3llpgJqj9L8oElYmoyqLJVB7ZUSpOBsZmaAqwq8lLVgQ0CBXVInla3UojOT8oCFuwKjkVFiZWxoPYMsB7JA6aGJGD9BlKfguQAsADQAWhGQpwCdgQonyHyYSa4nZMEtMsKWByVAtstyH6rBUV%2FrSb2bGloidTwJCVbokT4aKakRaYEAA

Steps to reproduce

  • In the playground open devtools
  • Write something in the input
  • See error message in console

System Info

-

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions