API access, network/ forge connection, or module problem?

image_2022-02-18_004656

Hi All,

I keep getting similar error messages as shown in the attached on opera gx console log (appear in the console when i get get an error (second image) “access The Forge API” red message on the foundry page.
Could you help “translate” if that could be a foundry- or module-, or connection-related problem?
(what’s CORS policy?)
Thanks!

1 Like

…any advice please?
i get the same error message regarding accessing The Forge API even when i log in using different PCs/laptop, and even when i access the forge through different internet connections outside my home connection.
When this happens, i lose connection to the forge and page crashes and then i need to reload, which takes ages, and sometimes i need to reload more than 2 times before the same error appears again. Next session is on Sunday but i think i should postpone until this problem is resolved.

i see in other forum posts that users have similar issues, but it would really help if i knew what is causing this problem: it cannot be an internet connection problem (i even tried access the forge through VPN, in case this was an antivirus/firewall hickup, but no luck)

Hi @ardeniosilvenes and thanks for that screenshot, that has been extremely helpful in figuring out what your issue was as your previous comments in the other topic left me confused.

As far as I can tell, the error is that the servers are not responding, and I’ve seen someone else report a similar issue trying to access the Forge from Manchester while everyone else had no trouble accessing it at all. As far as I’m able to guess, there might have been some routing issue between that region and the servers in Frankfurt. I don’t know where you’re located, but if you’re within a relatively close distance, it might explain it. The issue for the other user started on February 17th, and it was the first time they’ve had that problem (they’ve been with us for over a year and are regular players)

The other user said that their issues were fixed by using a VPN to the US (a VPN to the UK gave them the same problem).
So far, you’d be the second person with the problem and I can’t say I know how to fix it other than hoping whatever routing issues are happening are going to get fixed soon by whoever manages the network in the Manchester area.

I hope this helps and please let us know if the situation changes.
Thank you for your understanding!

1 Like

yes, it happens to me!

i keep getting a Forge API errors almost every 10-15 mins

Are you actually logged in into your Forge account or do you perhaps have something that periodically clears cookies from your browser?

1 Like

no, i use opera gx - only for the forge - and i do not clear cookies.
yes, i’m logged in.
the red message notification comes up frequently.

Moved your other posts to this thread. I hope the answer above helps you!

Thanks kakaroto!
I’m in Dublin. that might give some explanation as geographically I’m close to Manchester, although I’m not sure how the routing happens.
I used VPN, and didn’t see any solution but I left the VPN choose an automatic location for me - perhaps I should manually set it up to route through the US. I downloaded the Pings module to check latency; it gives me results above 1000ms and some time more than 3000ms! That’s deep in the red zone…
I’ll try VPN routed outside EU and fingers crossed!

That’s pretty bad ping indeed, I assume it will depend heavily on the VPN’s own performance in that case.
I’d recommend maybe you try to change your server region to the North American region, as that would be an alternative to using a VPN (especially if it affects your players too).

interesting suggestion… how can I do that?

“Server Region” in My Account - User Profile settings

2 Likes

@kakaroto
So, I changed the server region to US, as suggested, but i still was getting the same error messages regarding accessing the Forge API, plus players located in Greece could not access the game at all…
I changed back to EU…
The log entry on the browser console is:
Access to XMLHttpRequest at ‘https://eu.forge-vtt.com/api/assets/browse’ from origin ‘https://xxxxxxxxxx.eu.forge-vtt.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Could I ask you to please have a second good look at this problem? Please…
What is the CORS policy that blocks access?
image_2022-02-21_121057
image_2022-02-21_121204
with these latency numbers performance there is no way to play online with 5 players…

…at this stage I’m getting desperate and I don’t get any help here it seems…
It is very disappointing

Hey @ardeniosilvenes
I don’t know what to tell you, but at this point, it looks like the issue might be more from your side than from ours. I did dig deep into trying to debug your situation a few days ago (sorry for not responding earlier, but I’ve had a very busy few days) and didn’t see anything out of the ordinary. I’ve also tried browsing through your assets library via an API key I generated and I couldn’t reproduce any of the time out errors. I did find however that you have a very large number of compendiums in your Data folder. I don’t know if you actually have those modules enabled or not, but I would recommend you disable them until you actually need them, because Foundry is known to have a big drop in performance when there’s a lot of content loaded in it, whether they are in compendiums or in the world. That likely is what affected your game’s performance where the latency increases/decreases continuously. Only enable the compendium modules when you need to use them. Your 180MB shared compendium is going to be especially problematic.

The “CORS” issue is just because of the Cloudflare error page that says the request timed out. I’m still unsure why it would timeout, but the other user from Manchester told us today again that if they don’t use a VPN, they still have the slowness and issues but it works flawlessly with the VPN, so that indicates that whathever issue is happening with the ISP is still ongoing unfortunately.

There shouldn’t be those assets browse API errors every 10 minutes though, that seems to indicate that some module you are using is continously browsing your assets library, and that could explain a few of the issues you’re seeing. I’d recommend you try to launch Foundry in Safe Configuration and see if you’re still encountering that issue. Otherwise I’d recommend for now you keep using the VPN and maybe use a German location (where the servers are located) for the VPN.
It’s unfortunate, but there’s really not much we can do here, we run thousands of games per day, and we have only heard of two people (you included) with the issues you’re describing, and they both started on the same date, and in the same geographic region (Dublin and Manchester) so this is definitely pointing to an issue that is outside of our control.

I hope this helps.

1 Like

Hi @kakaroto,

Thanks for your message and for your efforts to assist.
Regarding large compendia: i use them as collection of actors/items/scenes that i draw content from when i start building a campaign and then i disable them, so this is not part of the problem - i don’t think i have done something to have caused this latency problem.
I had a technician from my ISP to come and check my connection too - there is no problem with my internet connection.
So, i believe the problem is either with the servers in Frankfurt or something to do with the geography.
The API errors do not occur every 10mins in frequency - they do not have a pattern, but they happen randomly and it is not because of a module i use.
Regarding VPN through Germany: tried it. Still getting error API messages
I did start the game in safe mode and still problem is there. Note that i have three games, not one, one of them is for PF and i get circa 6000ms latency while running each of the games.
I wonder if an action from the server company you work with could help: like check and maintain the Frankfurt servers?

…just to post an update on this big problem…
Screenshot 2022-02-27 140942
…screenshot is from our attempt to play on past Sunday… all struggled with the latency and in the end we could not enjoy and we postponed the session.
This in my and others’ opinion is clearly a server problem, not a module problem (I tried safe mode too)
I wonder how long would it take to contact the people responsible maintaining the Forge EU sever and what would it take to fix the server problem? Could I contact them directly? This is now a clear reason to consider if I should (with broken heart) stop using the forge, since I have invested a lot in it…

I am the Founder and CEO of the Forge and I’ve set up and I maintain all of the servers, so you’ve already got bumped to as high as it can get. If you can, I’d recommend you join our Discord for some live chat support which is generally much easier to help debug problems than asynchronous messaging on the forums.
I’m going to be unavailable in the next few days, so I’m also going to ping @destinygrey and @varstahl to help you with your issue in my absence.
I’ve joined your game today to see if I can find anything abnormal with it, and there is definitely an issue here, and it seems to be coming rom your game.
This is the latency when I join the game (that’s my normal ping to Europe, as I’m in Canada) :
image

I checked the server, nothing abnormal there, but I noticed that your Foundry looks extremely customized, and with 110 active modules, which is enormous. Loading the Foundry page does 1500 requests to the server because of that, and takes a long time to load because of everything that it needs to bring into the game. I even had chrome fail to load the page the first time, showing me a “Insufficient resources” error which I’ve never seen before (I have an RTX 3080 and 32GB of RAM on my PC).

I was convinced that there was nothing wrong, and it must be coming from your internet, since I can’t reproduce it.
As I went to respond to some emails, I come back to the tab 15 minutes later and I see this :
image

There was still no change from the server side, so this is a clear degradation of performance as time goes on, which is extremely likely to be due to chrome itself being bogged down, probably due to RAM usage spiking and getting out of hand or some module using 100% of CPU and freezing the tab. My tab was using over 1GB of RAM (it should be only about 100 to 200 MBs) and refreshing the page (without restarting the server or anything, just pressing F5 in the browser) immediately showed it back in the 180ms latency, proving that the degradation of performance is not server related but rather client related, possibly due to a module causing it to go bad.
I was able to get it to react that way again after leaving it on its own for a few minutes, and looking at the dev console, I even got Chrome to complain that the tab is frozen, which is again indicative of a problem with the client, not with the server. After leaving it alone (frozen) for 5 minutes, it unfroze and the latency dropped back to 180ms on its own.
I can also see that the ‘foudry-filepicker-favorites’ module is constantly hammering the server with requests to browse the assets library, continuously (as in, browsing folders multiple times per second, in an infinite loop, never stopping), and is likely what’s causing those errors you keep seeing at regular intervals. The entire page is so laggy due to all the modules doing random things all the time, that it’s no wonder it’s unresponsive the way that it is.

Again, I will recommend that you disable all modules, use safe configuration, only enable the modules that you need, and most definitely disable that foundry-filepicker-favorites modules because that is just an extremely badly behaving module from what I can see. See how your latency is when all the modules are disabled and if it stays acceptable long term.
I would very much doubt that you’d have the same issues if you’re running your game without all of these modules enabled.

I hope this helps.

@kakaroto You did a proper investigation, this time, and thanks for that.
It WAS that ugly filepicker improvements module indeed, which i never disabled while checking for the culprit myself, as I i thought that it is a simple module that couldn’t be causing problems. i was wrong.
If i new it would be checking the assets library constantly, consuming so much resources i would never have enable it.
So thanks for examining my problem.
I do not use 110 modules while running the game - you probable checked my game while i was testing some modules and had them left enabled, as well as some modules that are for preparation only that i disable when i finish working on the next session (compendia libraries, walls- and tokens- related, etc.)

I assure you that I investigated this thoroughly and more than once. I did test access to your assets library extensively last time, which was the issue you were reporting, and I did say it likely came from a module that continuously tried to access it.
I checked the world, your server resources, and said that I found nothing was out of the ordinary. When you reported the latency issues, I asked you to try safe configuration and you said you still had it with no modules enabled, so if the issue isn’t with the server, isn’t with your assets library or access to it and happens on vanilla Foundry (i.e: isn’t caused by a module, so unlikely to be a client side issue), the only probable cause is that it’s an issue with internet between you and the server. And the fact that it started happening at the same time as someone else reported similar issues from a region close to you, certainly didn’t help.

Either way, I’m glad you managed to confirm that the issue is resolved when you remove the problematic modules, and I hope it remains stable for you. Let us know if you encounter any further issues, though as I said, I won’t be available in the next few weeks, but other staff members will be able to help in the meantime.
Thanks and have fun!