Hi everyone, I am trying to create a simpe registe...
# general
b
Hi everyone, I am trying to create a simpe register/login using passkeys but the minimum attempt it throws: DioException [connection error]: The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an error on the network layer. This indicates an error which most likely cannot be solved by the library. ory tunnel logs:
d
DioException? is this a Flutter app? If it’s mobile you should probably be using the createNativeRegistrationFlow instead of browser. If you catch the DioException, what is the actual error?
b
flutter web to be honest
Copy code
DioException [connection error]: The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an
error on the network layer. This indicates an error which most likely cannot be solved by the library.
Copy code
final native = await _ory.createNativeRegistrationFlow();      
      var body = UpdateRegistrationFlowWithPasskeyMethod(
        (b) => b
          ..method = 'passkey'
          ..traits = JsonObject({
            'email': '<mailto:user@example.com|user@example.com>',
            'name': 'John Doe',
            'username': 'exampleUser'
          }),
      );
      final response = await _ory.updateRegistrationFlow(
        flow: native.data!.id,
        updateRegistrationFlowBody: UpdateRegistrationFlowBody(  
        (b) => b.oneOf = OneOf.fromValue1(value: body)),     
      );
throws:
Error: Deserializing to 'SuccessfulNativeRegistration' failed due to: Tried to build class "SuccessfulNativeRegistration" but nested builder for
field "identity" threw: Tried to construct class "Identity" with null for non-nullable field "id".