Safari 18: fetch() in safari extension does not include credentials

It seems Safari 18's fetch() does not include credentials even credentials: include and safari extension has host_permissions for that domain.

Is there anyone has this problem?

I try to request in popup.js like this:

const response = await fetch(
    url,
    {
        method: 'GET',
        mode: 'cors',
        credentials: 'include',
        referrerPolicy: 'no-referrer',
    }
);

and it does not include the cookie from host_permissions.

Those code worked in Safari 17 (macOS Sonoma).

We see this error when using Profiles in Safari 18. It works in the Personal Profile, but any other Profile it does not work.

I opened feedback assistant FB15307169.

Is there a solution

Safari 18: fetch() in safari extension does not include credentials
 
 
Q