inspectdev / inspect-issues

Issue tracker for Inspect
22 stars 2 forks source link

Observing Service Worker Behaviour iOS #189

Closed spencerdezartsmith closed 5 months ago

spencerdezartsmith commented 5 months ago

I am trying out this Inspect tool in the hopes that I can have more visibility over the service worker and caches on iOS (PWA). When using any Chromium browser, I am able to see my service worker in action when I load my app as seen in the screenshot.

Screenshot 2024-01-27 at 8 57 59 pm

When I use Safari Technology Preview with a plugged in iOS device I can see nothing really. In the network tab I can see what I believe to the be the SW precache installing but I can't see any caches so its hard to say what is happening.

In Inspect, I see the same inspect interface as Chrome/Brave but I don't see any Service Worker activity:

Screenshot 2024-01-27 at 9 45 20 pm Screenshot 2024-01-27 at 9 44 29 pm

Is it something wrong on my end? Should I be able to see this using iOS device?

Thanks in advance!

auchenberg commented 5 months ago

@spencerdezartsmith Thanks for posting this issue!

Webkit and Inspect does not support "control" over the Service Worker like you are used to in Chrome, due to limited APIs by Apple, but you if you choose the Service Worker target like on your second screenshot, you can use inspect to debug the service worker javascript by going to the Scripts tab in Inspect and see the loaded files.