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

The api freezes if an error occurred while connecting #8

Open
frameorigin opened this issue Nov 7, 2023 · 0 comments
Open

The api freezes if an error occurred while connecting #8

frameorigin opened this issue Nov 7, 2023 · 0 comments

Comments

@frameorigin
Copy link

Issue
Sometimes it is not immediately possible to connect to some nodes. For example, the Basilisk node sometimes interrupts the connection attempt. In this case, the program freezes during its execution on 'await', without throwing an error through 'throws'

A project with functionality for playback
SubstrateSdkApiIssue.zip

Steps to reproduce the issue

  1. Open the project
  2. Run the project several times before reproducing the connection error (accompanied by a characteristic log) [Alternative option: run without internet access]

Expected result
The program comes to print("Success") or print("Error: \(error)").

Actual result
The program does not reach the above lines and freezes

Example of a failed connection log
Task <4BCC6AB0-15A0-4D42-98A5-A81127830B66>.<1> finished with error [18 446 744 073 709 550 607] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSErrorFailingURLStringKey=wss://rpc.basilisk.cloud/, NSErrorFailingURLKey=wss://rpc.basilisk.cloud/, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalWebSocketTask <4BCC6AB0-15A0-4D42-98A5-A81127830B66>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <4BCC6AB0-15A0-4D42-98A5-A81127830B66>.<1>, NSLocalizedDescription=The Internet connection appears to be offline.}

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