'arrayForEach was called with a non array value. Google Calendar

I am trying to get events from my Calendar. I walked through all tutorials and searched through internet, but it seems like i am the only one who get the error. My calendar oppened for everyone. ClientId, Api key, DISCOVERY_DOCS and SCOPES are correct, because i purposly made them wrong to check. Also i tried to change calendarId from 'primary' to actual calendar id, which is my email address. Same story. I am signed in and approved, so it is not the problem for sure. There are events in my Calendar, so it should have an array anyway. Looks like it doesn't get the array on some part of code and it is not possible for me to debug it step by step. At this point i completely don't understand what is wrong.

So the code straight from this tutorial JavaScript Google Calendar, only CLIENT_ID and API_KEY changed, and there is no point inserting the same code here i guess.

enter image description here enter image description here enter image description here



Solution 1:[1]

I have the same problem when using visual studio with .net core. I found a problem with the file "browser-sync-client.js". I blocked the request to this file and it worked. So I change to use pure HTML,js without the visual studio.

Solution 2:[2]

I had the same issue since I upgraded to VisualStudio 2022, I don't know if it's usefull. I didn't understand how to fix it yet.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joker
Solution 2 Umberto Cristaldi