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

Crash while getting the blocto address #25

Open
karam28 opened this issue Nov 19, 2022 · 3 comments
Open

Crash while getting the blocto address #25

karam28 opened this issue Nov 19, 2022 · 3 comments

Comments

@karam28
Copy link

karam28 commented Nov 19, 2022

What I am facing is my application starts crashing and restarting the phone on this method try await fcl.authanticate(accountProofData: accountProofData) and in the debugger console it showed a Message from the debugger: Terminated due to signal 9. Please help me because it's random crash and once it occurs then application keeps crashing.

@IBAction func actionBloctoLogin(_ sender: Any) {

  //  loginAPI(bloctoAddress: "address.hexStringWithPrefix")
    
    let nonce = "75f8587e5bd5f9dcc9909d0dae1f0ac5814458b2ae129620502cb936fde7120a"

   let accountProofData = FCLAccountProofData(
       appId: bloctoSDKAppId,
       nonce: nonce
   )
   Task {
       do {
           let address = try await fcl.authanticate(accountProofData: accountProofData)
           loginAPI(bloctoAddress: address.hexStringWithPrefix)
       } catch {
           //self.handleRequestAccountError(error)
       }
   }
    
    }
@andrew54068
Copy link
Collaborator

andrew54068 commented Nov 21, 2022

Please make sure you run task in @MainActor

@karam28
Copy link
Author

karam28 commented Nov 29, 2022

I have used the @mainactor but seems it still starts behaving the same again. here is my code. if you can send me the code example for that, it will help a lot

  let nonce = "75f8587e5bd5f9dcc9909d0dae1f0ac5814458b2ae129620502cb936fde7120a"

   let accountProofData = FCLAccountProofData(
       appId: bloctoSDKAppId,
       nonce: nonce
   )
   Task { @MainActor in
       do {
           let address = try await fcl.authanticate(accountProofData: accountProofData)
           loginAPI(bloctoAddress: address.hexStringWithPrefix)
       } catch {
           //self.handleRequestAccountError(error)
       }
   }

@andrew54068
Copy link
Collaborator

Sorry to get back to you so late. Did you solve this issue already? If not, can you provide the log or stack trace?

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

3 participants
@karam28 @andrew54068 and others