Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build for Android due to "WebException: The operation has timed out." #156

Open
SimonDarksideJ opened this issue Nov 11, 2024 · 4 comments
Labels
bug Something isn't working critical Issues of utmost importance enhancement New feature or request

Comments

@SimonDarksideJ
Copy link

SimonDarksideJ commented Nov 11, 2024

Summary

Opened up a project today and updated to:

  • VideoKit V: 0.0.22
  • Function V:0.0.30

Now I cannot build due to the following error (video Kit seems to be doing a web call during build?)

I've now tried this in two different projects with no success.

Suggested fix

Issue seems related to access issue, so this should be a warning and NOT an exception. Providing details on what to check to resolve.

Error detail

WebException: The operation has timed out.
System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) (at <9d7a0e870e2249c5902e15d806bd66a1>:0)
System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) (at <9d7a0e870e2249c5902e15d806bd66a1>:0)
System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) (at <6e0ff4b8016b42cc9117913bee5de47c>:0)
Rethrow as HttpRequestException: An error occurred while sending the request
System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) (at <6e0ff4b8016b42cc9117913bee5de47c>:0)
System.Net.Http.HttpClient.SendAsyncWorker (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) (at <6e0ff4b8016b42cc9117913bee5de47c>:0)
System.Net.Http.HttpClient.GetStreamAsync (System.String requestUri) (at <6e0ff4b8016b42cc9117913bee5de47c>:0)
Function.Editor.Build.AndroidBuildHandler+<>c__DisplayClass5_1.<UnityEditor.Android.IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject>b__1 () (at ./Library/PackageCache/ai.fxn.fxn3d/Editor/Build/AndroidBuildHandler.cs:77)
Rethrow as AggregateException: One or more errors occurred. (An error occurred while sending the request)
System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
System.Threading.Tasks.Task`1[TResult].get_Result () (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
Function.Editor.Build.AndroidBuildHandler.UnityEditor.Android.IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject (System.String projectPath) (at ./Library/PackageCache/ai.fxn.fxn3d/Editor/Build/AndroidBuildHandler.cs:77)
UnityEditor.Android.PostProcessor.Tasks.ProcessGenerateProjectCallbacks.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) (at <7786c836bd654c7abbcc4c0f1676bd06>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Additional Detail

On examining the network behaviour, the web call seems to be calling clerk.videokit.ai:443 with no response

@olokobayusuf
Copy link
Contributor

@SimonDarksideJ thanks for reporting this. You do need an internet connection when building because VideoKit has to download a resource to embed into the app binary.

@SimonDarksideJ
Copy link
Author

SimonDarksideJ commented Nov 11, 2024

As I am logging this issue from the same machine I am trying to do builds on, I do have an internet connection. The issue does not appear to be on my end. Especially as I had to download fiddler in order to trace the connection issues.

If the issue is internet related, surely there should be a more friendly and informative way of failing the build, with a more meaningful error.

@SimonDarksideJ
Copy link
Author

OK @olokobayusuf , I rebooted and it looks like I can connect to the end point again and build.

However, as stated above, the error message should be more meaningful and trapped, other than a script reference error.

@olokobayusuf
Copy link
Contributor

@SimonDarksideJ thanks for confirming that you got past it.

However, as stated above, the error message should be more meaningful and trapped, other than a script reference error.

I'll keep this issue open to do just that

@olokobayusuf olokobayusuf added bug Something isn't working critical Issues of utmost importance enhancement New feature or request labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical Issues of utmost importance enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants