Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Push notifications not working

Đang mở
#22 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
full-stack, web-dev

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi trên Safari và Chrome, kiểm tra việc đăng ký service-worker, hành động Send Test Notification và các yêu cầu tới /api/v3/plugins/web-push/test. So sánh console của trình duyệt với log token CSRF không hợp lệ của máy chủ; được xem là hoàn tất khi việc bật thông báo được duy trì và thông báo kiểm thử cũng như thông báo chat được gửi tới các trình duyệt bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I can't get push notifications to work.

In Safari, nothing related to push notifications is working. If I toggle the "Enable push notifications on this device" switch, the "Currently notifying x device(s)" count doesn't increment, and when I refresh the page, the toggle is off again. If I click "Send Test Notification", regardless of whether "Enable push notifications on this device" is on or off, nothing happens (no "Cannot send test notification as push notifications are not enabled on this device" warning and no /api/v3/plugins/web-push/test request in the network tab of the dev tools). There's also no "ServiceWorker registration succeeded" message in the console, but there aren't any error messages either.

In Chrome, the service worker registers successfully, and I can enable push notifications, but I can't send/receive them. If I click on "Send Test Notification", I get an error message in the console: Failed to load resource: net::ERR_CONNECTION_CLOSED /api/v3/plugins/web-push/test:1. If I send myself a chat message from another account, I get an in-app notification, but no push notification and no error message.

I'm also seeing this error on the server:

2025-04-09T18:46:53.799Z [4567/124] - error: POST /api/v3/plugins/web-push/test
invalid csrf token

However, that error only appears once, and I've attempted to send several notifications, so I'm guessing it's not the root of the issue.

Ngôn ngữ chính
JavaScript
Star
2
Fork
7
Merge trung bình
13 giờ 31 phút
Pull request đã merge (30 ngày)
7

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NodeBB/nodebb-plugin-web-push

Tất cả issue của NodeBB/nodebb-plugin-web-push

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.