Notifications.scheduleNotificationAsync when called 2nd time resulted in undefined is not a function at getRandomBase64

Đang mở
#927 2 bình luận 1 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
32/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
android, javascript, react-native
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện trường hợp Android với hai lệnh gọi liên tiếp đến Notifications.scheduleNotificationAsync được nêu trong issue, sau đó lần theo lỗi undefined getRandomBase64. Công việc được xem là hoàn tất khi thông báo thứ hai được lên lịch thành công và trả về kết quả request hợp lệ; issue không nêu tệp hoặc test nào cần nhắm đến.

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

Mô tả

Describe the bug
Notifications.scheduleNotificationAsync when called 2nd time resulted in undefined is not a function at getRandomBase64

To Reproduce
Steps to reproduce the behavior:
const notificationContent1 = {
title: 'Notification 1',
body: 'This is notification 1.',
identifier: 'notification_1',
};

const notificationReq1 = await Notifications.scheduleNotificationAsync({
  content: notificationContent1,
  trigger: {
    seconds: 30,
  },
});
console.log(
  "notificationReq1:",
  notificationReq1
);
const notificationContent2 = {
  title: 'Notification 2',
  body: 'This is notification 2.',
  identifier: 'notification_2',
};

const notificationReq2 = await Notifications.scheduleNotificationAsync({
  content: notificationContent2,
  trigger: {
    seconds: 60,
  },
});
console.log(
  "notificationReq2:",
  notificationReq2
);

Expected behavior
A news Notification has to be set.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Android

Smartphone (please complete the following information):
Android

Additional context
Add any other context about the problem here.

Ngôn ngữ chính
JavaScript
Star
13.2k
Fork
1.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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 expo/create-react-native-app

Tất cả issue của expo/create-react-native-app

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.