TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.

98 views
Skip to first unread message

Q2 Travellers

unread,
Jan 9, 2024, 12:41:54 AMJan 9
to Autofill Extension
Hi ,

I am using google places services Api and it was working in version 3.53 and it stopped working after that so I debugged and found that error is TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.

Code :-
 const containerRef = React.useRef();
 React.useEffect(() => {
 try

const autocompleteService = new google.maps.places.AutocompleteService();
const placesService = new google.maps.places.PlacesService( new google.maps.Map(containerRef.current) );
 }
catch (err) { } }, []);
The line new google.maps.Map(containerRef.current) is giving this error I have tried to assign the values to different variables like
const containerRef = React.useRef();
React.useEffect(() => {
try
const autocompleteService = new google.maps.places.AutocompleteService();
 const map = new google.maps.Map(containerRef.current);
const placesService = new google.maps.places.PlacesService( map ); } catch (err) { } }, []);
Please let me know if anybody can help?

Reply all
Reply to author
Forward
0 new messages