[Bug] Internal script error when Google Maps API is loaded from user cache
Maintainer thường phản hồi trong vòng 2 ngày
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Bắt đầu với phần triển khai stub importLibrary và thư mục ví dụ được đề cập trong báo cáo. Tái hiện trường hợp script được lưu trong bộ nhớ đệm bằng local override của Chrome sau khi script Google Maps đã tải xuống hết hạn, sau đó truy vết lỗi runtime và việc gỡ bỏ dependency. Được xem là hoàn tất khi đã hiểu lỗi chưa được bắt và xử lý được đường dẫn tải bị ảnh hưởng mà không làm hỏng việc khởi tạo bản đồ thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
This is an interesting error. We get about 400 instances daily with a high traffic site- considered pretty low frequency.
Error: Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError https://developers.google.com/maps/documentation/javascript/error-messages#not-loading-api-from-google-maps-error.
Commonalities:
- Browser-cached instance of the Google Maps API is loaded
- Error is thrown on a successful load, during runtime
- Common error is in:
https://maps.googleapis.com/maps-api-v3/api/js/61/14/main.js
TypeError: Cannot read properties of undefined (reading 'getRootNode')
^ Likely because the internal map element has suddenly been removed from the DOM by another script included by google.
Why it's an issue:
- Standard errors in requesting the google maps API are handled, this is uncaught due to
google.mapsdependencies suddenly being deleted from the global scope- as a result of the above error. After the script is loaded and dependencies are requested, and after the map has initialized in the DOM.
Area of current interest:
My current guess is that it's a race condition in the importLibrary stub implementation, that's an issue specifically when the core maps library is loaded immediately due to the cache and the cache is considered "outdated" by googles definition somewhere in their importLibrary (or similar) implementation.
Steps to Reproduce
This is difficult.
- Download a copy of:
https://maps.googleapis.com/maps/api/js?key={YOUR_KEY_HERE}&language=en®ion=GB&libraries=core%2Cmaps%2Cgeometry&solution_channel=GMP_visgl_rgmlibrary_v1_default&loading=async&callback=__googleMapsCallback__
(with your API key) - Wait. This version of the script will expire at some point, my best guess at the moment is > 24hrs, but not sure yet.
- Use a local override to override the content of the script on an
/exampledirectory or similar
Environment
- Library version:
^1.7.1 - Google maps version: weekly
- Browser and Version: Chrome, Safari, Edge - any and all versions
- OS: Linux, iOS, macOS, Android, Windows - any and all
Logs
Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError
https://developers.google.com/maps/documentation/javascript/error-messages#not-loading-api-from-google-maps-error
- Ngôn ngữ chính
- TypeScript
- Star
- 1.9k
- Fork
- 195
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của visgl/react-google-maps
-
bug needs more info
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
visgl/react-google-maps#1039 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
visgl/react-google-maps#918 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
visgl/react-google-maps#905 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
google maps issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
visgl/react-google-maps#889 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
visgl/react-google-maps#884 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của visgl/react-google-maps
Issue tương tự
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jessepollak/home#1455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
lingdojo/kana-dojo#31227 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
appandflow/stim#1838 ·
Maintainer thường phản hồi trong vòng 1 ngày