YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

Licensing: Online checks fail when a broken IPv6 default route is present, causes long startup times, unable to log in #7152

Closed Dobby233Liu closed 1 month ago

Dobby233Liu commented 1 month ago

Description

Personally I connect to the proxy service all day. However this causes a small inconvenience: when I start the GM IDE, some kind of online check appears to timeout and fail, and some account features will not be available. It's not an urgency as the IDE is still mostly usable, but waiting a long time for the IDE to start is not pleasing.

With a web browser I am able to reach the URLs the IDE tries to access as written in ui.log. Setting up the client to not proxy api.gamemaker.io and gms.yoyogames.com lets me use account features (at least IIRC), but it doesn't eliminate the issue. The issue disappears entirely when I turn off the proxy.

The Contact Us package.

Expected Change

No response

Steps To Reproduce

I'm in Mainland China, which may or may not be relevant.

  1. With Cloudflare's official client, connect to the proxy in "1.1.1.1 + WARP mode"
  2. Start the GM IDE
  3. Watch as the steps "Checking Network" "User Processing" take forever and eventually fail silently
  4. Click the blue account icon on the up-right side of the screen (if you have logged in) and click "GameMaker Account", then be told that you're offline

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.6.2 (Monthly)

Which operating system(s) are you seeing the problem on?

Windows 11

Are you running GameMaker from inside your Steam library?

No

Contact Us Package Attached?

Sample Project Added?

YYDan commented 1 month ago

Could you try the current 2024.800 Beta and let us know if that's still the same for you, please?

There are already changes released to make that start up pause much shorter and also to check less frequently when starting second/third GameMaker windows, etc., so in terms of "GameMaker takes too long to start when I am connected to my proxy server" you may find this is already much better. Hopefully...

Dobby233Liu commented 1 month ago

Could you try the current 2024.800 Beta and let us know if that's still the same for you, please?

Still happens in Beta 2024.800.0.602 unfortunately. It fails to access the runtime RSS feed as well and kicks me out. (Failing to access RSS feeds probably happens in Monthly as well, I just never paid attention.) image

warpbug-800_602-uilog.zip

YYDan commented 1 month ago

Thanks for the speedy update!

Yup, can see (as you say) that GM is not able to reach any sites it uses to check online access or our own servers:

[17:33:57:309(b870)] InternalCheckForInternetConnection :: Unable to reach site https://api.gamemaker.io/api/health-check 
[17:33:57:309(b870)] System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at YoYoStudio.Core.Utils.HttpUtil.<>c__DisplayClass52_0.<InternalCheckForInternetConnection>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
--- End of stack trace from previous location ---
Dobby233Liu commented 1 month ago

Just found out something:

With WARP on, when I ping api.gamemaker.io in cmd, it gets an ipv6 address and tries to ping that; however, it times out because my router is ipv4-only. The pinging is successful when I disable the proxy or force ipv4 with the -4 switch. However, curl and MS Edge can access https://api.gamemaker.io/health-check completely fine, so that's pretty weird.

So maybe WARP somehow fooled the system into thinking ipv6 can be done over my ethernet, so while "the smart programs" can tell that's not the case, ping and GM IDE proceed to connect in ipv6 mode like fools. I think it's probably a CloudFlare bug, but GM should deal with it anyway.

I'm not certain though so I'm not changing the title for now. Maybe this could happen even if ipv6 is available.

yoyo-danielc commented 1 month ago

This appears to be the result of having a broken IPv6 route on the system.

If I drop all traffic to the IPv6 addresses of api.gamemaker.io at my boundary router, the IDE pauses as described during startup and logs errors from InternalCheckForInternetConnection, additionally, I can't sign in to the IDE after launching in that state (it doesn't even try connecting to the account server if the internet check at startup failed, AFAICT).

We should probably implement the "Happy Eyeballs" algorithm in the IDE to handle this case, there has been an ongoing issue about adding it to the .NET runtime since 2018: https://github.com/dotnet/runtime/issues/26177

Dobby233Liu commented 1 month ago

I'm not certain though so I'm not changing the title for now.

To reaffirm that that was causing the bug: I disabled IPv6 for the CloudflareWARP network adapter and the bug disappeared.

yoyo-danielc commented 1 month ago

Fixed in 2024.10 branch.