Safari 15.4 extension load wrong local page path

I'm developing a Safari extension and the feature is rating a web page opened by user and will show a block page if the web page contains some phishing link

window.location.href = safari.extension.baseURI + "blockpage/blockpage.html?herf=" + window.location.href + "&score=" + score + "&level=1";

It works fine in Safari 15.3 and other version below 15.4. But there is an error on Safari 15.4

It seems path component of "blockpage" is missing. The right path should be "safari-extension://4506B856-D122-4301-93FD-712FDCC4EF14/blockpage/blockpage.html"

Any comments will be appreciated. Thanks a lot.

Safari 15.4 extension load wrong local page path
 
 
Q