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

expo android app cant connect to the electric service after first hot reload #1041

Open
wildsylvan opened this issue Mar 11, 2024 · 2 comments
Assignees

Comments

@wildsylvan
Copy link

the sync service says:

07:11:37.098 pid=<0.3160.0> [info] GET /ws
07:11:37.100 pid=<0.3160.0> instance_id=11d59e1b-bd78-4615-81eb-0e8ff2e90ec5 [info] Sent 101 in 1ms
07:11:38.157 pid=<0.3160.0> client_id=c07a6aba-f79f-43ea-9569-a05003726f79 instance_id=11d59e1b-bd78-4615-81eb-0e8ff2e90ec5
[info] attempted multiple connections from the same client

the debug log on the client:

 INFO  Using SQLite version: 3.42.0
 INFO  retrieved lsn 51,52,55,50,49,54,48,48
 INFO  connecting to electric server
 LOG  [rpc] send: #SatAuthReq{id: c07a6aba-f79f-43ea-9569-a05003726f79, token: eyJhbGciOiJub25lIn0.eyJzdWIiOiI0ZTM2MTQ4MS0xYzZkLTQxMjUtYTAzMy1iYzQ4NjEwMzA1OGUifQ.}
 LOG  [proto] send: #SatRpcRequest{method: authenticate, requestId: 1}
 LOG  [proto] recv: #SatRpcResponse{method: authenticate, requestId: 1, error: #SatErrorResp{type: INVALID_REQUEST}}
 WARN  RPC call authenticate/1 failed with #SatErrorResp{type: INVALID_REQUEST}
 LOG  server returned an error while establishing connection: undefined
 LOG  connectAndStartRetryHandler was cancelled: undefined
 LOG  connectAndStartRetryHandler was cancelled: undefined

before trying to reload the app from the expo cli, it works. after the reload, you have to restart the electric sync service to make it work again

Copy link

linear bot commented Mar 11, 2024

@msfstef msfstef self-assigned this Mar 11, 2024
@msfstef
Copy link
Contributor

msfstef commented Mar 28, 2024

I will be looking into this - for the time being I think that doing full reloads rather than hot reloads should work - you can disable fast refresh from the developer menu:
Screenshot 2024-03-28 at 12 41 26

If the issue persists with regular reloads as well let me know - also it'd be good to know if you experience this issue with the expo example or with your own project.

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