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

Wrong null checks in Call.onHttpError cause an exception #72

Open
TheMysticSword opened this issue Jun 10, 2023 · 2 comments
Open

Wrong null checks in Call.onHttpError cause an exception #72

TheMysticSword opened this issue Jun 10, 2023 · 2 comments

Comments

@TheMysticSword
Copy link

https://github.com/Geokureli/Newgrounds/blob/65fa7ca24dce2f8eb972b9b88b47e3ebe7023430/lib/Source/io/newgrounds/Call.hx#LL262C7-L262C24
If an http call fails, this part will cause the entire app to fail. The easiest way to make this happen is to turn off internet connection and create an NG.core

@Geokureli
Copy link
Owner

can you be more specific about what you mean by "will cause the entire app to fail"

@TheMysticSword
Copy link
Author

TheMysticSword commented Jun 11, 2023

It just crashes. On Neko, this is the error:

io/newgrounds/Call.hx:260: [Newgrounds API] :: Error: std@host_resolve
Called from ? line 1
Called from ApplicationMain.hx line 25
Called from ApplicationMain.hx line 130
Called from lime/app/Application.hx line 150
Called from lime/_internal/backend/native/NativeApplication.hx line 146
Called from a C function
Called from lime/_internal/backend/native/NativeApplication.hx line 173
Called from lime/_internal/backend/native/NativeApplication.hx line 585
Called from io/newgrounds/utils/AsyncHttp.hx line 212
Called from io/newgrounds/utils/AsyncHttp.hx line 164
Called from io/newgrounds/utils/AsyncHttp.hx line 158
Called from io/newgrounds/Call.hx line 266
Uncaught exception - Invalid field access : dispatch

and on Android, it only traces

06-11 17:02:01.732 10422 10635 I trace   : io/newgrounds/Call.hx:260: [Newgrounds API] :: Error: newgrounds.io:No address associated with hostname

before crashing and quitting out of the app (and, yes, i did manually add mobile in the list of supported targets, since it seems to be working completely fine)

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