[GH-ISSUE #4767] [Bug] OpenAI request gets stuck #2134

Closed
opened 2026-03-23 21:19:57 +00:00 by mirror · 23 comments
Owner

Originally created by @suntorytimed on GitHub (Feb 28, 2024).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/4767

Originally assigned to: @appflowy on GitHub.

Bug Description

I executed a command for the openAI Writer, but the execution got stuck with a spinning loading wheel. According to the logs no request is sent and openAI doesn't register a usage of the API key.

How to Reproduce

Use 0.5.0 from Flathub and execute an openAI Writer request with an OpenAPI API key and registered to a private hosted AppFlowy Cloud.

Expected Behavior

get a response from openAI

Operating System

openSUSE Tumbleweed

AppFlowy Version(s)

beginning with 0.5.0 (tested with each verison until 0.5.8)

Screenshots

image

Additional Context

No response

Originally created by @suntorytimed on GitHub (Feb 28, 2024). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/4767 Originally assigned to: @appflowy on GitHub. ### Bug Description I executed a command for the openAI Writer, but the execution got stuck with a spinning loading wheel. According to the logs no request is sent and openAI doesn't register a usage of the API key. ### How to Reproduce Use 0.5.0 from Flathub and execute an openAI Writer request with an OpenAPI API key and registered to a private hosted AppFlowy Cloud. ### Expected Behavior get a response from openAI ### Operating System openSUSE Tumbleweed ### AppFlowy Version(s) beginning with 0.5.0 (tested with each verison until 0.5.8) ### Screenshots ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/2744377/277d1849-6346-445f-b572-c99dc495bf7d) ### Additional Context _No response_
mirror 2026-03-23 21:19:57 +00:00
Author
Owner

@LucasXu0 commented on GitHub (Feb 28, 2024):

Hi, @suntorytimed. Was any error message displayed?

<!-- gh-comment-id:1969035716 --> @LucasXu0 commented on GitHub (Feb 28, 2024): Hi, @suntorytimed. Was any error message displayed?
Author
Owner

@suntorytimed commented on GitHub (Feb 28, 2024):

@LucasXu0 I executed AppFlowy from terminal, but there are no log entries for errors or any request being sent to OpenAI. Is there any other way to get more verbose logging? The GUI gets stuck with the spinning wheel and needs to be closed and reopened to continue working on the document.

<!-- gh-comment-id:1969305237 --> @suntorytimed commented on GitHub (Feb 28, 2024): @LucasXu0 I executed AppFlowy from terminal, but there are no log entries for errors or any request being sent to OpenAI. Is there any other way to get more verbose logging? The GUI gets stuck with the spinning wheel and needs to be closed and reopened to continue working on the document.
Author
Owner

@LucasXu0 commented on GitHub (Mar 3, 2024):

@suntorytimed Got it. By the way, could you confirm if the OpenAI key is valid?

<!-- gh-comment-id:1975175474 --> @LucasXu0 commented on GitHub (Mar 3, 2024): @suntorytimed Got it. By the way, could you confirm if the OpenAI key is valid?
Author
Owner

@smvueno commented on GitHub (Mar 5, 2024):

I have the same problem with latest on my mac m1 mabook air.
The latest v0.5.0 only the right click text and spellcorrect works.
The AI writing is not working.

The last version working version for me is [v0.4.3] (This version everything with AI works)
AI writing is not working on versions [v0.4.4] - [v0.5.0]

<!-- gh-comment-id:1977948882 --> @smvueno commented on GitHub (Mar 5, 2024): I have the same problem with latest on my mac m1 mabook air. The latest v0.5.0 only the right click text and spellcorrect works. The AI writing is not working. The last version working version for me is [v0.4.3] (This version everything with AI works) AI writing is not working on versions [v0.4.4] - [v0.5.0]
Author
Owner

@suntorytimed commented on GitHub (Mar 5, 2024):

@LucasXu0 yes, the API key is valid and works with other requests outside of AppFlowy.

<!-- gh-comment-id:1978084645 --> @suntorytimed commented on GitHub (Mar 5, 2024): @LucasXu0 yes, the API key is valid and works with other requests outside of AppFlowy.
Author
Owner

@letanphuc commented on GitHub (Mar 8, 2024):

Hi all,
I found that function _onGenerate() (file lib\plugins\document\presentation\editor_plugins\openai\widgets\auto_completion_node_widget.dart) got stuck because of following await calling:

  • await loading.start();
  • await barrierDialog?.show();

I don't know why but it's seeming like all await calling are stuck.

<!-- gh-comment-id:1985966477 --> @letanphuc commented on GitHub (Mar 8, 2024): Hi all, I found that function _onGenerate() (file lib\plugins\document\presentation\editor_plugins\openai\widgets\auto_completion_node_widget.dart) got stuck because of following await calling: - await loading.start(); - await barrierDialog?.show(); I don't know why but it's seeming like all await calling are stuck.
Author
Owner

@suntorytimed commented on GitHub (Apr 2, 2024):

Issue persists with 0.5.3

<!-- gh-comment-id:2032230698 --> @suntorytimed commented on GitHub (Apr 2, 2024): Issue persists with 0.5.3
Author
Owner

@theoden8 commented on GitHub (Apr 21, 2024):

And with 0.5.4

<!-- gh-comment-id:2068009550 --> @theoden8 commented on GitHub (Apr 21, 2024): And with 0.5.4
Author
Owner

@suntorytimed commented on GitHub (May 14, 2024):

Just here to say it's still an issue with 0.5.7. Which is quite unfortunate, as I consider the AI integration as a core functionality.

<!-- gh-comment-id:2109410022 --> @suntorytimed commented on GitHub (May 14, 2024): Just here to say it's still an issue with 0.5.7. Which is quite unfortunate, as I consider the AI integration as a core functionality.
Author
Owner

@sverro2 commented on GitHub (Jun 2, 2024):

I didn't add any API key for openAI. When I try to ask AI by using '/' and selecting the option, I can ask my question, but when sending it, it just keeps spinning/loading. No option to abort. No error messages. My only option is to close the application and restart.

This is on Fedora with Flatpak installed version of AppFlowy.

<!-- gh-comment-id:2143744342 --> @sverro2 commented on GitHub (Jun 2, 2024): I didn't add any API key for openAI. When I try to ask AI by using '/' and selecting the option, I can ask my question, but when sending it, it just keeps spinning/loading. No option to abort. No error messages. My only option is to close the application and restart. This is on Fedora with Flatpak installed version of AppFlowy.
Author
Owner

@wangtsiao commented on GitHub (Jun 12, 2024):

And with 0.5.9

<!-- gh-comment-id:2162099458 --> @wangtsiao commented on GitHub (Jun 12, 2024): And with 0.5.9
Author
Owner

@wangtsiao commented on GitHub (Jun 12, 2024):

by the way, I am at a location that accessing openai should with a vpn proxy, still not clear how to set network proxy for AppFlowy.

<!-- gh-comment-id:2162101577 --> @wangtsiao commented on GitHub (Jun 12, 2024): by the way, I am at a location that accessing openai should with a vpn proxy, still not clear how to set network proxy for AppFlowy.
Author
Owner

@DevOpsMage commented on GitHub (Jun 19, 2024):

I'm also seeing this issue as well on Windows 11 running Version 0.5.9.

image

<!-- gh-comment-id:2179362430 --> @DevOpsMage commented on GitHub (Jun 19, 2024): I'm also seeing this issue as well on Windows 11 running Version 0.5.9. ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/46078399/72d15e05-845e-4f35-82b7-d7e6c9c9f7ec)
Author
Owner

@kosta777 commented on GitHub (Jun 20, 2024):

Getting the same issue on Mac M3

<!-- gh-comment-id:2180028201 --> @kosta777 commented on GitHub (Jun 20, 2024): Getting the same issue on Mac M3
Author
Owner

@suntorytimed commented on GitHub (Jul 2, 2024):

This issue also appears with the new functionality for AI chats.

<!-- gh-comment-id:2202599620 --> @suntorytimed commented on GitHub (Jul 2, 2024): This issue also appears with the new functionality for AI chats.
Author
Owner

@suntorytimed commented on GitHub (Jul 2, 2024):

@appflowy @LucasXu0 is there anything we can provide as input for this issue? As is the AI capabilities of AppFlowy don't work since February.

<!-- gh-comment-id:2203214181 --> @suntorytimed commented on GitHub (Jul 2, 2024): @appflowy @LucasXu0 is there anything we can provide as input for this issue? As is the AI capabilities of AppFlowy don't work since February.
Author
Owner

@annieappflowy commented on GitHub (Jul 2, 2024):

We fixed the OpenAI Writer block in v0.6.2
Could you please give it a try?

https://github.com/AppFlowy-IO/AppFlowy/assets/12026239/378f465f-0e28-4917-b943-e108dc4d24eb

<!-- gh-comment-id:2203335099 --> @annieappflowy commented on GitHub (Jul 2, 2024): We fixed the OpenAI Writer block in v0.6.2 Could you please give it a try? https://github.com/AppFlowy-IO/AppFlowy/assets/12026239/378f465f-0e28-4917-b943-e108dc4d24eb
Author
Owner

@suntorytimed commented on GitHub (Jul 2, 2024):

Will do as soon as the Flatpak for 0.6.2 got created 👍🏼

<!-- gh-comment-id:2203631746 --> @suntorytimed commented on GitHub (Jul 2, 2024): Will do as soon as the Flatpak for 0.6.2 got created 👍🏼
Author
Owner

@DevOpsMage commented on GitHub (Jul 3, 2024):

We fixed the OpenAI Writer block in v0.6.2 Could you please give it a try?

Screen.Recording.2024-07-02.at.10.00.06.PM.mov

I can confirm that the AI feature is now working. I'm assuming it is using the API key I provided before I updated the software. After the update I no longer have the option to set an API key to use for openai. So I'm not sure where we are pulling this information from now.

I also see there has been added support for Claude but yet again I don't see where an API key should be added for this either.

image

<!-- gh-comment-id:2204965171 --> @DevOpsMage commented on GitHub (Jul 3, 2024): > We fixed the OpenAI Writer block in v0.6.2 Could you please give it a try? > > Screen.Recording.2024-07-02.at.10.00.06.PM.mov I can confirm that the AI feature is now working. I'm assuming it is using the API key I provided before I updated the software. After the update I no longer have the option to set an API key to use for openai. So I'm not sure where we are pulling this information from now. I also see there has been added support for Claude but yet again I don't see where an API key should be added for this either. ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/46078399/08cd423d-e619-4dec-a977-0e80bc3b47ae)
Author
Owner

@annieappflowy commented on GitHub (Jul 3, 2024):

Hi @DevOpsMage , Thank you for confirming that the feature works again.

We're switching from requiring users to provide API keys to offering AppFlowy AI services. You can consider it as the middle layer between AppFlowy end-user features and third-party AI providers. We're currently giving away free AI quota to our users. As you can see in the interface, you can select your preferred models to power AI inside AppFlowy. It's not completely done yet, as we're working on enabling local AI models for ultimate privacy.

Let me know if you have any questions!

<!-- gh-comment-id:2204986751 --> @annieappflowy commented on GitHub (Jul 3, 2024): Hi @DevOpsMage , Thank you for confirming that the feature works again. We're switching from requiring users to provide API keys to offering AppFlowy AI services. You can consider it as the middle layer between AppFlowy end-user features and third-party AI providers. We're currently giving away free AI quota to our users. As you can see in the interface, you can select your preferred models to power AI inside AppFlowy. It's not completely done yet, as we're working on enabling local AI models for ultimate privacy. Let me know if you have any questions!
Author
Owner

@suntorytimed commented on GitHub (Jul 3, 2024):

Couldn't verify the fix yet, as the Flatpak isn't released.

I am running my own AppFlowy Cloud instance and have my key added there. Updated it to the latest version just now, to make sure everything is fine on this end.

<!-- gh-comment-id:2205142155 --> @suntorytimed commented on GitHub (Jul 3, 2024): Couldn't verify the fix yet, as the Flatpak isn't released. I am running my own AppFlowy Cloud instance and have my key added there. Updated it to the latest version just now, to make sure everything is fine on this end.
Author
Owner

@suntorytimed commented on GitHub (Jul 4, 2024):

Looks like it works, but I will have to fix my AI setup on the server-side :)
{"code":1017,"message":"Invalid request:reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"ai\")), port: Some(5001), path: \"/completion/stream\", query: None, fragment: None }, source: Error { kind: Connect, source: Some(ConnectError(\"dns error\", Custom { kind: Uncategorized, error: \"failed to lookup address information: Name or service not known\" })) } }"}

<!-- gh-comment-id:2208235096 --> @suntorytimed commented on GitHub (Jul 4, 2024): Looks like it works, but I will have to fix my AI setup on the server-side :) `{"code":1017,"message":"Invalid request:reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"ai\")), port: Some(5001), path: \"/completion/stream\", query: None, fragment: None }, source: Error { kind: Connect, source: Some(ConnectError(\"dns error\", Custom { kind: Uncategorized, error: \"failed to lookup address information: Name or service not known\" })) } }"} `
Author
Owner

@suntorytimed commented on GitHub (Jul 12, 2024):

Can confirm it as fixed with my self-hosted AppFlowy Cloud now as well

<!-- gh-comment-id:2225481008 --> @suntorytimed commented on GitHub (Jul 12, 2024): Can confirm it as fixed with my self-hosted AppFlowy Cloud now as well
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#2134
No description provided.