I built and extension for chrome, edge, and firefox. I'm porting the chrome extension to safari using the safari-web-extension-converter tool. This has worked successfully and I was able to publish my extension to the app store.
I made some updates to the service worker code recently and I'm now being hit with an error when trying to load my unsigned extension into safari:
The service_worker script failed to load due to an error.
I've looked online at some other forums and haven't found anything helpful around how to debug this kind of error. Because the service worker is non-persistent in safari, I don't have access to the console logs of the service worker through the Develop > Web Extension Background Context menu.
Has anyone successfully debugged this kind of error? Are there logs I can pull directly from safari that would help me here? Thanks in advance for the help!
Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Crash Stack:
thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19ba3bb04)
frame #0: 0x000000019ba3bb04 CoreFoundation`forwarding.cold.2 + 92
frame #1: 0x000000019b8ab718 CoreFoundation`forwarding + 1288
frame #2: 0x000000019b8ab150 CoreFoundation`_CF_forwarding_prep_0 + 96
frame #3: 0x000000019df230b0 CoreText`TCFRef<CTRun*>::Retain(void const*) + 40
frame #4: 0x000000019e052050 CoreText`CreateFontWithFontURL(__CFURL const*, __CFString const*, __CFString const*) + 476
frame #5: 0x000000019e052874 CoreText`TCGFontCache::CopyFont(__CFURL const*, __CFString const*, __CFString const*) + 144
frame #6: 0x000000019df27dcc CoreText`TBaseFont::CopyNativeFont() const + 232
frame #7: 0x000000019df8ee64 CoreText`TBaseFont::GetInitializedGraphicsFont() const + 152
frame #8: 0x000000019df26d70 CoreText`TBaseFont::CopyVariationAxes() const + 296
frame #9: 0x000000019df2d148 CoreText`TDescriptor::InitBaseFont(unsigned long, double) + 768
frame #10: 0x000000019df21358 CoreText`TDescriptor::CreateMatchingDescriptor(__CFSet const*, double, unsigned long) const + 604
frame #11: 0x000000019df251f8 CoreText`CTFontCreateWithFontDescriptor + 68
frame #12: 0x00000001bff8dfb8 WebCore`WebCore::createCTFont(__CFDictionary const*, float, unsigned int, __CFString const*, __CFString const*) + 124
frame #13: 0x00000001bff8e8bc WebCore`WebCore::FontPlatformData::fromIPCData(float, WebCore::FontOrientation&&, WebCore::FontWidthVariant&&, WebCore::TextRenderingMode&&, bool, bool, std::__1::variant<WebCore::FontPlatformSerializedData, WebCore::FontPlatformSerializedCreationData>&&) + 228
frame #14: 0x00000001c128eef4 WebKit`IPC::ArgumentCoder<WebCore::Font, void>::decode(IPC::Decoder&) + 1352
frame #15: 0x00000001c1333ca4 WebKit`std::__1::optional<WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>> IPC::ArgumentCoder<WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>, void>::decodeIPC::Decoder(IPC::Decoder&) + 480
frame #16: 0x00000001c1333a5c WebKit`std::__1::optional<WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>> IPC::Decoder::decode<WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>>() + 28
frame #17: 0x00000001c1333804 WebKit`std::__1::optional<std::__1::pair<WebCore::AttributedString::Range, WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>>> IPC::Decoder::decode<std::__1::pair<WebCore::AttributedString::Range, WTF::HashMap<WTF::String, WebCore::AttributedString::AttributeValue, WTF::DefaultHashWTF::String, WTF::HashTraitsWTF::String, WTF::HashTraitsWebCore::AttributedString::AttributeValue, WTF::HashTableTraits>>>() + 156
frame #18: 0x00000001c121f368 WebKit`IPC::ArgumentCoder<WebCore::AttributedString, void>::decode(IPC::Decoder&) + 172
frame #19: 0x00000001c121f124 WebKit`std::__1::optionalWebCore::AttributedString IPC::Decoder::decodeWebCore::AttributedString() + 28
frame #20: 0x00000001c12594ec WebKit`IPC::ArgumentCoder<WebCore::DictionaryPopupInfo, void>::decode(IPC::Decoder&) + 76
frame #21: 0x00000001c12d0660 WebKit`std::__1::optionalWebCore::DictionaryPopupInfo IPC::Decoder::decodeWebCore::DictionaryPopupInfo() + 28
frame #22: 0x00000001c12ceef0 WebKit`IPC::ArgumentCoder<WebKit::WebHitTestResultData, void>::decode(IPC::Decoder&) + 1292
frame #23: 0x00000001c1338950 WebKit`std::__1::optionalWebKit::WebHitTestResultData IPC::Decoder::decodeWebKit::WebHitTestResultData() + 28
frame #24: 0x00000001c1ec7edc WebKit`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 31392
frame #25: 0x00000001c1fb8f28 WebKit`IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 272
frame #26: 0x00000001c19ab2c0 WebKit`WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 44
frame #27: 0x00000001c1fb3254 WebKit`IPC::Connection::dispatchMessage(WTF::UniqueRefIPC::Decoder) + 252
frame #28: 0x00000001c1fb3768 WebKit`IPC::Connection::dispatchIncomingMessages() + 576
frame #29: 0x00000001b9ab90c4 JavaScriptCore`WTF::RunLoop::performWork() + 204
frame #30: 0x00000001b9ab9fec JavaScriptCore`WTF::RunLoop::performWork(void*) + 36
frame #31: 0x000000019b8cc8a4 CoreFoundation`CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
frame #32: 0x000000019b8cc838 CoreFoundation`__CFRunLoopDoSource0 + 176
frame #33: 0x000000019b8cc59c CoreFoundation`__CFRunLoopDoSources0 + 244
frame #34: 0x000000019b8cb138 CoreFoundation`__CFRunLoopRun + 840
frame #35: 0x000000019b8ca734 CoreFoundation`CFRunLoopRunSpecific + 588
frame #36: 0x00000001a6e39530 HIToolbox`RunCurrentEventLoopInMode + 292
frame #37: 0x00000001a6e3f348 HIToolbox`ReceiveNextEventCommon + 676
frame #38: 0x00000001a6e3f508 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
frame #39: 0x000000019f442848 AppKit`_DPSNextEvent + 660
frame #40: 0x000000019fda8c24 AppKit`-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
frame #41: 0x000000019f435874 AppKit`-[NSApplication run] + 480
frame #42: 0x000000019f40c068 AppKit`NSApplicationMain + 888
frame #43: 0x00000001ca56a70c SwiftUI`merged generic specialization <SwiftUI.TestingAppDelegate> of function signature specialization <Arg[0] = Existential To Protocol Constrained Generic> of SwiftUI.runApp(__C.NSResponder & __C.NSApplicationDelegate) -> Swift.Never + 160
frame #44: 0x00000001ca9e09a0 SwiftUI`SwiftUI.runApp<τ_0_0 where τ_0_0: SwiftUI.App>(τ_0_0) -> Swift.Never + 140
frame #45: 0x00000001cad5ce68 SwiftUI`static SwiftUI.App.main() -> () + 224
frame #46: 0x0000000105943104 MyApp Dev.debug.dylib`static MyMacApp.$main() at :0
frame #47: 0x0000000105943c9c MyApp Dev.debug.dylib`main at MyMacApp.swift:24:8
frame #48: 0x000000019b464274 dyld`start + 2840
I have a business scenario where I want to guide users to Safari and open a Safari extension. How can I open Safari from my app and navigate to a specific webpage?
Topic:
Safari & Web
SubTopic:
General
Hi everyone,
I’m working on a Safari browser extension and recently encountered a major issue after transferring the extension from one Apple Developer account to another, then releasing an update under the new account. Following this update, user engagement has dropped off dramatically. My understanding—based on my own investigations, which may be limited—is that this problem arises because Safari is treating the extension as entirely new due to the change in the developer account.
Here’s what I’ve pieced together so far:
• Safari appears to rely on an Extensions.plist file, which uniquely identifies each installed extension by a combination of its bundle identifier and the associated developer account ID.
• The Extensions.plist file also stores the state of granted permissions for each extension. Because our extension now has a new developer account ID, Safari no longer seems to recognize it as the same extension that users had previously approved.
• As a result, previously granted permissions appear to have been lost, and users must manually re-enable the extension—leading to a significant drop in engagement and revenue.
I’m hoping someone can clarify the following:
Is there a known migration path to transfer an extension between developer accounts without causing users to lose their previously granted permissions?
Are there best practices, or workarounds, for maintaining continuity when the bundle identifier and/or developer account ID changes? Are there any tools for re-linking permissions after a bundle identifier or developer account ID change?
Has anyone worked through a similar scenario and found a solution or guidance from Apple Developer Support or the Safari team?
I’ll also be reaching out to Apple Developer Support directly, but any insights from those who’ve dealt with this scenario would be greatly appreciated.
Thank you!
Topic:
Safari & Web
SubTopic:
General
After updating to iOS 18.4, our web application (with service workers) crashes on devices that accessed it prior to the update. This issue also affects hybrid mobile apps using the same web application; reinstalling the app resolves it by refetching and reinstalling service workers. Debugging is challenging because clearing the cache or reinstalling the app fixes the problem, and no useful error logs are available. Has anyone encountered similar crashes related to service workers after an iOS update and have any insights into the cause?
please network best link wifi perfile very issue in wifi
Topic:
Safari & Web
SubTopic:
General
我使用Apple Pay on the Web Interactive Demo构建了一个web应用使用的是Payment Request API方式,但是遇到了几个问题:
拉起的web Apple Pay 底部一直转圈圈无法付款,这个是什么问题?
如何设置sandbox测试付款呢?
如何异步、同步获取支付结果(后端代码获取支付结果)?demo只有await response.complete("success");前端代码获取支付结果的操作
demo网址: https://shop.wowseer.com/rsolomakhin/pr/applepay/
We are experiencing a problem that seems to be caused by a specification changes for Safari.
We would like to discuss how to solve this problem.
Sample JavaScript:
<html>
<head>
<script>
function jumpPage(code) {
document.main.code.value = code;
win1=window.open("","win1","toolbar=no,resizable=yes,menubar=no,scrollbars=yes,status=yes,left=0,top=0");
win1.resizeTo(width=screen.availWidth,height=screen.availHeight);
document.main.action="details";
document.main.target="win1";
document.main.submit();
}
</script>
</head>
<body>
<form name="main" method="post" action="" target="">
<a href="javascript:jumpPage('001')">details</a>
<input type="hidden" name="code" value="">
</body>
</html>
This JavaScript performs the following actions when a link is clicked.
Open a window using window.open in JavaScript
Submit the above opened window by post method to the target in JavaScript.
When this operation is performed, the process in (2) could submit to the
target page with “POST” method before iOS18.1, but
will transition to the page with“GET”method from iOS18.2 onward.
All protocols are http.
This problem does not occur if the URL is specified as an IP address, but it does occur if the host name is specified as.
Please let me know how to use with“POST”method as in iOS 18.2 or earlier.
Best regards,
Topic:
Safari & Web
SubTopic:
General
I've a apple pay integration on my website. The new sdk, that allows third party browsers.
My integration works well everywhere, except on third party when I read the QR code it results in a "payment incomplete".
I have gone through several threads in apple dev forums, and several guides on implementation steps and troubleshooting. But I'm still without solution.
When Debugging in iOS device I get: "Application failed to provide a valid merchant session. We can't proceed to authorize the transaction."
I've doublechecked, the values I send to create the payment Session are correct, the domain and merchantIds. (It works well with the same implementation on safari, what's the difference here?)
I've also doublechecked the values i'm sending to the completeMerchantValidation, and they are all in the right format and types.
What else can iIcheck?
Our app is an enterprise app via MDM.
We are experiencing an issue in iPadOS 18.4 when loading an internal HTTPS server via WKWebView in a hybrid iOS app.
Our server uses a self-signed certificate but lacks the digitalSignature usage in its Key Usage extension. (Currently we have no chance to change the server's certificate)
We override webView:didReceiveAuthenticationChallenge:completionHandler: to trust the certificate:
completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
This "completionHandler" works in previous 18.3.2 , but not work in 18.4. May I know is there any changes in 18.4 for the https certification? Why this delegate not work? What we can do to ignore this ssl error and get connection?
Thanks in advance, look forward for your reply.
After the official release of iOS 18.3, our app has collected numerous identical crash logs. These crashes occurred on different devices, but the common denominator is that they all, and only, happened on iOS 18.3. Based on the stack trace, the crash is happening internally within WebKit. The details are as follows:
Crashed: com.apple.main-thread
0 WebCore 0x721f9c + 28
1 WebCore 0x15b6924 + 11356
2 WebCore 0x15b174c + 1008
3 WebCore 0x1776e4 + 292
4 WebCore 0x17753c WebCore::SerializedScriptValue::deserialize(OpaqueJSContext const*, OpaqueJSValue const**) + 100
5 WebKit 0x530b28 + 92
6 WebKit 0x5a0d2c + 176
7 WebKit 0x9e74b0 + 956
8 WebKit 0xe43d58 + 392
9 WebKit 0x886ac + 272
10 WebKit 0x88940 + 44
11 WebKit 0x87a74 + 252
12 WebKit 0x875ec + 576
13 JavaScriptCore 0x2f8a48 ***::RunLoop::performWork() + 204
14 JavaScriptCore 0x2f895c ***::RunLoop::performWork(void*) + 36
15 CoreFoundation 0x73f4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
16 CoreFoundation 0x73ee0 __CFRunLoopDoSource0 + 176
17 CoreFoundation 0x76b40 __CFRunLoopDoSources0 + 244
18 CoreFoundation 0x75d3c __CFRunLoopRun + 840
19 CoreFoundation 0xc8284 CFRunLoopRunSpecific + 588
20 GraphicsServices 0x14c0 GSEventRunModal + 164
21 UIKitCore 0x3ee674 -[UIApplication _run] + 816
22 UIKitCore 0x14e88 UIApplicationMain + 340
23 18Birdies 0x1b2d3c main + 14 (main.m:14)
24 ??? 0x1ac161de8 (Missing)
I have a local HTML file used to display mixed content with images and text. Here's the issue: the same file displays everything correctly in Google Chrome, showing both images and text as expected. However, when opened in Safari, only the text is shown—images are missing, which is very strange.
Interestingly, if I remove .png from the title attribute of the tag, the images show up properly in Safari. Alternatively, if I comment out the inclusion of html2canvas.min.js, the images also display correctly (although the layout breaks without it).
I'm not sure if this is a Safari-specific issue. Can anyone explain what might be causing this problem?
Topic:
Safari & Web
SubTopic:
General
Sometimes the Safari App Extension i'm developing does not show up in my Safari Extensions unless i change mu bundle identifier to some unique name.
Even if I delete all other apps i've built with the same (and different) bundle ID, the extension is still does not show up.
The only solution for me is to always change the bundle ID.
For example:
Now it is "kopyl.tab-finder-10"
If i change it to "kopyl.tab-finder-11", the extension does show up in the Safari extensions settings page again.
Is there any other way to fix it?
Hello,
I’m encountering a problem with WebSocket connections in Safari on iOS 18.1 and later when initiated from an iframe. The same implementation works perfectly in other browsers like Chrome but fails in Safari.
In Safari, the WebSocket connection fails with error message
"WebSocket connection to 'wss://MY_CONNECTION_URL' failed: The internet connection appears to be offline."
Has anyone else faced this? Is this a known limitation or bug in Safari? Any workarounds or solutions would be greatly appreciated.
Thank you!
Hello! I've made a Safari extension that supports command "ReTab", and a couple of month ago, adding a customized macOS shortcut for Safari with menu title "ReTab" did trigger the extension. However, it's not working anymore and I'm not sure if it's from macOS/Safari update or because I changed manifest from v2 to v3 - could you help check if there's anything wrong with either the manifest.json or background.js? (the default Cmd+E still works)
Thank you in advance!
Xun
manifest.json:
{
"manifest_version": 3,
"default_locale": "en",
"name": "ReTab",
"description": "Go to the last active tab with Cmd+E!",
"version": "1.4",
"homepage_url": "https://LycheeIsle.com",
"background": {
"service_worker": "background.js"
},
"action": {
"default_icon": "images/toolbar-icon.svg"
},
"permissions": [ "commands", "tabs", "storage" ],
"commands": {
"ReTab": {
"suggested_key": {
"default": "Command+E"
},
"description": "Go to the last active tab"
}
},
"options_page": "options.html"
}
in background.js, I have this line which should listen to the command, and Cmd+E works but any customized shortcut for "ReTab" in Safari doesn't:
browser.commands.onCommand.addListener(async (command) => {
if (command === "ReTab" || command === "retab") {
await retab()
}
});
Safari throw a ViewTransition error, called ' Unhandled Promise Rejection: AbortError: Old view transition aborted by new view transition.' however, i don't find how to catch it.
i used 'try..catch' or Promise.catch, or catch it in finished/ready/updateCallbackDone Promise. These all don't work.
I'm referring to the following:
https://developer.apple.com/documentation/automaticassessmentconfiguration
I can't find this information anywhere. I'm wondering if I can enable and disable this function in Safari or other browsers on my website.
Topic:
Safari & Web
SubTopic:
General
I have an endpoint that generates a .ics file. From my mobile app, I open the browser (Safari) and retrieve the .ics file. In Safari, the events are displayed as expected, and I can use the "Add All" button to add them to the calendar. After clicking "Add All," I can select the desired calendar, and the events are successfully added (see screenshots 1 and 2 below).
Here’s the initial .ics file response:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:NAME
BEGIN:VEVENT
DTSTAMP:20250101T195917Z
DTSTART:20250102T131600
DTEND:20250102T142500
SUMMARY:My Event 1
UID:unique-uid1
LAST-MODIFIED:20250101T155715Z
DESCRIPTION:Description
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20250101T195917Z
DTSTART:20250103T131600
DTEND:20250103T135600
SUMMARY:My Event 2
UID:unique-uid2
LAST-MODIFIED:20250101T155715Z
DESCRIPTION:Description
SEQUENCE:1
END:VEVENT
END:VCALENDAR
Later, I updated the .ics file with new event details:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:NAME
BEGIN:VEVENT
DTSTAMP:20250102T195917Z
DTSTART:20250104T131600
DTEND:20250104T142500
SUMMARY:My Event 1 Update
UID:unique-uid1
LAST-MODIFIED:20250104T155715Z
DESCRIPTION:Description
SEQUENCE:2
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20250102T195917Z
DTSTART:20250105T131600
DTEND:20250105T142500
SUMMARY:My Event 2 Update
UID:unique-uid2
LAST-MODIFIED:20250102T155715Z
DESCRIPTION:Description
SEQUENCE:2
END:VEVENT
END:VCALENDAR
I updated everything according to the iCalendar documentation:
UID remained unchanged
SEQUENCE has been updated
DTSTAMP has been updated
LAST-MODIFIED has been updated
However it seems like that Safari can't handle updates on events.
In the preview we can see the changes, but when I click on "Add All" button, nothing happens.
The same behavior is working with other calendars like Outlook (web view) or Google Calendar.
My Questions:
Is there a property missing from my .ics file that is necessary for iOS Safari to handle updates?
Is Safari not designed to handle event updates in this way?
Should I consider moving to a subscription-based solution to manage updates more reliably?
Any insights or suggestions would be greatly appreciated!
I'm running apache with following configuration.
/cc require TLS client certificate
/ not require TLS client certificate
Starting with ios 18.4, accessing /cc after / fails with following error:
AH02261: Re-negotiation handshake failed, referer: https://www.example.com/...
SSL Library Error: error:1417C0C7:SSL routines:tls_process_client_certificate:peer did not return a certificate -- No CAs known to server for verification?
It seems like ios 18.4 does not support TLS re-negotiation.
(It worked with ios 18.3 and before)
Is this an expected behavior or a bug?
Topic:
Safari & Web
SubTopic:
General
I am using GTM in my project, and the OneTrust cookie consent script is loading in GTM. After ruling out iOS 18.3.1, I am unable to click on the OneTrust preference center since the GTM script is not loading.
This issue i faced for safari browser
Topic:
Safari & Web
SubTopic:
General