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

handle http exceptions #49

Open
joukhar opened this issue Jan 17, 2024 · 1 comment
Open

handle http exceptions #49

joukhar opened this issue Jan 17, 2024 · 1 comment

Comments

@joukhar
Copy link

joukhar commented Jan 17, 2024

when user is not connected to internet, it return this error:
ClientException with SocketException: Failed host lookup: 'play.google.com' (OS Error: No address associated with hostname, errno = 7), uri=https://play.google.com/store/apps/details?id=<PACKAGE_ID>&hl=en_US

when app is not found it returns:
Unhandled Exception: Exception: Invalid response code: 404

My suggestions are:

  1. when user is not connected to internet : mark canUpdate to false
  2. when app is not found : add a parameter isAppExist and its value is false and mark canUpdate to false

and THANK YOU SO MUCH FOR UR WORK

@LuisGMM
Copy link

LuisGMM commented Jun 19, 2024

Hello there, similar problem here.

In my case the app is not yet public, so there is an unhandled 404 error when trying to find the app on the Play Store:

E/flutter ( 4345): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Invalid response code: 404
E/flutter ( 4345): #0      NewVersionPlus._getAndroidStoreVersion (package:new_version_plus/new_version_plus.dart:191:7)
E/flutter ( 4345): <asynchronous suspension>
E/flutter ( 4345): #1      _ScreenState.checkUpdates (package:app/presentation/ui/screen/screen.dart:56:9)
E/flutter ( 4345): <asynchronous suspension>

@pewiher , is there any way to handle these errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants