-
Notifications
You must be signed in to change notification settings - Fork 16
Pubnub Error at the time of internet turning OFF. (Windows Desktop) #29
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
Comments
Hi! Thanks for reporting the issue. This may be caused by some unrecognized exception thats throwing off builtin diagnostics. However, it may be possible to fix this by adding your own diagnostic function: import `package:pubnub/core.dart`;
import 'package:pubnub/src/networking/meta/diagnostics.dart';
pubnub.supervisor.registerDiagnostic((exception) {
if (exception is Exception) { // check what kind of exception that is
return HostIsDownDiagnostic('ps.pndsn.com', 80); // example diagnostic
// you can also use UnknownHttpExceptionDiagnostic()
}
}); |
I have used this code and start application. On internet disconnection, I got exception : "PubNubException: request failed". Flutter Doctor and code details are still same as display earlier. Please let me know if you need anymore details. Thanks |
Can you print out and let me know what kind of exception is passed into the
|
Hello, Here is the result of below code.
Result :
Please let me know if any. Thanks |
Sorry for not being able to resolve this issue quickly, but you have to keep in mind that Flutter on Windows is in alpha and not everything will work correctly. This issue may be fixed by our next release next week, but it doesn't guarantee that. |
@are |
We have released new version |
@are
At the time of internet ON-OFF, windows execute print statement but Linux doesn't execute print statement and doesn't react anything. Please suggest if any solution for this. Thanks for on time support. |
@are
Please suggest me the proper solution in which Pubnub stay connected for idle time at-least 24 hours. Thanks |
@unoravi What is the problem exactly? Do you get any exceptions? Does it just stop receiving messages without any information? What does the logging say? |
@are |
Can you enable logging on LogLevel.silly and send it here or if you are conscious of privacy send it to PubNub support and mention that its for me? Without any additional info it will be very hard to resolve this issue. |
@are : I faces connection lost issue and issue logs are attached on Pubnub Support Ticket... |
I'm trying to analyze the logs and come up with something meaningful, but it's hard to say what is happening there. One thing that you can try to do is to include a Timer that runs every |
Also thanks to your latest logs we have found a bug! I'm in process of fixing it and this should allow your long running app to receive the messages properly. |
@are Thanks |
Thanks for the long wait! Fix for this is released in |
Flutter-Channel : dev
Note : Same code works properly for Android but not working on Windows Desktop.
Flutter Doctor :
`
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.18363.1016], locale en-CA)
• Flutter version 1.26.0-1.0.pre at C:\Program Files\flutter
• Framework revision 63062a6443 (8 days ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\street\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
X Android license status unknown.
Run
flutter doctor --android-licenses
to accept the SDK licenses.See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.7.30621.155
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.52.1)
• VS Code at C:\Users\street\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.17.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18363.1016]
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88
• Edge (web) • edge • web-javascript • Microsoft Edge 85.0.564.70
! Doctor found issues in 1 category.
`
Error is shown below.
[+98719 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PubNubException: request failed
[ +1 ms] #0 new PubNubException (package:pubnub/src/core/exceptions.dart:9:29)
[ ] #1 new PubNubRequestOtherException (package:pubnub/src/core/net/exceptions.dart:21:56)
[ ] #2 RequestHandler.response (package:pubnub/src/net/request_handler.dart:82:17)
[ +18 ms]
[ ] #3 Future.any.onValue (dart:async/future.dart)
[ ]
[ ] #0 RequestHandler.response (package:pubnub/src/net/request_handler.dart:82:11)
[ ]
[ ] #1 Future.any.onValue (dart:async/future.dart)
[ +1 ms]
The text was updated successfully, but these errors were encountered: