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

iOS. NewNode proxy does not receive connections after returning app from background #116

Closed
spring-reverb opened this issue Feb 28, 2022 · 8 comments

Comments

@spring-reverb
Copy link

We have this scenario:

  • open our flutter app (inits the newnode as a proxy, all requests go through that proxy)
  • perform some requests (works fine)
  • move app to background
  • lock the screen for 10-30 seconds
  • unlock the screen
  • open app again
  • perform request: all requests fail with "connection refused" error.

It seems that iOS closes proxy socket opened by NewNode. We do not have this kind of error if we omit proxying data through newnode.

We can add some kind of workaround in our app to reinit proxy, but I do not see any API to call for that matter.

@spring-reverb
Copy link
Author

We tried to use generic http proxy (local tinyproxy instance) and we do not have this kind of errors.

We researched NN code (client.c), but haven't found any ways to reinitialize newnode.

@ghazel Can you, please, help us in dealing with this issue? It's very important for us to deal with it rapidly.

@ghazel
Copy link
Collaborator

ghazel commented Mar 4, 2022

You are running tinyproxy on the iOS device itself, as part of your app?

@spring-reverb
Copy link
Author

Of couse not. We just tried to use some generic http proxy to prove that the issue is not in our proxy client code

@ghazel
Copy link
Collaborator

ghazel commented Mar 4, 2022

This is the same issue as #96

@spring-reverb
Copy link
Author

Is there a workaround available? We can add some code to foreground/background event handlers to init/deinit newnode for iOS.

In essence, the app is unusable after returning from the locked screen. That's the usual case for our users: they checkout the app content, switch to something else, lock the screen, check the app again.

@ghazel
Copy link
Collaborator

ghazel commented Mar 4, 2022

There is a fix in progress, but no work-around currently. (You could kill your app when backgrounded, but that might be too disruptive)

@ghazel
Copy link
Collaborator

ghazel commented Mar 5, 2022

Fixed. Will be released shortly.

@ghazel ghazel closed this as completed Mar 5, 2022
@ghazel
Copy link
Collaborator

ghazel commented Mar 6, 2022

Released in 2.0.4

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