Nativescript throwing Thread 1: EXC_BAD_ACCESS (code=1, address=0x1edf38) in Xcode only

262 Views Asked by At

I'm getting an error after upgrading to NS 7 and building in xcode. I can build successfully from the CLI, run the app and everything is fine but when I build in xCode and run on physical device or simulator and try to log in, I get this error. enter image description here

In the log outputs self = (SAMKeychainQuery*) & password = (NSSTRING *) nil so it's not getting the password value but why would it have access to it when building from the CLI but not Xcode?

I'm running "@nativescript/core": "^7.0.13", "@nativescript/ios": "7.0.6", Xcode 12.

Here is my password textfield:

 <TextField
              :isEnabled="!processing"
              ref="password"
              class="input placeholderColor"
              hint="Password"
              secure="true"
              v-model="user.password"
              @loaded="passwordTextField"
              :returnKeyType="isLoggingIn ? 'done' : 'next'"
              fontSize="18"
            />

//login function
 async login(user) {
    try {
      console.log("in login() in authservice")
      const loginRequest = await firebase.login({
        type: firebase.LoginType.PASSWORD,
        passwordOptions: {
          email: user.email,
          password: user.password,
        },
      });

      const handleLogin = await this.handleLogin(loginRequest);

      return handleLogin;
    } catch (error) {
      return error;
    }
  }

My login() function isn't even firing when I build from Xcode but again all is well from the CLI.

1

There are 1 best solutions below

0
On BEST ANSWER

Completely removing the @nativescript/secure-storage plugin then ns clean and reinstalling secure-storage plugin worked.

Still have no idea why it was working from CLI and not Xcode if the plugin wasn't functioning properly though.