WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
252685
no logs for PWA
https://bugs.webkit.org/show_bug.cgi?id=252685
Summary
no logs for PWA
Danny Moerkerke
Reported
2023-02-21 12:59:38 PST
On iOS 16.4 beta 1, when remote debugging a PWA on an iPhone 13 Pro Max, no console.log statements are shown when they come from the Service Worker.
Attachments
Screenshot of an inspectable service worker from a HSWA in Safari's Develop menu
(213.73 KB, image/png)
2025-05-07 05:17 PDT
,
Razvan Caliman
no flags
Details
Service worker not showing for web app added to the Home Screen
(158.17 KB, image/png)
2025-05-07 11:54 PDT
,
Danny Moerkerke
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Patrick Angle
Comment 1
2023-02-21 13:03:41 PST
Hello! Can you please provide us with the version of Safari you are using to inspect the iOS 16.4 beta 1 device? If you aren't already I'd recommend running Safari Technology Preview or Safari on macOS 13.3 to inspect iOS 16.4. Thanks!
M
Comment 2
2023-02-22 08:14:51 PST
I am experiencing a related issue logging/debugging with a Cordova app. I did a fresh re-install via Xcode-Beta (14.3) onto an iPhone 13 running 16.4 Beta 1. The app no longer shows up in my Development tab under the device in Safari Technology Preview 16.4. If I open Safari on the iOS device, any websites I have on-screen appear for debugging in STP but development apps do not. This is a new regression as it works fine in previous Safari/iOS versions.
Patrick Angle
Comment 3
2023-02-22 09:07:03 PST
(In reply to M from
comment #2
)
> I am experiencing a related issue logging/debugging with a Cordova app. I > did a fresh re-install via Xcode-Beta (14.3) onto an iPhone 13 running 16.4 > Beta 1. The app no longer shows up in my Development tab under the device in > Safari Technology Preview 16.4. > > If I open Safari on the iOS device, any websites I have on-screen appear for > debugging in STP but development apps do not. This is a new regression as it > works fine in previous Safari/iOS versions.
Apps building against iOS 16.4 or later should explicitly enable inspection of content they wish to inspect by setting `inspectable` to `YES` on their JSContext or WKWebView (
https://developer.apple.com/documentation/webkit/wkwebview/4111163-inspectable/
). This replaces the previous behavior where content was always inspectable in debug-entitled builds, and never inspectable in release builds by allow you to control when content is inspectable. For further issues regarding apps and the use of `inspectable`, please file separate feedback instead of commenting on existing feedback for an unrelated issue, that way we can correctly track all feedback and make sure we don't miss anything. Thanks!
Radar WebKit Bug Importer
Comment 4
2023-02-28 13:00:19 PST
<
rdar://problem/106046990
>
Danny Moerkerke
Comment 5
2023-02-28 13:49:47 PST
(In reply to Patrick Angle from
comment #1
)
> Hello! Can you please provide us with the version of Safari you are using to > inspect the iOS 16.4 beta 1 device? If you aren't already I'd recommend > running Safari Technology Preview or Safari on macOS 13.3 to inspect iOS > 16.4. Thanks!
I'm using Safari 16.2. On Safari Tech Preview 164 the console logs from the Service Worker aren't shown either.
Patrick Angle
Comment 6
2023-02-28 13:57:22 PST
(In reply to Danny Moerkerke from
comment #5
)
> (In reply to Patrick Angle from
comment #1
) > > Hello! Can you please provide us with the version of Safari you are using to > > inspect the iOS 16.4 beta 1 device? If you aren't already I'd recommend > > running Safari Technology Preview or Safari on macOS 13.3 to inspect iOS > > 16.4. Thanks! > > I'm using Safari 16.2. On Safari Tech Preview 164 the console logs from the > Service Worker aren't shown either.
Thank you for checking on STP! One other thing to check is that you are inspecting the service worker itself, and not the webpage. Service workers, since they can be shared between pages, are separate debuggable entities that appear as separate items in Safari Technology Preview's (and Safari's) Develop menu. The service work, when running, will appear in the Develop > [Your Device] menu under a header of "Service Workers"
Danny Moerkerke
Comment 7
2024-04-30 09:37:38 PDT
In Safari 17.4.1, no service workers are shown in the Develop menu for Home Screen web apps when remote debugging, only for web apps running in Safari itself.
Danny Moerkerke
Comment 8
2024-09-17 02:22:00 PDT
From the Safari 18 release notes: "Fixed Service Workers not appearing in the Develop menu or remote Web Inspector menu. (130712941)" I still don't see any Service Workers for Home Screen web apps or web apps running in Safari 18 in the Develop menu when remote debugging an iPhone running iOS 18. Console logs from the Service Worker aren't shown either.
Danny Moerkerke
Comment 9
2025-03-01 03:08:40 PST
Are there any plans to fix remote inspection of service workers for web apps installed on the Home Screen? When I connect my iPhone to my Mac I still can't inspect service workers for web apps installed on the Home Screen.
Danny Moerkerke
Comment 10
2025-03-01 03:09:05 PST
Are there any plans to fix remote inspection of service workers for web apps installed on the Home Screen? When I connect my iPhone to my Mac I still can't inspect service workers for web apps installed on the Home Screen.
Danny Moerkerke
Comment 11
2025-05-06 11:42:12 PDT
It's been more than two years and the service worker is still not inspectable for PWAs (Home Screen Web Apps). There is also no activity in this issue anymore and it seems comments are ignored. Is this willingful sabotage of PWAs or are there other reasons for this?
Razvan Caliman
Comment 12
2025-05-07 05:15:50 PDT
I tried with
https://squoosh.app
added to the Home Screen on iOS 18.4.1 I used Safari on macOS 15.4 to successfully inspect the service worker via Develop menu > [iOS device] > squoosh.app (from the Service Workers group). Can you confirm if this works for you? Can you please share an example of a page with a service worker where this does not work? The service worker may be terminated when idle. In that case, it will not show up in the Develop menu anymore. Or it can be lazily instantiated. Can you please force-close the Home Screen Web App and reopen it or do any action that you know for certain will involve the service worker so it's woken up? (Also, please ensure there isn't a JS exception in the service worker code that would cause it to fail when run; it won't show up as inspectable).
> Console logs from the Service Worker aren't shown either.
Logs from service workers are not shown in the Web Inspector session attached to the web page. They only show up in the session attached to the service worker.
Razvan Caliman
Comment 13
2025-05-07 05:17:56 PDT
Created
attachment 475155
[details]
Screenshot of an inspectable service worker from a HSWA in Safari's Develop menu
Danny Moerkerke
Comment 14
2025-05-07 08:58:01 PDT
(In reply to Razvan Caliman from
comment #13
)
> Created
attachment 475155
[details]
> Screenshot of an inspectable service worker from a HSWA in Safari's Develop > menu
I tried this over and over but the service worker doesn't show up. Safari 18.4 (20621.1.15.11.10), iOS 18.4.1.
Danny Moerkerke
Comment 15
2025-05-07 11:54:51 PDT
Created
attachment 475158
[details]
Service worker not showing for web app added to the Home Screen This is the screenshot of the Develop menu with my iPhone connected, running the Home Screen web app Squoosh.
Razvan Caliman
Comment 16
2025-05-12 11:00:14 PDT
Can you help by taking two sysdiagnoses? One from the iOS device and one from the Mac to which the device is connected to. It will be most helpful if you do it like this: - connect the iOS device to the Mac - open Safari > Develop menu - on your iOS device, open the Home Screen Web App - after you can see it in the Develop menu, but not its service worker, take the sysdiagnoses on both devices (avoid opening other web pages or Home Screen Web Apps until the iOS sysdiagnose is complete to reduce noise in the logs) Do not attach the sysdiagnoses to this issue on Bugzilla. They contain sensitive information. Use Feedback Assistant instead:
https://developer.apple.com/bug-reporting/#feedback-assistant
To capture sysdiagnoses, it's easiest if you start from the Feedback Assistant app on your Mac: - File > New Feedback and select iOS & iPadOS. - With your device connected to the Mac, select it from the list that shows up. This will start taking a sysdiagnose from it. - While that is happening, click "Add Attachment" > Device Diagnostics > and select your Mac to capture a sysdiagnose from it too. Details for the Feedback Assistant entry: - area: Safari - feedback type: Incorrect/Unexpected Behavior - involves: Web Apps - URL: the URL/name of the inspected HSWA Please submit the entry and paste the Feedback Assistant ID here so we can find it quickly and take a look at the logs in the sysdiagnoses.
Danny Moerkerke
Comment 17
2025-11-02 03:45:41 PST
The Feedback Assistent ID is FB20897010. The service worker is now visible in the Develop menu for Home Screen web apps on a remotely connected iOS device but I still notice that any console logs inside the handler for the "push" event are not shown and that breakpoints inside this handler don't work either. When I put a breakpoint inside the "fetch" event handler, it works.
Razvan Caliman
Comment 18
2025-11-11 08:47:10 PST
Thank you for the sysdiagnoses in FB20897010! At first I thought there were silent pushes that revoked the push subscription (
https://developer.apple.com/videos/play/wwdc2022/10098/?time=847
). But that's not the case here. I can confirm that breakpoints don't stop in "push" event handlers. Thank you for the steps to reproduce! The regression seems to have happened between iOS 18.6 and iOS 26. Looking into this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug