Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in NotificationsList Component on Service Worker Subscription Fetch #8006

Closed
bodhish opened this issue Jun 9, 2024 · 5 comments · Fixed by #8935
Closed

TypeError in NotificationsList Component on Service Worker Subscription Fetch #8006

bodhish opened this issue Jun 9, 2024 · 5 comments · Fixed by #8935

Comments

@bodhish
Copy link
Member

bodhish commented Jun 9, 2024

Summary

A TypeError occurred within the NotificationsList component of our application, specifically during the execution of the initialSubscriptionState function. This error impacts users on the Chrome Mobile iOS browser, as seen in a recent log from our production environment.

Description

When the function initialSubscriptionState tries to fetch the subscription status from the service worker, it fails because the subscription object returned by pushManager.getSubscription() is unexpectedly undefined. This indicates that the service worker might not be properly initialized or the pushManager is not available in the current browser context at the time of invocation.

Steps to Reproduce

  • Open the application using any device.
  • Navigate to the Notifications area of the application.
  • The error occurs during the loading process of this component.

Expected Behavior

The application should safely check for the availability of the service worker and gracefully handle cases where the push manager's subscription object is undefined.

Actual Behavior

The application encounters a TypeError and may impact the user experience by halting subsequent JavaScript execution, potentially leading to a partially rendered or non-responsive page.

Copy link

github-actions bot commented Jul 3, 2024

Hi, @coronasafe/care-frontend-maintainers, This issue has been automatically marked as stale because it has not had any recent activity.

@github-actions github-actions bot added the stale label Jul 3, 2024
@Yadavanurag13
Copy link

@khavinshankar

Hey, I would like to fix this issue. Please assign it to me.

@gigincg
Copy link
Member

gigincg commented Aug 12, 2024

@Yadavanurag13 The issue had been assigned to you, not sure if you missed the assignment.

@Yadavanurag13
Copy link

@gigincg Sorry, I forgot to mention this in our previous chat. I removed my assignment 3 weeks earlier.

@vishwansh01
Copy link
Contributor

vishwansh01 commented Oct 1, 2024

Hey ! @bodhish
I just created a pull request related to the issue : #8686

@github-project-automation github-project-automation bot moved this from In Progress to Done in Care Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
6 participants