You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My friend, a OneSignal infrastructure eng, was kind enough to refer me for a product engineering role this past week. I spent the evening working on a conversation piece demo I hope to have ready if and when. (Yes, I'm shameless. :))
At one point, I had made an easily-overlooked TS misconfiguration that broke my integration. While fixing, I ran into "Debugging not receiving chrome notifications" in your "Web Push Troubleshooting" doc.
Following step 4 of this section, I opened chrome://serviceworker-internals, clicking "Inspect" on my app's service worker. In the resulting popout devtools console, when I started to enterOneSignal.log.setLevel('trace'), I saw:
Curious, I cloned the repo and went digging. Looks like a parallel logging implementation solely for ServiceWorker was introduced by 2550ae5.
After familiarizing myself with SDK internals, I tried this in my app's console and it worked:
Here's the code origin of one of the log messages in Scenario 2 which must originate from the service worker:
I wanted to PR a fix for this, but I wasn't too happy with what I came up with. It takes a lot of time to learn a mature, feature-rich product, so I took went for two birds, one stone ... took it apart and reassembled it, as a code sample. It's yours if you like it. I'll submit it through hiring channels (email) later today.
In an case, I hope this documents the issue, for now. Appreciate it!
What's on your mind?
My friend, a OneSignal infrastructure eng, was kind enough to refer me for a product engineering role this past week. I spent the evening working on a conversation piece demo I hope to have ready if and when. (Yes, I'm shameless. :))
At one point, I had made an easily-overlooked TS misconfiguration that broke my integration. While fixing, I ran into "Debugging not receiving chrome notifications" in your "Web Push Troubleshooting" doc.
Following step 4 of this section, I opened
chrome://serviceworker-internals
, clicking "Inspect" on my app's service worker. In the resulting popout devtools console, when I started to enterOneSignal.log.setLevel('trace')
, I saw:Curious, I cloned the repo and went digging. Looks like a parallel logging implementation solely for
ServiceWorker
was introduced by 2550ae5.After familiarizing myself with SDK internals, I tried this in my app's console and it worked:
OneSignal.context.workerMessenger.directPostMessageToSW('os.set_sw_logging', { shouldLog: true })
That section remains useful, imho: great exposure to Chrome's service worker tooling. Thanks for writing it.
The text was updated successfully, but these errors were encountered: