Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug] AdvancedMarker fires "TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node' when "draggable" is true

オープン
#867 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
react, typescript
領域
frontend

調査の方向性

AdvancedMarker のエントリポイントから開始し、React 18.3.1、@vis.gl/react-google-maps 1.7.1、draggable を有効にした状態、および SVG 画像の子要素を使って、報告された appendChild エラーを再現します。draggable を削除した場合の動作と比較します。クラッシュを発生させずに原因を特定して修正し、再現可能なテストケースで動作を確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

My stack:

  • React 18.3.1
  • @vis.gl/react-google-maps 1.7.1
  • vite 6.0.7

The code:

        <AdvancedMarker
          position={markerCoordinates}
          // draggable
          // onDragEnd={getGeocodeData}
          collisionBehavior={CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL}
          anchorTop="-90%"
        >
          <img src={mapPinIcon} alt="pin" />
        </AdvancedMarker>

The error:
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'

This error is getting caused by using the draggable prop on the AdvancedMarker. Removing the prop doesnt cause the crash.

mapPinIcon is a .svg image.

I've tried making a workaround to this by ensuring that AdvancedMarker was getting a Node child, by creating a container with document.createElement and appending an image with appendChild, but it still gives that error.

Image
Steps to Reproduce

In a closed environment it works... So providing a CodeSandbox seems worthless. If you need any kind of additional information I'll provide it ASAP as I'll be looking at this issue constantly

Environment
  • Library version: 1.7.1 (tried also 1.5.1 and 1.5.2)
  • Google maps version: weekly
  • Browser and Version: Chrome 142.0.7444.60
  • OS: MacOS Tahoe 26.0.1
主要言語
TypeScript
スター
1.9k
フォーク
195
平均マージ
2日 11時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

visgl/react-google-maps のほかの issue

visgl/react-google-maps の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。