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 Example can't reconnect at real device #35

Closed
thehaigo opened this issue Mar 12, 2023 · 1 comment
Closed

iOS Example can't reconnect at real device #35

thehaigo opened this issue Mar 12, 2023 · 1 comment

Comments

@thehaigo
Copy link
Sponsor

I put the iOS sample in the background and wait 30 seconds and come back, it will not reconnect and become inoperable.

The Android sample was not a problem.

iOS 16
devide iPhone SE 2nd gen
Elixir 1.14.1
elrang 25.0.1

2023-03-12 23:44:16.577908+0900 todoapp[14917:4330321] [connection] nw_socket_handle_socket_event [C1:1] Socket SO_ERROR [9: Bad file descriptor]
2023-03-12 23:44:16.578507+0900 todoapp[14917:4330321] [connection] nw_socket_get_input_frames [C1:1] recvmsg(fd 41, 4 bytes) [57: Socket is not connected]
2023-03-12 23:44:16.578867+0900 todoapp[14917:4330321] [connection] nw_read_request_report [C1] Receive failed with error "Socket is not connected"
�[31m23:44:16.612 [error] Postgrex.Protocol (#PID<0.325.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:16.612 [error] Postgrex.Protocol (#PID<0.324.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:16.613 [error] Postgrex.Protocol (#PID<0.319.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:16.613 [error] Postgrex.Protocol (#PID<0.326.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:16.606 [error] GenServer Bridge terminating
** (FunctionClauseError) no function clause matching in Bridge.handle_info/2
    (wx 1.0.10) lib/bridge.ex:227: Bridge.handle_info({:tcp_error, #Port<0.4>, :enotconn}, %Bridge{port: 49368, socket: #Port<0.4>, send: &:gen_tcp.send/2, requests: %{}, funs: %{6 => #Function<1.48358712/2 in Desktop.Window.close_window>}, events: [], subscribers: [#PID<0.203.0>]})
    (stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
    (stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
    (stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: {:tcp_error, #Port<0.4>, :enotconn}
�[0mconnection 0 did end
server did close connection 0
connection 0 did fail, error: POSIXErrorCode(rawValue: 57): Socket is not connected
2023-03-12 23:44:16.880116+0900 todoapp[14917:4330155] [connection] nw_connection_set_state_changed_handler_block_invoke [C1] Cannot set state changed handler after cancel
2023-03-12 23:44:16.880336+0900 todoapp[14917:4331649] [connection] [C1 127.0.0.1:59933 tcp, local: 127.0.0.1:49368, definite, attribution: developer, server, prohibit joining] is already cancelled, ignoring cancel
�[31m23:44:17.470 [error] Postgrex.Protocol (#PID<0.323.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:17.470 [error] Postgrex.Protocol (#PID<0.320.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:17.470 [error] Postgrex.Protocol (#PID<0.322.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:17.471 [error] Postgrex.Protocol (#PID<0.318.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:17.551 [error] Postgrex.Protocol (#PID<0.321.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m�[31m23:44:17.637 [error] Postgrex.Protocol (#PID<0.327.0>) disconnected: ** (DBConnection.ConnectionError) tcp send: closed
�[0m
@thehaigo
Copy link
Sponsor Author

move to ios example

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

1 participant