-
Notifications
You must be signed in to change notification settings - Fork 173
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
[Help wanted] The request connection took longer than 0:00:20.000000. It was aborted. #31
Comments
You can add long timeout such as const duration(50)
|
Still haven't solved the problem. (base) ➜ example git:(main) ✗ flutter run Flutter run key commands. 💪 Running with sound null safety 💪 An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:60639/d5UPNmD2irU=/ (base) ➜ client git:(main) ✗ ping api.openai.com |
your have error ? |
(base) ➜ example git:(main) ✗ flutter run Flutter run key commands. 💪 Running with sound null safety 💪 An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:65085/MvM7AE3FZSc=/ #0 OpenAIClient.post (package:chat_gpt_sdk/src/client/openai_client.dart:85:7) |
You using proxy ? , or using normal api.
|
I have tried using both proxy and normal APIs, but neither of them worked. |
Normal APIs you try new version , I upload last time and if have error you
case ask me.
|
I pulled the latest code(commit 46a3bee), but it still gave an error. The error message is as follows. An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:54369/DmhC3aQzclM=/ #0 OpenAIClient.post (package:chat_gpt_sdk/src/client/openai_client.dart:132:7) |
You can show code ?
|
I just run this code and replace my token in constants.dart. https://github.com/redevRx/Flutter-ChatGPT/tree/main/example/lib |
You add permission internet in iOS or android right ?
|
I can visit google in my iOS simulator. |
You try check
the following in info.plist file.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
|
It's still not work, and my config is as follows.
I also found your solution on StackOverflow. |
you try run on android device. |
I found this PR, and I try it, it's works(translate and chat). |
While running the example, I encountered the following error 1. If I set the proxy for HttpSetup, I encounter error 2.
Error 1:
(base) ➜ example git:(main) ✗ flutter run
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 2,703ms
Xcode build done. 7.3s
Syncing files to device iPhone 13... 123ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:65388/S7AYxR2iYWY=/
The Flutter DevTools debugger and profiler on iPhone 13 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:65388/S7AYxR2iYWY=/
Performing hot restart...
Restarted application in 354ms.
flutter:
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception:
status code :null message :The request connection took longer than 0:00:20.000000. It was aborted.
data:null
Error 2:
void initState() {
openAI = OpenAI.instance.build(
token: token,
baseOption: HttpSetup(
proxy: "localhost:1087",
receiveTimeout: const Duration(seconds: 20),
connectTimeout: const Duration(seconds: 20)),
isLog: true);
super.initState();
}
(base) ➜ example git:(main) ✗ flutter run
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 2,496ms
Xcode build done. 8.8s
Syncing files to device iPhone 13... 108ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:49416/nGCSjrR8sk8=/
The Flutter DevTools debugger and profiler on iPhone 13 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:49416/nGCSjrR8sk8=/
flutter:
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception:
status code :null message :null
data:null
The text was updated successfully, but these errors were encountered: