Skip to content

Conversation

@Jack251970
Copy link
Member

Handle SendAsync issue so that we will not get error message like those:


Please open new issue in https://github.com/Flow-Launcher/Flow.Launcher/issues
1. Upload log file: C:\Users\11602\AppData\Roaming\FlowLauncher\Logs\1.0.0\2025-06-01.txt
2. Copy below exception message

Flow Launcher version: 1.0.0
OS Version: 26100.4202
IntPtr Length: 8
x64: True

Python Path: C:\Users\11602\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: C:\Program Files\nodejs\node.exe

Date: 06/01/2025 19:25:33
Exception:
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such host is known. (gcore.jsdelivr.net:443))
 ---> System.Net.Http.HttpRequestException: No such host is known. (gcore.jsdelivr.net:443)
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at void System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at async bool System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e)+WaitForConnectWithCancellation(?)
   at async ValueTask<Stream> System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(string host, int port, HttpRequestMessage initialRequest, bool async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Flow.Launcher.Infrastructure.Http.Http.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken token) in D:\Source\Repos\Flow.Launcher\Flow.Launcher.Infrastructure\Http\Http.cs:line 215
   at Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in D:\Source\Repos\Flow.Launcher\Flow.Launcher.Core\ExternalPlugins\CommunityPluginSource.cs:line 52
   at Flow.Launcher.Infrastructure.Logger.Log.Exception(String className, String message, Exception exception, String methodName) in D:\Source\Repos\Flow.Launcher\Flow.Launcher.Infrastructure\Logger\Log.cs:line 101
   at Flow.Launcher.PublicAPIInstance.LogException(String className, String message, Exception e, String methodName) in D:\Source\Repos\Flow.Launcher\Flow.Launcher\PublicAPIInstance.cs:line 277
   at Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in D:\Source\Repos\Flow.Launcher\Flow.Launcher.Core\ExternalPlugins\CommunityPluginSource.cs:line 80
   --- End of inner exception stack trace ---

Please open new issue in https://github.com/Flow-Launcher/Flow.Launcher/issues
1. Upload log file: C:\Users\11602\AppData\Roaming\FlowLauncher\Logs\1.0.0\2025-06-01.txt
2. Copy below exception message

Flow Launcher version: 1.0.0
OS Version: 26100.4202
IntPtr Length: 8
x64: True

Python Path: C:\Users\11602\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: C:\Program Files\nodejs\node.exe

Date: 06/01/2025 15:57:21
Exception:
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The SSL connection could not be established, see inner exception.)
 ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.IO.IOException:  Received an unexpected EOF or 0 bytes from the transport stream.
   at async ValueTask<ProtocolToken> System.Net.Security.SslStream.ReceiveBlobAsync<TIOAdapter>(CancellationToken cancellationToken)
   at async Task System.Net.Security.SslStream.ForceAuthenticationAsync<TIOAdapter>(bool receiveFirst, byte[] reAuthenticationData, CancellationToken cancellationToken)
   at async Task System.Net.Security.SslStream.ProcessAuthenticationWithTelemetryAsync(bool isAsync, CancellationToken cancellationToken)
   at async ValueTask<SslStream> System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Flow.Launcher.Infrastructure.Http.Http.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken token) in D:\Source\Repos\Flow.Launcher - UI\Flow.Launcher.Infrastructure\Http\Http.cs:line 215
   at Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in D:\Source\Repos\Flow.Launcher - UI\Flow.Launcher.Core\ExternalPlugins\CommunityPluginSource.cs:line 52
   at Flow.Launcher.Infrastructure.Logger.Log.Exception(String className, String message, Exception exception, String methodName) in D:\Source\Repos\Flow.Launcher - UI\Flow.Launcher.Infrastructure\Logger\Log.cs:line 101
   at Flow.Launcher.PublicAPIInstance.LogException(String className, String message, Exception e, String methodName) in D:\Source\Repos\Flow.Launcher - UI\Flow.Launcher\PublicAPIInstance.cs:line 277
   at Flow.Launcher.Core.ExternalPlugins.CommunityPluginSource.FetchAsync(CancellationToken token) in D:\Source\Repos\Flow.Launcher - UI\Flow.Launcher.Core\ExternalPlugins\CommunityPluginSource.cs:line 80
   --- End of inner exception stack trace ---


@Jack251970 Jack251970 added the Dev branch only An issue or fix for the Dev branch build label Jun 1, 2025
@github-actions
Copy link

github-actions bot commented Jun 1, 2025

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors and Warnings Count
❌ forbidden-pattern 22
⚠️ non-alpha-in-dictionary 13

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@gitstream-cm
Copy link

gitstream-cm bot commented Jun 1, 2025

🥷 Code experts: no user but you matched threshold 10

Jack251970 has most 👩‍💻 activity in the files.
Jack251970 has most 🧠 knowledge in the files.

See details

Flow.Launcher.Infrastructure/Http/Http.cs

Activity based on git-commit:

Jack251970
JUN
MAY
APR 17 additions & 16 deletions
MAR
FEB
JAN 42 additions & 8 deletions

Knowledge based on git-blame:
Jack251970: 26%

To learn more about /:\ gitStream - Visit our Docs

1 similar comment
@gitstream-cm
Copy link

gitstream-cm bot commented Jun 1, 2025

🥷 Code experts: no user but you matched threshold 10

Jack251970 has most 👩‍💻 activity in the files.
Jack251970 has most 🧠 knowledge in the files.

See details

Flow.Launcher.Infrastructure/Http/Http.cs

Activity based on git-commit:

Jack251970
JUN
MAY
APR 17 additions & 16 deletions
MAR
FEB
JAN 42 additions & 8 deletions

Knowledge based on git-blame:
Jack251970: 26%

To learn more about /:\ gitStream - Visit our Docs

@gitstream-cm
Copy link

gitstream-cm bot commented Jun 1, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

1 similar comment
@gitstream-cm
Copy link

gitstream-cm bot commented Jun 1, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

@Jack251970 Jack251970 added this to the 1.20.0 milestone Jun 1, 2025
@Jack251970 Jack251970 enabled auto-merge June 1, 2025 11:36
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 1, 2025

📝 Walkthrough

Walkthrough

The SendAsync method in the HTTP utility class was updated to include exception handling. Now, if an exception occurs during the HTTP request, the method returns a response with an internal server error status instead of propagating the exception. An extraneous blank line was also removed.

Changes

File(s) Change Summary
Flow.Launcher.Infrastructure/Http/Http.cs Added try-catch to SendAsync to return 500 error on exceptions; removed a blank line.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant Http
    participant HttpClient

    Caller->>Http: SendAsync(request)
    Http->>HttpClient: SendAsync(request)
    alt Success
        HttpClient-->>Http: HttpResponseMessage
        Http-->>Caller: HttpResponseMessage
    else Exception
        HttpClient--xHttp: Exception
        Http-->>Caller: HttpResponseMessage (InternalServerError)
    end
Loading

Suggested labels

bug, Code Quality

Suggested reviewers

  • jjw24
  • taooceros

Poem

In the warren of code, a bug did appear,
But now with a catch, there’s nothing to fear.
No more exceptions will leap or will bound,
Just a calm 500, when errors are found.
🐇✨
The server stays steady, the rabbits all cheer!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
Flow.Launcher.Infrastructure/Http/Http.cs (1)

210-210: ⚠️ Potential issue

Fix spelling error in method documentation.

The word "Asynchrously" should be "Asynchronously" as flagged by the spell checker.

-        /// Asynchrously send an HTTP request.
+        /// Asynchronously send an HTTP request.
🧰 Tools
🪛 GitHub Check: Check Spelling

[warning] 210-210:
Asynchrously is not a recognized word. (unrecognized-spelling)

🪛 GitHub Actions: Check Spelling

[warning] 210-210: Asynchrously is not a recognized word. (unrecognized-spelling)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43227d8 and 03c0ea8.

📒 Files selected for processing (1)
  • Flow.Launcher.Infrastructure/Http/Http.cs (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check Spelling
Flow.Launcher.Infrastructure/Http/Http.cs

[warning] 210-210: Asynchrously is not a recognized word. (unrecognized-spelling)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: gitStream workflow automation
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: build

@Jack251970 Jack251970 requested a review from onesounds June 1, 2025 11:37
@Jack251970 Jack251970 merged commit a68c69b into dev Jun 1, 2025
16 checks passed
@Jack251970 Jack251970 deleted the resolve_task_exception branch June 1, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev branch only An issue or fix for the Dev branch build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants